adaptiveGMRF2COVAR: Adaptive GMRF Model (Real Data)

View source: R/adaptive-gmrf-2covar.R

adaptiveGMRF2COVARR Documentation

Adaptive GMRF Model (Real Data)

Description

This function estimates the effects of functional MR Images (fMRI), with the method of efficient Markov Chain Monte Carlo (MCMC) simulation. The Metropolis Hastings (MH) algorithm is used for the non-approximate case and the Gibbs sampler for the approximate case.

Usage

  adaptiveGMRF2COVAR(data, hrf, approximate = FALSE, K =
    500, a = 0.001, b = 0.001, c = 0.001, d = 0.001, nu =
    1, filter = NULL, block = 1, burnin = 1, thin = 1)

Arguments

data

fMRI-data, needs to be an array of dimension (dx x dy x T).

hrf

haemodynamic response function, needs to be a vector of length T.

approximate

logical, if TRUE then the approximate case is choosen. Def#' ault is FALSE.

K

scalar, length of the MCMC path, hence iteration steps.

a

scalar, shape hyperparameter of the inverse-gamma distribution of the variance parameter (σ_i^2).

b

scalar, scale hyperparameter of the inverse gamma distribution of the variance parameter (σ_i^2).

c

scalar, shape hyperparameter of the inverse gamma distribution of the precision parameter (τ).

d

scalar, scale hyperparameter of the inverse gamma distribution of the precision parameter (τ).

filter

scalar, a value between 0 and 1 defining to which extent the fMRI-data should be filtered. The corresponding formular is max(fmri)*filter.

nu

scalar, shape and scale hyperparameter of the gamma distribution of the interaction weights (w_{ij}).

block

scalar, when approximate==TRUE then a block of weights is updated at a time.

burnin

scalar, defining the first iteration steps which should be omitted from MCMC path.

thin

scalar, only every thin step of MCMC path is saved to output.

Value

dx

scalar, number of pixels in x-direction.

dy

scalar, number of pixels in y-direction.

I

scalar, number of pixels.

coord

matrix, coordinates of pixels.

NEI

scalar, number of weights.

nei

matrix, locations of weights in precision matrix.

mask

matrix, masked out pixels.

beta.out

matrix, MCMC path of covariates.

w.out

matrix, MCMC path of weights.

sigma.out

matrix, MCMC path of variance parameters.

tauk.out

matrix, MCMC path of hyper parameters.

Note

This function is solely for two covariates and real data sets.

Author(s)

Maximilian Hughes

Examples

# See example function for simulated data (one covariate).

adaptsmoFMRI documentation built on Sept. 25, 2022, 5:06 p.m.