leiv-internal {leiv} | R Documentation |
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 |
rel.tol |
the relative accuracy requested (see |
abs.tol |
the absolute accuracy requested (see |
Details
Internal functions for integrating the posterior density returned by the function leiv
. These functions are not meant to be called by the user.
Value
p50
returns a numeric scalar. probInt
returns a 2-dimensional numeric vector of interval endpoints.
Note
p
must accept a vector of inputs and produce a vector of function evaluations at those points.
rel.tol
cannot be less than max(50*.Machine$double.eps, 0.5e-28)
if abs.tol <= 0
.
See Also
leiv
for general information; integrate
for control parameters.