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

View source: R/generate_fsf_ev_syntax.R

generate_fsf_ev_syntaxR Documentation

This function generates syntax for FSL Feat .fsf files for the EVs tab of a higher-level fMRI analysis. It accepts a numeric design matrix whose colum names correspond to individual EVs in the model

Description

This allows you to generate a design matrix dynamically based on a numeric matrix that has been setup in R using a function such as lm() to handle more complex designs appropriately. The syntax generated by this function can be combined with a .fsf template file to implement the entire LVL2 or LVL3 analysis setup.

Usage

generate_fsf_ev_syntax(inputs, dmat, group_membership = NULL)

Arguments

inputs

A vector of inputs (usually lower-level .feat directories) corresponding to rows of dmat.

dmat

A numeric matrix whose rows specify individual inputs and columns specify EVs. Columns should be named by EV!

group_membership

An optional vector specifying group membership of each row in dmat in order to estimate separate variances for multiple groups. If not specified, variances will be modeled as one group.

Value

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

Author(s)

Michael Hallquist

Examples

  dmat <- matrix(rnorm(1000), ncol=10)
  colnames(dmat) <- letters[1:10]

  inputs <- replicate(100, tempfile())

  result <- generate_fsf_ev_syntax(inputs, dmat)


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