addSignal: Loads NIfTI Images and Adds Synthetic Signal

Description Usage Arguments Value

View source: R/addSignal.R

Description

This function loads images specified in filelist and adds signal to the images. The amount and structure of signal is determined by betaimg and X. The output images are equal the images specified by filelist plus betaimg times the column of X that is not in Xred. This column is first residualized to Xred.

Usage

1
2
addSignal(files, betaimg, X, Xred, outfiles = NULL,
  standardize = FALSE)

Arguments

files

a vector of .nii or .nii.gz images.

betaimg

a parameter image that describes the association between X and the images in filelist. The units of this are standardized so that it is like effect size.

X

the design matrix for all covariates included in the simulation model fit.

Xred

the design matrix for all covariates except the column that is being multiplied by betaimg. Xred must have only one less column than X.

outfiles

a vector of images to save the output.

standardize

Roughly standardize X and Y, so that the signal is homogenous across voxels and equal to effect size (roughly).

Value

Returns a 4d array of imaging data with synthetic signal added. The first three dimensions are equal to dim(betaimg) and the 4th dimension indexes subject.


neuroconductor-devel/pbj documentation built on May 7, 2021, 7:53 p.m.