estimate_template {templateICAr} | R Documentation |
Estimate template
Description
Estimate template for Template ICA based on fMRI data
Usage
estimate_template(
BOLD,
BOLD2 = NULL,
GICA,
inds = NULL,
scale = c("global", "local", "none"),
scale_sm_surfL = NULL,
scale_sm_surfR = NULL,
scale_sm_FWHM = 2,
detrend_DCT = 0,
center_Bcols = FALSE,
normA = FALSE,
Q2 = 0,
Q2_max = NULL,
brainstructures = c("left", "right"),
mask = NULL,
keep_DR = FALSE,
FC = FALSE,
varTol = 1e-06,
maskTol = 0.1,
missingTol = 0.1,
usePar = FALSE,
wb_path = NULL,
verbose = TRUE
)
estimate_template.cifti(
BOLD,
BOLD2 = NULL,
GICA,
inds = NULL,
scale = c("global", "local", "none"),
scale_sm_surfL = NULL,
scale_sm_surfR = NULL,
scale_sm_FWHM = 2,
detrend_DCT = 0,
center_Bcols = FALSE,
normA = FALSE,
Q2 = 0,
Q2_max = NULL,
brainstructures = c("left", "right"),
keep_DR = FALSE,
FC = FALSE,
varTol = 1e-06,
maskTol = 0.1,
missingTol = 0.1,
usePar = FALSE,
wb_path = NULL,
verbose = TRUE
)
estimate_template.gifti(
BOLD,
BOLD2 = NULL,
GICA,
inds = NULL,
scale = c("global", "local", "none"),
scale_sm_surfL = NULL,
scale_sm_surfR = NULL,
scale_sm_FWHM = 2,
detrend_DCT = 0,
center_Bcols = FALSE,
normA = FALSE,
Q2 = 0,
Q2_max = NULL,
brainstructures = c("left", "right"),
keep_DR = FALSE,
FC = FALSE,
varTol = 1e-06,
maskTol = 0.1,
missingTol = 0.1,
usePar = FALSE,
wb_path = NULL,
verbose = TRUE
)
estimate_template.nifti(
BOLD,
BOLD2 = NULL,
GICA,
inds = NULL,
scale = c("global", "local", "none"),
detrend_DCT = 0,
center_Bcols = FALSE,
normA = FALSE,
Q2 = 0,
Q2_max = NULL,
mask = NULL,
keep_DR = FALSE,
FC = FALSE,
varTol = 1e-06,
maskTol = 0.1,
missingTol = 0.1,
usePar = FALSE,
wb_path = NULL,
verbose = TRUE
)
Arguments
BOLD , BOLD2 |
Vector of subject-level fMRI data in one of the following
formats: CIFTI file paths, If |
GICA |
Group ICA maps in a format compatible with |
inds |
Numeric indices of the group ICs to include in the template. If
If |
scale |
|
scale_sm_surfL , scale_sm_surfR , scale_sm_FWHM |
Only applies if
If If To create a |
detrend_DCT |
Detrend the data? This is an integer number of DCT bases
to use for detrending. If |
center_Bcols |
Center BOLD across columns (each image)? This
is equivalent to performing global signal regression. Default:
|
normA |
Scale each IC timeseries (column of |
Q2 , Q2_max |
Obtain dual regression estimates after denoising? Denoising is based on modeling and removing nuisance ICs. It may result in a cleaner estimate for smaller datasets, but it may be unnecessary (and time-consuming) for larger datasets. Set If |
brainstructures |
Only applies if the entries of |
mask |
Required if and only if the entries of |
keep_DR |
Keep the DR estimates? If |
FC |
Include the functional connectivity template? Default: |
varTol |
Tolerance for variance of each data location. For each scan,
locations which do not meet this threshold are masked out of the analysis.
Default: |
maskTol |
For computing the dual regression results for each subject:
tolerance for number of locations masked out due to low
variance or missing values. If more than this many locations are masked out,
a subject is skipped without calculating dual regression. If |
missingTol |
For computing the variance decomposition across all subjects:
tolerance for number of subjects masked out due to low variance or missing
values at a given location. If more than this many subjects are masked out,
the location's value will be |
usePar , wb_path |
Parallelize the DR computations over subjects? Default:
|
verbose |
Display progress updates? Default: |
Details
All fMRI data (entries in BOLD
and BOLD2
, and GICA
) must
be in the same spatial resolution.
Value
A list: the template
and var_decomp
with entries in
matrix format; the mask
of locations without template values due to
too many low variance or missing values; the function params
such as
the type of scaling and detrending performed; the dat_struct
which
can be used to convert template
and var_decomp
to
"xifti"
or "nifti"
objects if the BOLD
format was CIFTI
or NIFTI data; and DR
if isTRUE(keep_DR)
.
Use summary
to print a description of the template results, and
for CIFTI-format data use plot
to plot the template mean and variance
estimates. Use export_template
to save the templates to
individual RDS, CIFTI, or NIFTI files (depending on the BOLD
format).
Examples
nT <- 30
nV <- 400
nQ <- 7
mU <- matrix(rnorm(nV*nQ), nrow=nV)
mS <- mU %*% diag(seq(nQ, 1)) %*% matrix(rnorm(nQ*nT), nrow=nQ)
BOLD <- list(B1=mS, B2=mS, B3=mS)
BOLD <- lapply(BOLD, function(x){x + rnorm(nV*nT, sd=.05)})
GICA <- mU
estimate_template(BOLD=BOLD, GICA=mU)
## Not run:
estimate_template(
run1_cifti_fnames, run2_cifti_fnames,
gICA_cifti_fname, brainstructures="all",
scale="local", detrend_DCT=7, Q2=NULL, varTol=10
)
## End(Not run)