pc-cor0.RdFunctions to evaluate, sample, compute quantiles and percentiles of the PC prior for the correlation in the Gaussian AR(1) model where the base-model is zero correlation.
inla.pc.rcor0(n, u, alpha, lambda)
inla.pc.dcor0(cor, u, alpha, lambda, log = FALSE)
inla.pc.qcor0(p, u, alpha, lambda)
inla.pc.pcor0(q, u, alpha, lambda)inla.pc.dcor0 gives the density, inla.pc.pcor0
gives the distribution function, inla.pc.qcor0 gives the quantile
function, and inla.pc.rcor0 generates random deviates.
The statement Prob(|cor| > u) = alpha is used to determine
lambda unless lambda is given. Either lambda must be
given, or u AND alpha. The density is symmetric around zero.
inla.doc("pc.rho0")
cor = inla.pc.rcor0(100, lambda = 1)
d = inla.pc.dcor0(cor, lambda = 1)
cor = inla.pc.qcor0(c(0.3, 0.7), u = 0.5, alpha=0.01)
inla.pc.pcor0(cor, u = 0.5, alpha=0.01)
#> [1] 0.3 0.7