fit_bayesglm | R Documentation |
Performs spatial Bayesian GLM for task fMRI activation
fit_bayesglm(
BOLD,
design,
nuisance = NULL,
scrub = NULL,
spatial,
scale_BOLD = c("mean", "sd", "none"),
Bayes = TRUE,
hyperpriors = c("informative", "default"),
ar_order = 6,
ar_smooth = 5,
aic = FALSE,
n_threads = 4,
return_INLA = c("trimmed", "full", "minimal"),
verbose = 1,
meanTol = 1e-06,
varTol = 1e-06
)
BOLD , design , nuisance |
Session-length list of numeric matrices/arrays, each with volumes along the first dimension. |
scrub |
Session-length list of spike regressors: numeric matrices, with volumes along the first dimension, valued at 1 for scrubbed volumes and 0 otherwise. Scrubbing is performed by incorporating spike regressors in the nuisance matrix during nuisance regression (in a simultaneous framework), and then removing the scrubbed timepoints from the resulting BOLD and design. |
spatial |
Gives the spatial information:
For voxel data, a list of six:
|
scale_BOLD |
Controls scaling the BOLD response at each location.
|
Bayes |
Perform spatial Bayesian modeling? Default: |
hyperpriors |
Should informative or default non-informative hyperpriors be assumed on SPDE hyperparameters? |
ar_order |
(For prewhitening) The order of the autoregressive (AR) model
to use for prewhitening. If For multi-session modeling, note that a single AR model is used; its coefficients will be the average estimate from each session. |
ar_smooth |
(For prewhitening) The FWHM parameter for spatially
smoothing the coefficient estimates for the AR model to use for
prewhitening. Recall that
|
aic |
(For prewhitening) Use the Akaike information criterion (AIC) to
select AR model orders between |
n_threads |
The maximum number of threads to use for parallel
computations: prewhitening parameter estimation, and the inla-program model
estimation. Default: |
return_INLA |
Return the INLA model object? (It can be large.) Use
|
verbose |
|
meanTol , varTol |
Tolerance for mean, variance and SNR of each data location.
Locations which do not meet these thresholds are masked out of the analysis.
Default: |
A "BayesGLM"
object: a list with elements
The full result of the call to INLA::inla
.
The estimated coefficients for the Bayesian model.
Results from the classical model: field estimates, field standard error estimates, residuals, degrees of freedom, and the mask.
The model mesh.
A mask of mesh
indicating the locations inside mesh
.
The design matrix, after centering and scaling, but before any nuisance regression or prewhitening.
The names of the fields.
The names of the sessions.
Hyperparameter posterior densities.
Theta estimates from the Bayesian model.
For joint group modeling.
For joint group modeling.
For joint group modeling.
For joint group modeling: The BOLD data after any centering, scaling, nuisance regression, or prewhitening.
For joint group modeling: The design matrix after any centering, scaling, nuisance regression, or prewhitening.
Vectors of values across locations: phi
(AR coefficients averaged across sessions), sigma_sq
(residual variance averaged across sessions), and AIC (the maximum across sessions).
match.call() for this function call.
This function requires the INLA
package, which is not a CRAN package.
See https://www.r-inla.org/download-install for easy installation instructions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.