pc-gamma: Utility functions for the PC prior for 'Gamma(1/a, 1/a)'

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for Gamma(1/a, 1/a)

Usage

1
2
3
4
5
 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)
 

Arguments

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

Details

This gives the PC prior for the Gamma(1/a, 1/a) case, where a=0 is the base model.

Value

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.

Author(s)

Havard Rue hrue@r-inla.org

See Also

inla.doc("pc.gamma")

Examples

1
2
3
4
5
 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)
 

INBO-BMK/INLA documentation built on Dec. 4, 2019, 11:43 p.m.