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

`"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.

1 |

`n0` |
A (1x2)- |

`y0` |
A |

`data` |
An object of class |

`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`

.

`LuckModel`

objectsThere 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 `LuckModel`

s 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`

.

Gero Walter

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

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

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 31, 2017, 1:52 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.