View source: R/fsl_generate_fsf_contrast_syntax.R
fsl_generate_fsf_contrast_syntax | R Documentation |
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.
fsl_generate_fsf_contrast_syntax(cmat, ftests = NULL, include_overall = TRUE)
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. |
A character vector containing .fsf syntax for the contrasts portion of a Feat analysis based on cmat
.
Michael Hallquist
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 <- fsl_generate_fsf_contrast_syntax(cmat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.