sim.adaptiveGMRF2COVAR {adaptsmoFMRI} | R Documentation |
Adaptive GMRF Model for Simulated Data
Description
This function estimates the effects of a synthetic spatiotemporal data set resembling 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
sim.adaptiveGMRF2COVAR(data, hrf, approximate = FALSE, K
= 500, a = 1, b = 1, c = 1, d = 1, nu = 1, block = 1,
burnin = 1, thin = 1)
Arguments
data |
simulated fMRI-data, needs to be an array of
dimension |
hrf |
haemodynamic response function, needs to be a
vector of length |
approximate |
logical, if |
K |
scalar, length of the MCMC path, hence iteration steps. |
a |
scalar, shape hyperparameter of the
inverse-gamma distribution of the variance parameter
( |
b |
scalar, scale hyperparameter of the inverse
gamma distribution of the variance parameter
( |
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
( |
nu |
scalar, shape and scale hyperparameter of the
gamma distribution of the interaction weights
( |
block |
scalar, when |
burnin |
scalar, defining the first iteration steps which should be omitted from MCMC path. |
thin |
scalar, only every |
Value
dx |
scalar, number of pixels in x-direction. |
dy |
scalar, number of pixels in y-direction. |
I |
scalar, number of pixels. |
iter |
scalar, number of MCMC iterations. |
coord |
matrix, coordinates of pixels. |
nei |
matrix, locations of weights in precision matrix. |
NEI |
scalar, number of weights. |
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.
Author(s)
Maximilian Hughes
Examples
# See example function for simulated data (one covariate).