Skip to contents

Analyze group differences in a single dMRI tract profile using GAMs

Usage

tractable_single_tract(df, tract, tract_col = "tractID", ...)

Arguments

df

Input data frame.

tract

Tract name to subset from the dataframe.

tract_col

The column name that encodes the tract information. Default: tractID

...

Arguments passed on to fit_gam

Value

GAM model fit object.

Examples

df_sarica <- read_afq_sarica(na_omit = TRUE)

tractable_single_tract(
  df         = df_sarica, 
  tract      = "Right Corticospinal",
  target     = "fa",
  regressors = c("age", "group"),
  node_group = "group"
)
#> 
#> Family: gaussian 
#> Link function: identity 
#> 
#> Formula:
#> fa ~ age + group + s(nodeID, by = group, bs = "fs", k = 9) + 
#>     s(subjectID, bs = "re")
#> 
#> Estimated degrees of freedom:
#>  7.97  7.96 42.42  total = 61.35 
#> 
#> fREML score: -13622.6