Description Usage Arguments Details Slots of the resulting object Methods for ExponentialLuckModel objects Author(s) References See Also Examples
"ExponentialLuckModel"
objects describe a set of conjugate Gamma priors for
imprecise Bayesian inference about exponetially distributed data X[i] ~ Exp(lambda).
The set of Gamma priors on lambda is defined
via the set of canonical parameters y^(0) and n^(0).
ExponentialLuckModel
extends the class LuckModel
.
Objects can be created using the constructor function ExponentialLuckModel()
described below.
1 2 |
arg1 |
Used for treatment of unnamed arguments only, see Details. |
n0 |
A (1x2)- |
y0 |
A (1x2)- |
data |
An object of class |
ExponentialLuckModel
objects can be created by one of the two following ways:
By supplying a LuckModel
object as the only (unnamed) argument.
By supplying n0
and y0
, and possibly also data
.
With the data distributed as X[i] ~ Exp(lambda), the conjugate prior on mu is defined as
lambda ~ Ga(n^(0)+1, n^(0) y^(0)),
where Ga(alpha,beta) is the Gamma distribution with shape parameter alpha and rate parameter beta and density
p(λ) = (beta^alpha/G(alpha)) * lambda^(alpha-1) * e^(-beta*lambda)
and G is the Gamma function.
In the canonical parametrization in terms of y^(0) and n^(0) used here, the main parameter y^(0) gives the inverse mode of the gamma distribution. n^(0) can, as usually, be interpreted as a prior strength parameter.
The set of priors is then defined as the set of Gamma distributions as given above,
where y^(0) and n^(0) vary in sets with the bounds
given in y0
and n0
, respectively.
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",
taking here the role of the inverse mode of lambda,
is stored as a (1x2)-matrix
, with the first element giving the lower
bound and the second element the upper bound.
data
:Object of class ExponentialData
,
containing the sample statistic tau(x) = n*mean(x)
and the sample size n.
For details, see ExponentialData
.
ExponentialLuckModel
objectsThere are methods to access or replace the contents of the slots:
signature(object = "ExponentialLuckModel")
signature(object = "ExponentialLuckModel")
signature(object = "ExponentialLuckModel")
signature(object = "ExponentialLuckModel")
signature(object = "ExponentialLuckModel")
signature(object = "ExponentialLuckModel")
There are methods to display ExponentialLuckModel
s by text or graphically:
signature(object = "ExponentialLuckModel")
: This is invoked when
printing an ExponentialLuckModel
.
signature(x = "ExponentialLuckModel", y = "missing")
: This plots the
prior or posterior set of 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.
signature(object = "ExponentialLuckModel")
: This displays the
range of cumulative density functions as defined by the set of prior or
posterior parameters, see cdfplot
.
signature(object = "ExponentialLuckModel")
: This calculates the
union of highest density intervals for the prior or posterior set of
distributions, see unionHdi
.
Norbert Krautenbacher
Gero Walter and Thomas Augustin (2009),
Imprecision and Prior-data Conflict in Generalized Bayesian Inference,
Journal of Statistical Theory and Practice 3:255-271.
Norbert Krautenbacher (2011),
Ein Beitrag zur generalisierten Bayes-Inferenz: Erweiterung und Anwendung der Implementierung der generalized iLUCK-models
(A contribution to generalized Bayesian Inference: Extension and Application of the implementation of generalized iLUCK-models),
Diploma Thesis, Department of Statistics, LMU Munich.
luck
for a general description of the package,
LuckModel
for the general class describing the framework
of canonical conjugate priors for inference based on samples from an exponential family,
and ExponentialData
for the class of the data
slot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # directly generate a ExponentialLuckModel object with a ExponentialData object
exp1 <- ExponentialLuckModel(n0=c(1,2), y0=c(3,4))
# turn a LuckModel object into a ExponentialLuckModel object
luck1 <- LuckModel(n0=c(2,10), y0=c(3, 4))
exp2 <- ExponentialLuckModel(luck1)
# access and replace slots
n0(exp1)
y0(exp1)
n0(exp1) <- c(1,25)
set.seed(12345)
data(exp2) <- ExponentialData(mean=5, n=20, sim=TRUE)
data(exp2)
tauN(data(exp2))
# plot prior and posterior parameter sets (same as with LuckModel objects)
par(mfrow=c(1,2))
plot(exp2)
plot(exp2, control = controlList(posterior = TRUE))
par(mfrow=c(1,1))
# plot the set of cdfs
cdfplot(exp2)
cdfplot(exp2, control=controlList(posterior=TRUE))
# exemplary inference: union of highest density intervals
unionHdi(exp2)
unionHdi(exp2, posterior=TRUE)$borders
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.