Functions to evaluate, sample, compute quantiles and percentiles of the PC prior for the concentration in the von Mises distribution.

inla.pc.rvminf(n, u, alpha, lambda)

inla.pc.dvminf(k, u, alpha, lambda, log = FALSE)

inla.pc.qvminf(p, u, alpha, lambda, len = 2048L)

inla.pc.pvminf(q, u, alpha, lambda, log = FALSE)

Arguments

n

Number of observations

u

The upper limit (0 < u < 2*pi). The small values of u indicate a high concentration to a point mass, whilst large values of u mean that the user believes the data spread widely.

alpha

The probability going above the upper limit (the probability assigned to the event Prob(2*pi/(1+k) > u)).

lambda

The rate parameter.

k

The concentration of von Mises distribution

log

Logical. Return the density in natural or log-scale.

p

Vector of probabilities.

q

Vector of quantiles.

Value

inla.pc.dvminf gives the density, inla.pc.pvminf gives the distribution function, inla.pc.qvminf gives the quantile function, and inla.pc.rvminf generates random deviates.

Details

The statement Prob(2*pi/(1+k) > u) = alpha is used to determine lambda unless lambda is given. Either lambda must be given, or u AND alpha.

Due to limitations in handling extreme values for special functions, the output of these functions may exhibit bias when the input parameter values are either excessively large or very close to zero.

See also

inla.doc("pc.vminf")

Author

Xiang Ye xiang.ye@kaust.edu.sa

Examples


 k = inla.pc.rvminf(100,  lambda = 1)
 d = inla.pc.dvminf(1, lambda = 1)
 k = inla.pc.qvminf(0.5, u = 1, alpha=0.01)
#> Error in splinefun(x, y, method = "monoH.FC"): length(m) must be at least two
 inla.pc.pvminf(5, u = 1, alpha=0.01)
#> [1] 0