LuckModel-class: Class '"LuckModel"' and its constructor function...

Description Usage Arguments Slots of the resulting object Methods for LuckModel objects Author(s) References See Also Examples

Description

"LuckModel" objects describe an abstract set of conjugate priors for imprecise Bayesian inference via the set of canonical parameters y^(0) and n^(0). Pure LuckModel objects (that are not simultaneously instances of a subclass inheriting from LuckModel) are useful only for studying the parameter update step and the shapes of posterior parameter sets. For data-based inferences, classes inherting from LuckModel must be used, see, e.g., ScaledNormalLuckModel and ExponentialLuckModel.

Objects can be created using the constructor function LuckModel() described below.

Usage

1
LuckModel(n0, y0, data = new("LuckModelData"))

Arguments

n0

A (1x2)-matrix, with the first element the lower bound and the second element the upper bound for n^(0). Alternatively, a two-element vector containing lower and upper bound. If a single value is given, it is taken as lower and upper bound, such that a model with fixed n^(0) is specified.

y0

A matrix with two columns and p rows, where p is the dimension of the canonical parameter y^(0) (depending on the distribution family of the prior). The first column gives the lower, the second column the upper bound for y^(0). Lower and upper bound may coincide to specify a model with fixed y^(0). Alternatively, a vector containing first the lower bounds for all dimensions and then the upper bounds for all dimensions. If a single value is given, a LUCK model with one-dimensional and fixed y^(0) is assumed.

data

An object of class LuckModelData, or, alternatively, a vector or list of arguments that its constructor function LuckModelData() can handle. The LuckModelData object must fit the definition of the LuckModel, i.e. tau from the LuckModelData object must have the same dimension p as y0. Default value is a default LuckModelData object containing no data that can be replaced later by data(object) <- .

Slots of the resulting object

n0:

n^(0), the "prior strength" parameter set, is stored as a (1x2)-matrix, with the first element the lower bound and the second element the upper bound.

y0:

The range of y^(0), the "main parameter", is stored as a (px2)-matrix, with the first column giving the lower bound(s) and the second column giving the upper bound(s) of dimensions 1 to p.

data:

Object of class LuckModelData, containing the sample statistic τ(x) and the sample size n. For details, see LuckModelData.

Methods for LuckModel objects

There are methods to access or replace the contents of the slots:

n0

signature(object = "LuckModel")

n0<-

signature(object = "LuckModel")

y0

signature(object = "LuckModel")

y0<-

signature(object = "LuckModel")

data

signature(object = "LuckModel")

data<-

signature(object = "LuckModel")

There are methods to display LuckModels by text or graphically:

show

signature(object = "LuckModel"): This is invoked when printing a LuckModel.

plot

signature(x = "LuckModel", y = "missing"): This plots the prior or posterior set of canonical parameters, with n^(0) as the abscissa and y^(0) as the ordinate. See plot.

There are two exemplary functions for inference tasks implemented so far. These make sense for non-abstract subclasses of LuckModel only, and will result in an error if called with a plain LuckModel as argument. Examples for these are thus given in ScaledNormalLuckModel and ExponentialLuckModel .

cdfplot

signature(object = "LuckModel"): This displays the range of cumulative density functions as defined by the set of prior or posterior parameters, see cdfplot.

unionHdi

signature(object = "LuckModel"): This calculates the union of highest density intervals for the prior or posterior set of distributions, see unionHdi.

Author(s)

Gero Walter

References

Gero Walter and Thomas Augustin (2009), Imprecision and Prior-data Conflict in Generalized Bayesian Inference, Journal of Statistical Theory and Practice 3:255-271.

See Also

luck for a general description of the package, LuckModelData as the class for the data slot, updateLuckY and updateLuckN for the functions that calculate the posterior canonical parameters, ScaledNormalLuckModel and ExponentialLuckModel for non-abstract subclasses intended for analysis of scaled normal or exponential data, respectively.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# generate a generalized iLUCK model
luck1 <- LuckModel(n0=c(2,10), y0=c(3, 4))
luck1
# access and replace slots
n0(luck1)
n0(luck1) <- 5
y0(luck1) <- c(0,5)
data(luck1)
data(luck1) <- LuckModelData(tau=20, n=10)
# plot prior and posterior parameter sets
par(mfrow=c(1,2))
plot(luck1)
plot(luck1, control = controlList(posterior = TRUE))
par(mfrow=c(1,1))

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