mwgGamma {nclbayes} | R Documentation |
Simulates realisations from the posterior distribution for the index and shape parameters in a gamma distribution based on a random sample and independent gamma priors by using a Metropolis within Gibbs algorithm and a normal random walk proposal for the index parameter.
mwgGamma(N, initial, innov, priorparam, n, xbar, xgbar, show = TRUE)
N |
length of MCMC chain. |
initial |
starting value for the algorithm. |
innov |
standard deviation of normal random walk innovation for index parameter. |
priorparam |
prior parameters a,b,c,d. |
n |
size of random sample. |
xbar |
(arithmetic) mean of random sample. |
xgbar |
geometric mean of random sample. |
show |
a logical. If TRUE then acceptance rate for the proposals will be given. |
mcmcAnalysis(mwgGamma(100,(0.62/0.4)^2,0.8,c(2,1,3,1),50,0.62,0.46),rows=2)