generate_fsf_contrast_syntax: This function generates syntax for FSL Feat .fsf files for...

View source: R/generate_fsf_contrast_syntax.R

generate_fsf_contrast_syntaxR Documentation

This function generates syntax for FSL Feat .fsf files for the contrasts tab of an fMRI analysis. It accepts a numeric contrast matrix whose rownames correspond to the name of the contrast.

Description

This allows you to generate contrast syntax dynamically based on a given subject's data using tools such as lm() and emmeans() to obtain proper contrast vectors in more complex modeling situations. The idea would be to glue the syntax generated by this function together with a more general FSF template file that has EVs and so on.

Usage

generate_fsf_contrast_syntax(cmat, ftests = NULL, include_overall = TRUE)

Arguments

cmat

A numeric matrix whose rows specify individual contrasts and columns specify coefficients (EVs).

ftests

A list containing F-tests composed of combinations of EVs. For future development.

include_overall

Whether to include the overall information about contrasts (e.g., whether to implement contrast masking) in the syntax. Defaults to TRUE.

Value

A character vector containing .fsf syntax for the contrasts portion of a Feat analysis based on cmat.

Author(s)

Michael Hallquist

Examples

  cmat <- rbind('overall'=c(1, 0.333, 0.333, 0),
                'c1_gt_c2'=c(0, 1, 0, 0),
                'c2_gt_c3'=c(0, 1, -1, 0),
                'c1_gt_c3'=c(0, 0, -1, 0))

  result <- generate_fsf_contrast_syntax(cmat)


PennStateDEPENdLab/dependlab documentation built on April 10, 2024, 5:15 p.m.