Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for the range parameter in the PRW2 model.

prw2.d(rho)

Arguments

n

Number of observations

param

Vector of parameters (see 'inla.doc("pc.prw2.range")')

q

Vector of quantiles

x

Vector of quantiles

p

Vector of probabilities

Value

inla.prw2.drange gives the density, inla.prw2.prange gives the distribution function, inla.prw2.qrange gives the quantile function, and inla.prw2.rrange generates random deviates.

Details

The statement Prob(range > r0) = alpha is used to determine lambda unless lambda is given.

Note

The 'r' and 'q' functions are quite slow as the quantile-function needs to be computed.

See also

inla.doc("pc.prw2.range")

Author

Havard Rue hrue@r-inla.org

Examples


    param <- c(10, 0.5, 1, 0)
    p <- inla.prw2.prange(10, param)
    q <- inla.prw2.qrange(p, param)
    print(c(10, q))
#> [1] 10.000000  9.999999