BayesGLM2 | R Documentation |
Performs group-level Bayesian GLM estimation and inference using the joint approach described in Mejia et al. (2020).
BayesGLM2(
results,
contrasts = NULL,
quantiles = NULL,
excursion_type = NULL,
contrast_names = NULL,
gamma = 0,
alpha = 0.05,
nsamp_theta = 50,
nsamp_beta = 100,
num_cores = NULL,
verbose = 1
)
results |
Either (1) a length |
contrasts |
(Optional) A list of contrast vectors that specify the
group-level summaries of interest. If Each contrast vector is length For a single session/subject, the contrast vector for the first field would be:
so the full contrast vector for the group average over all sessions/subjects for the first field would be:
To obtain the group average for the first field, for just the first session, input zeros for the remaining sessions:
To obtain the group mean difference between two sessions (
To obtain the mean over sessions of the first field, just for the first subject:
|
quantiles |
(Optional) Vector of posterior quantiles to return in addition to the posterior mean. |
excursion_type |
(For inference only) The type of excursion function for
the contrast (">", "<", "!="), or a vector thereof (each element
corresponding to one contrast). If |
contrast_names |
(Optional) Names of contrasts. |
gamma |
(For inference only) Activation threshold for the excursion set,
or a vector thereof (each element corresponding to one contrast). Default:
|
alpha |
(For inference only) Significance level for activation for the
excursion set, or a vector thereof (each element corresponding to one
contrast). Default: |
nsamp_theta |
Number of theta values to sample from posterior. Default:
|
nsamp_beta |
Number of beta vectors to sample conditional on each theta
value sampled. Default: |
num_cores |
The number of cores to use for sampling betas in parallel. If
|
verbose |
|
A list containing the estimates, PPMs and areas of activation for each contrast.
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.