qInverseTau2: Quantiles, shape, and rate of the prior for the inverse of...

Description Usage Arguments Value Examples

Description

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.

Usage

1
qInverseTau2(eta.0 = 1800, m2.0 = 100, mn, sd)

Arguments

eta.0

hyperparameter for precision

m2.0

hyperparameter for precision

mn

mean of precision

sd

standard deviation of precision

Value

a list with elements 'quantiles', 'eta.0', 'm2.0', 'mean', and 'sd'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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

CNPBayes documentation built on May 6, 2019, 4:06 a.m.