leiv-internal: Probability Density Utilities

Description Usage Arguments Details Value Note See Also

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

1
2
3
4
5
6
7
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).

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.


leiv documentation built on May 30, 2017, 8:19 a.m.