compcor: Compcors the input matrix using SVD and returns the result.

Description Usage Arguments Value Author(s) Examples

View source: R/compcor.R

Description

Compcors the input matrix using SVD and returns the result.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
compcor(
  fmri,
  ncompcor = 4,
  variance_extreme = 0.975,
  mask = NULL,
  randomSamples = 1,
  returnv = FALSE,
  returnhighvarmat = FALSE,
  returnhighvarmatinds = FALSE,
  highvarmatinds = NA,
  scale = TRUE
)

Arguments

fmri

input fmri image or matrix

ncompcor

n compcor vectors

variance_extreme

high variance threshold e.g 0.95 for 95 percent

mask

optional mask for image

randomSamples

take this many random samples to speed things up

returnv

return the spatial vectors

returnhighvarmat

bool to return the high variance matrix

returnhighvarmatinds

bool to return the high variance matrix indices

highvarmatinds

index list

scale

scale the matrix of high variance voxels, default FALSE. note that you may get slightly different results by scaling the input matrix before passing into this function.

Value

dataframe of nuisance predictors is output

Author(s)

Avants BB

Examples

1
2
mat <- matrix( rnorm(50000) ,ncol=500)
compcorrdf<-compcor( mat )

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