tedana.metrics.external.build_fstat_regressor_models

build_fstat_regressor_models(external_regressors: DataFrame, external_regressor_config: Dict, detrend_regressors: DataFrame) Dict[source]

Combine detrending all or subsets of external regressors to make models to fit and test.

Parameters:
  • external_regressors (pandas.DataFrame) – Each column is a labelled regressor and the number of rows should match the number of timepoints in the fMRI time series

  • external_regressor_config (dict) – Information describing the external regressors and method to use for fitting and statistical tests. In other functions this is a list[dict] but here it is a single dict which is one element in the list[dict]

  • detrend_regressors ((n_vols x polort) pandas.DataFrame) – Dataframe containing the detrending regressor time series

Returns:

regressor_models (dict) – Each element in the dictionary is a numpy array defining the regressors in a regressor model. The models that are always included are ‘base’ which is just the detrending regressors, and ‘full’ which is all user-provided external regressors and the detrending regressors. If partial models are named in external_regressor_config[“f_stats_partial_models”], then each of those will have a dictionary element named “no” then model name and the regressors included will be everything except the specified regressors. That is “no motion” will include all regressors except the motion regressors. This is for the F test which compares the variance explained with the full model to the variance explained if the regressors-of-interest for the partial model are removed.