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.
sim.adaptiveGMRF2COVAR(data, hrf, approximate = FALSE, K
= 500, a = 1, b = 1, c = 1, d = 1, nu = 1, block = 1,
burnin = 1, thin = 1)
scalar, number of pixels in x-direction.
scalar, number of pixels in y-direction.
scalar, number of pixels.
scalar, number of MCMC iterations.
matrix, coordinates of pixels.
matrix, locations of weights in precision matrix.
scalar, number of weights.
matrix, MCMC path of covariates.
matrix, MCMC path of weights.
matrix, MCMC path of variance parameters.
matrix, MCMC path of hyper parameters.
simulated fMRI-data, needs to be an array of
dimension (20 x 20 x T).
haemodynamic response function, needs to be a
vector of length T.
logical, if TRUE then the
approximate case is chosen. Default is FALSE.
scalar, length of the MCMC path, hence iteration steps.
scalar, shape hyperparameter of the inverse-gamma distribution of the variance parameter (\(\sigma_i^2\)).
scalar, scale hyperparameter of the inverse gamma distribution of the variance parameter (\(\sigma_i^2\)).
scalar, shape hyperparameter of the inverse gamma distribution of the precision parameter (\(\tau\)).
scalar, scale hyperparameter of the inverse gamma distribution of the precision parameter (\(\tau\)).
scalar, shape and scale hyperparameter of the gamma distribution of the interaction weights (\(w_{ij}\)).
scalar, when approximate==TRUE then a
block of weights is updated at a time.
scalar, defining the first iteration steps which should be omitted from MCMC path.
scalar, only every thin step of MCMC
path is saved to output.
Maximilian Hughes
# See example function for simulated data (one covariate).
Run the code above in your browser using DataLab