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.
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).
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.