Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for the alpha parameter in the Weibull likelihood

inla.pc.ralphaw(n, lambda = 5)
 inla.pc.dalphaw(alpha, lambda = 5, log = FALSE)
 inla.pc.qalphaw(p, lambda = 5)
 inla.pc.palphaw(q, lambda = 5)

Arguments

n

Number of observations

lambda

The rate parameter in the PC-prior

alpha

Vector of evaluation points, where alpha>0.

log

Logical. Return the density in natural or log-scale.

p

Vector of probabilities

q

Vector of quantiles

Details

This gives the PC prior for the alpha parameter for the Weibull likelihood, where alpha=1 is the base model.

Value

inla.pc.dalphaw gives the density, inla.pc.palphaw gives the distribution function, inla.pc.qalphaw gives the quantile function, and inla.pc.ralphaw generates random deviates.

See also

inla.doc("pc.alphaw")

Author

Havard Rue hrue@r-inla.org

Examples

 x = inla.pc.ralphaw(100,  lambda = 5)
 d = inla.pc.dalphaw(x, lambda = 5)
 x = inla.pc.qalphaw(0.5, lambda = 5)
 inla.pc.palphaw(x, lambda = 5)
#> [1] 0.5