pc.gamma {INLA} | R Documentation |
Gamma(1/a, 1/a)
Functions to evaluate, sample, compute quantiles and
percentiles of the PC prior for Gamma(1/a, 1/a)
inla.pc.rgamma(n, lambda = 1) inla.pc.dgamma(x, lambda = 1, log = FALSE) inla.pc.qgamma(p, lambda = 1) inla.pc.pgamma(q, lambda = 1)
n |
Number of observations |
lambda |
The rate parameter (see Details) |
x |
Evaluation points |
log |
Logical. Return the density in natural or log-scale. |
p |
Vector of probabilities |
q |
Vector of quantiles |
This gives the PC prior for the Gamma(1/a, 1/a)
case, where a=0
is the
base model.
inla.pc.dgamma
gives the density,
inla.pc.pgamma
gives the distribution function,
inla.pc.qgamma
gives the quantile function, and
inla.pc.rgamma
generates random deviates.
Havard Rue hrue@r-inla.org
inla.doc("pc.gamma")
x = inla.pc.rgamma(100, lambda = 1) d = inla.pc.dgamma(x, lambda = 1) x = inla.pc.qgamma(0.5, lambda = 1) inla.pc.pgamma(x, lambda = 1)