pc-utils: Internal functions to check PC-prior parameters.

pc-utilsR Documentation

Internal functions to check PC-prior parameters.

Description

Internal functions to check PC-prior parameters.

Usage

pcParamCheck(npars, reference, probability)

pclrange(lrange, lam, d = 2, log = FALSE)

pcrange(range, lam, d = 2, log = FALSE)

Arguments

npars

number of parameters.

reference

numeric vector to set the reference for each parameter for its PC-prior.

probability

numeric vector with to set the probability statement of the PC prior for each parameter. For sigma probability statement is P(sigma > reference) = p whereas for range it is P(range < reference). If NA, 0 or 1, the corresponding reference will be used as fixed. If missing, all the parameters considered as known (fixed) and equal the corresponding reference value.

lrange

numeric with the log of the (practical) range

lam

numeric with the prior parameter

d

integer to specify the domain dimention

log

logical indicating if the density is to be returned in the log scale

range

numeric with the of the (practical) range.

Functions

  • pcParamCheck(): Check the PC-prior arguments.

  • pclrange(): Penalized Complexity (PC) prior for the log of the practical range.

  • pcrange(): Penalized Complexity (PC) prior for the practical range.

Examples

# P(range < 2.0) = 0.1
 lam <- -log(0.1) * 2.0
 plot(function(x) pcrange(x, lam), 1/100, 10, n = 100)

INLAtools documentation built on April 22, 2026, 5:10 p.m.