combineNuisancePredictors: Combine and reduce dimensionality of nuisance predictors.

Description Usage Arguments Value Author(s) Examples

View source: R/combineNuisancePredictors.R

Description

Combine and select nuisance predictors to maximize correlation between inmat and target.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
combineNuisancePredictors(
  inmat,
  target,
  globalpredictors = NA,
  maxpreds = 4,
  localpredictors = NA,
  method = "cv",
  k = 5,
  covariates = NA,
  ordered = FALSE
)

Arguments

inmat

Input predictor matrix.

target

Target outcome matrix.

globalpredictors

Global predictors of size nrow(inmat) by n, where n is the number of global predictors.

maxpreds

Maximum number of predictors to output.

localpredictors

Local predictor array of size nrow(inmat) by ncol(inmat) by m, where m is the number of local predictors.

method

Method of selecting noisy voxels. One of 'svd' or 'cv'. See Details.

k

Number of cross-validation folds.

covariates

Covariates to be considered when assessing prediction of target.

ordered

Can the predictors be assumed to be ordered from most important to least important, as in output from PCA? Computation is much faster if so.

Value

Array of size nrow(aslmat) by npreds, containing a timeseries of all the nuisance predictors. If localpredictors is not NA, array is of size nrow(aslmat) by ncol(aslmat) by npreds.

Author(s)

Benjamin M. Kandel, Brian B. Avants

Examples

1
2
3
4
5
6
7
8
9
set.seed(120)
simimg <- makeImage( c(10,10,10,20) , rnorm( 10*10*10*20)+1 )
moco <- antsMotionCalculation( simimg , moreaccurate=0)
# for real data use below
# moco <- antsMotionCalculation(getANTsRData("pcasl"))
aslmat <- timeseries2matrix(moco$moco_img, moco$moco_mask)
tc <- rep(c(0.5, -0.5), length.out=nrow(aslmat))
noise <- getASLNoisePredictors(aslmat, tc, 0.5 )
noise.sub <- combineNuisancePredictors(aslmat, tc, noise, 2)

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