Learn R Programming

ANTsR (version 1.0)

getASLNoisePredictors: Get nuisance predictors from ASL images

Description

Get nuisance predictors from ASL images

Usage

getASLNoisePredictors(aslmat, tc, noisefrac = 0.1, polydegree = 3, k = 5,
  npreds = 12, method = "noisepool", covariates = NA,
  noisepoolfun = max)

Arguments

aslmat

ASL input matrix.

tc

Tag-control sawtooth pattern vector.

noisefrac

Fraction of data to include in noise pool.

polydegree

Degree of polynomial for detrending. A value of 0 indicates no detrending.

k

Number of cross-validation folds.

npreds

Number of predictors to output.

method

Method of selecting noisy voxels. One of 'compcor' or 'noisepool'. See Details.

covariates

Covariates to be considered when assessing prediction of tc pattern.

noisepoolfun

Function used for aggregating R^2 values.

Value

Matrix of size nrow(aslmat) by npreds, containing a timeseries of all the nuisance predictors.

Examples

Run this code
# NOT RUN {
# for real data do img<-antsImageRead(getANTsRData("pcasl"),4)
set.seed(120)
img<-makeImage( c(10,10,10,20), rnorm(1000*20)+1 )
moco <- antsMotionCalculation(img,moreaccurate=0)
aslmat <- timeseries2matrix(moco$moco_img, moco$moco_mask)
tc <- rep(c(0.5, -0.5), length.out=nrow(aslmat))
noise <- getASLNoisePredictors(aslmat, tc)
# }

Run the code above in your browser using DataLab