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

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

Description

ExponentialData objects represent data from an exponential distribution. For inferences based on this data in the framework of generalized iLUCK models, the class ExponentialLuckModel can be used. ExponentialData extends the class LuckModelData. Objects can be created using the constructor function ExponentialData() described below.

Usage

1
2
ExponentialData(arg1 = NULL, arg2 = NULL, data = NULL, mean = NULL, n = NULL,
                sim = FALSE)

Arguments

arg1

Used for treatment of unnamed arguments only, see Details.

arg2

Used for treatment of unnamed arguments only, see Details.

data

A vector of observations x from an exponential distribution, i.e., x ~ Exp(lambda). All elements must thus be strictly positive.

mean

The mean of n observations from an exponential distribution. Must be strictly positive, and supplied together with n.

n

The sample size of observations from an exponential distribution with mean given in mean.

sim

If TRUE, data are simulated according to mean and n and stored in the object. Defaults to FALSE.

Details

ExponentialData objects can be created using one of the following ways:

Slots of the resulting object

tauN:

A matrix with two named columns, with the first giving the sample statistic tau(x) = n*mean(x), and the second giving the corresponding sample size n.

rawData:

The data vector, if data was provided or simulated. From this data, τ(x) and n in tauN are calculated.

Methods

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

tauN

signature(object = "ExponentialData")

tauN<-

signature(object = "ExponentialData")

tau

signature(object = "ExponentialData")

tau<-

signature(object = "ExponentialData")

n

signature(object = "ExponentialData")

n<-

signature(object = "ExponentialData")

rawData

signature(object = "ExponentialData")

rawData<-

signature(object = "ExponentialData")

When the slot rawData is replaced using rawData<-, the contents of the slot tauN are recalculated. Attempts to replace (parts of) tauN if the object contains data in slot rawData results in an error.
There is a method to display ExponentialData objects by text:

show

signature(object = "ExponentialData"): This is invoked when printing an ExponentialData object, or an ExponentialLuckModel object containing data.

Author(s)

Norbert Krautenbacher

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.

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.

See Also

luck for a general description of the package, and ExponentialLuckModel for the model using this data representation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# generate an ExponentialData object
set.seed(8553)
x <- rexp(10)
expdata1 <- ExponentialData(data = x)
# also possible:
expdata2 <- ExponentialData(mean = mean(x), n = length(x))
expdata3 <- ExponentialData(mean=2, n=100)
scndata4 <- ExponentialData(mean = 5, n = 10, sim = TRUE)
data1 <- LuckModelData(tau=20, n=10)
scndata5 <- ExponentialData(data1)
# access and replace slots
tauN(expdata1)
rawData(expdata1) <- rexp(n = 20, rate = 1/3)
expdata1
tau(expdata2)
tau(expdata2) <- 4 
n(expdata2)
n(expdata2) <- 100

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