Learn R Programming

leiv (version 2.0-7)

leiv-internal: Probability Density Utilities

Description

p50 calculates the median of the leiv posterior probability density. probInt calculates the shortest probability interval of the leiv posterior probability density for a given probability level.

Usage

p50(p, interval, subdivisions = 100, rel.tol = .Machine$double.eps^0.25, abs.tol = rel.tol)
probInt(p, interval, level, subdivisions = 100, rel.tol = .Machine$double.eps^0.25, abs.tol = rel.tol)

Arguments

p
a normalized probability density function.
interval
a vector containing the endpoints of the interval to be searched.
level
the probability level requested.
subdivisions
the maximum number of subintervals (see integrate).
rel.tol
the relative accuracy requested (see integrate).
abs.tol
the absolute accuracy requested (see integrate, optimize and uniroot).

Value

p50 returns a numeric scalar. probInt returns a 2-dimensional numeric vector of interval endpoints.

Details

Internal functions for integrating the posterior density returned by the function leiv. These functions are not meant to be called by the user.

See Also

leiv for general information; integrate for control parameters.