singleHdi-methods: Highest density intervals for 'LuckModel's

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Returns the bounds of a highest density (HD) interval for a single distribution defined by the canonical parameters used in the definition of LuckModels.

Usage

1
singleHdi(object, n, y, gamma)

Arguments

object

An object of a class extending LuckModel, e.g., ScaledNormalLuckModel. (Plain LuckModel objects implement the general superstructure for canonical conjugate priors and thus do not specify a certain parametric family of priors.)

n, y

The canonical parameters n^(0) resp. y^(0) defining the distribution for which to calculate values of the cdf.

gamma

The coverage probability of the HD interval.

Details

The object is needed for method dispatching only; its class tells singleHdi the parametric family the object represents, i.e., how to interpret the canonical parameters n^(0) and y^(0) and which functional form the cdf has for that family. n and y may thus be any value that is admissible for the parametric family, and need not be within the set of parameters defined in object.

Value

A two-element vector containing the lower and the upper bound of the HD interval.

Author(s)

Gero Walter

See Also

luck for a general description of the package, unionHdi for calculating the union of prior or posterior HD intervals for a certain LuckModel.

Examples

1
2
3
4
scn1 <- ScaledNormalLuckModel(n0=c(2,10), y0=c(-5,5))
singleHdi(scn1, n=1, y=0, gamma=0.95)
ex1 <- ExponentialLuckModel(n0=5, y0=c(3,4))
singleHdi(ex1, n=1, y=5, gamma=0.95)

luck documentation built on May 2, 2019, 4:43 p.m.