Package 'stateR'

Title: Brain State Metrics for Functional Connectivity Studies
Description: Provides tidy tools for quantifying brain state dynamics from functional connectivity time series. Computes fractional occupancy, mean dwell time, and Markov-chain transition probabilities across discrete brain states derived from clustering methods such as k-means or hidden Markov models.
Authors: Lucas França [aut, cre] (ORCID: <https://orcid.org/0000-0003-0853-1319>), Dafnis Batallé [aut] (ORCID: <https://orcid.org/0000-0003-2097-979X>)
Maintainer: Lucas França <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-07-02 15:00:10 UTC
Source: https://github.com/CoDe-Neuro/stateR

Help Index


This function reports the likelihood of transition between different states. The analysis is performed in a Markovian manner, i.e., without memory and all states have the same relevance.'

Description

This function reports the likelihood of transition between different states. The analysis is performed in a Markovian manner, i.e., without memory and all states have the same relevance.'

Usage

clusters_markov(tbl, vars, cVar, sortBy, groupBy, remIntra = FALSE)

Arguments

tbl

A tibble/dataframe featuring a list of states in time - and covariates.

vars

Variables of interest in the tibble/dataframe.

cVar

States variable name to obtain transition likelihood.

sortBy

Time index variable.

groupBy

Grouping variable, e.g., subject or class.

remIntra

Logical indicating whether dwelling state transitions should be discarded.


This function obtains dwelling times for states from a list.

Description

This function obtains dwelling times for states from a list.

Usage

dwellCount(x)

Arguments

x

List with states


This function estimates the dwelling time or continuous occupancy of a series of states.'

Description

This function estimates the dwelling time or continuous occupancy of a series of states.'

Usage

nest_dwell(tbl, vars, foVar, sortBy)

Arguments

tbl

A tibble/dataframe featuring a list of states in time - and covariates

vars

Variables of interest in the tibble/dataframe

foVar

States variable name to obtain Dwelling time

sortBy

Time index variable


This function estimates the fractional occupancy or probability of a series of states.'

Description

This function estimates the fractional occupancy or probability of a series of states.'

Usage

nest_fo(tbl, vars, foVar)

Arguments

tbl

A tibble/dataframe featuring a list of states in time - and covariates

vars

Variables of interest in the tibble/dataframe

foVar

States variable name to obtain fractional occupancy.