beta.posterior.thetasamp: Beta posterior theta sampling

View source: R/BayesGLM2_Bayes_utils.R

beta.posterior.thetasampR Documentation

Beta posterior theta sampling

Description

Internal function used in joint approach to group-analysis

Usage

beta.posterior.thetasamp(
  theta,
  spde,
  Xcros,
  Xycros,
  contrasts,
  quantiles,
  excursion_type,
  gamma,
  alpha,
  nsamp_beta = 100
)

Arguments

theta

A single sample of theta (hyperparameters) from q(theta|y)

spde

A SPDE object from inla.spde2.matern() function.

Xcros

A crossproduct of design matrix.

Xycros

A crossproduct of design matrix and BOLD y.

contrasts

A list of vectors of length M*K specifying the contrasts of interest.

quantiles

Vector of posterior quantiles to return in addition to the posterior mean

excursion_type

Vector of excursion function type (">", "<", "!=") for each contrast

gamma

Vector of activation thresholds for each contrast

alpha

Significance level for activation for the excursion sets

nsamp_beta

The number of samples to draw from full conditional of beta given the current value of theta (p(beta|theta,y))

Value

A list containing mu, quantiles, and F

INLA Requirement

This function requires the INLA package, which is not a CRAN package. See https://www.r-inla.org/download-install for easy installation instructions.


mandymejia/BayesfMRI documentation built on April 12, 2025, 3:44 p.m.