compcor.Rd
Compcors the input matrix using SVD and returns the result.
compcor(
fmri,
ncompcor = 4,
variance_extreme = 0.975,
mask = NULL,
randomSamples = 1,
returnv = FALSE,
returnhighvarmat = FALSE,
returnhighvarmatinds = FALSE,
highvarmatinds = NA,
scale = TRUE
)
input fmri image or matrix
n compcor vectors
high variance threshold e.g 0.95 for 95 percent
optional mask for image
take this many random samples to speed things up
return the spatial vectors
bool to return the high variance matrix
bool to return the high variance matrix indices
index list
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.
dataframe of nuisance predictors is output