Description Usage Arguments Value Author(s) See Also
This function implements Gibbs sampling with Metropolis-Hasting algorithm to sample from posterior distributions for the proposed Bayesian statistical model. This function is used in parallel computing of MCMC algorithm
1 2 | parDA_GIBBS(outW, theta, prior_theta, ADtheta, N, Lj, niter = 20000,
start_adapting = 500)
|
outW |
a 7 by 1 list containing precomputed quantities associated with W from the output of function computeW(...) |
theta |
a list of 3 elements contained in parameters in the MCMC algorithm |
prior_theta |
a list of 2 elements, each of whcih is the quantity in the prior distribution of lambda |
ADtheta |
a list of 6 elements, each of which is the parameter in the corresponding proposal distribution |
N |
an integer representing the number of ensemble members |
Lj |
an m by 1 vector containing the number of runs for each forcing scenario |
niter |
an integer specifying the total number of MCMC iterations |
start_adapting |
an integer specifiying when to adapt proposal in the MCMC algorithm |
a list of 6 elements containing posterior quantities of parameters, log-likelihood, chisq statistics, and prior:
beta: a matrix holds the posterior samples for the parameter beta with each row corresponding to each beta
logsigma: a vector holds the posterior samples for the parameter log of sigma
lambda: a vector holds the posterior samples for the parameter lambda
loglik: a vector holds the log-likelihood evaluated with updated parameters
chisq: a vector holds chisquare statistics for residual consistency test
prior: a vector holds the prior density evaluated with updated parameters
Pulong Ma <mpulong@gmail.com>
DA_GIBBS
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.