qInverseTau2 {CNPBayes} | R Documentation |
The precision prior for tau2 in the hiearchical model is given by gamma(shape, rate). The shape and rate are a function of the hyperparameters eta.0 and m2.0. Specifically, shape=1/2*eta.0 and the rate=1/2*eta.0*m2.0. Quantiles for this distribution and the shape and rate can be obtained by specifying the hyperparameters eta.0 and m2.0, or alternatively by specifying the desired mean and standard deviation of the precisions.
qInverseTau2(eta.0 = 1800, m2.0 = 100, mn, sd)
eta.0 |
hyperparameter for precision |
m2.0 |
hyperparameter for precision |
mn |
mean of precision |
sd |
standard deviation of precision |
a list with elements 'quantiles', 'eta.0', 'm2.0', 'mean', and 'sd'
results <- qInverseTau2(mn=100, sd=1) precision.quantiles <- results$quantiles sd.quantiles <- sqrt(1/precision.quantiles) results$mean results$sd results$eta.0 results$m2.0 results2 <- qInverseTau2(eta.0=1800, m2.0=100) ## Find quantiles from the default set of hyperparameters hypp <- Hyperparameters(type="batch") results3 <- qInverseTau2(eta.0(hypp), m2.0(hypp)) default.precision.quantiles <- results3$quantiles