Gamma(1/a, 1/a)pc-gamma.RdFunctions 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)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.
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)
#> [1] 0.5