Learn R Programming

ANTsR (version 0.3.3)

getASLNoisePredictors: Get nuisance predictors from ASL images

Description

Get nuisance predictors from ASL images

Usage

getASLNoisePredictors(aslmat, tc, noisefrac = 0.1, polydegree = "loess", 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, with a value of 0 indicating no detrending, or 'loess' for LOESS-based estimation of global time-series trends.
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
# for real data do img<-antsImageRead(getANTsRData("pcasl"),4)
set.seed(120)
img<-makeImage( c(10,10,10,20), rnorm(1000*20)+1 )
mask = getMask( getAverageOfTimeSeries( img ) )
aslmat <- timeseries2matrix( img, mask )
tc <- rep(c(0.5, -0.5), length.out=nrow(aslmat))
noise <- getASLNoisePredictors(aslmat, tc, k=2, npreds=2, noisefrac=0.5 )

Run the code above in your browser using DataLab