taskFMRI: Simple taskFMRI function.

Description Usage Arguments Value Author(s) Examples

View source: R/taskFMRI.R

Description

Input 4D time series matrix. (Perform slice timing correction externally). Estimate hemodynamicRF from block design. Compute brain mask on average bold image. Get nuisance variables : motion , compcor , globalsignal. High-frequency filter the time series ( externally ). Correct for autocorrelation using bullmore 1996 MRM and AR(2) model with parameters derived from global residual signal. Estimate final glm.

Usage

1
2
3
4
5
6
7
8
taskFMRI(
  mat,
  hrf,
  myvars,
  correctautocorr = FALSE,
  residualizedesignmatrix = FALSE,
  myformula = NA
)

Arguments

mat

input matrix

hrf

input hrf

myvars

output of getfMRInuisanceVariables

correctautocorr

correction auto correlation boolean

residualizedesignmatrix

boolean

myformula

statistical equation to be assessed at each voxel

Value

list of betas and other names entries is output

Author(s)

Avants BB

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# read the fmri image in and maybe do slice timing correction
  fmri<-getANTsRData("pcasl")
  fmri<-antsImageRead( fmri )
#  fmri<-iMath(fmri,"SliceTimingCorrection","bspline") # optional
  myvars<-getfMRInuisanceVariables( fmri, moreaccurate = 0, maskThresh=100 )
  mat <- myvars$matrixTimeSeries
  mat<-frequencyFilterfMRI(mat, 2.5, freqLo=0.01, freqHi=0.1, opt="butt")
  blockfing = c(0, 36, 72 )
  hrf <- hemodynamicRF( scans=dim(fmri)[4] , onsets=blockfing ,
    durations=rep(  12,  length( blockfing ) ) ,  rt=2.5 )
  activationBeta<-taskFMRI(  mat , hrf , myvars )

## End(Not run)

neuroconductor-devel/ANTsR documentation built on April 1, 2021, 1:02 p.m.