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

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

Description

LuckModelData objects are an abstract data representation for inference with generalized iLUCK models as implemented in LuckModel. Pure LuckModelData objects (that are not simultaneously instances of a subclass inheriting from LuckModelData) are useful only for studying the parameter update step and the shapes of posterior parameter sets of generalized iLUCK models. For data-based inferences, classes inherting from LuckModelData must be used, see, e.g., ScaledNormalData and ExponentialData.

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

Usage

1
LuckModelData(arg1 = NULL, arg2 = NULL, tau = NULL, n = NULL)

Arguments

tau

A numeric vector containing the sample statistic(s) τ(x), the length of which depends on the dimension of τ(x) for the sample distribution.

n

A numeric vector containing the sample size(s) belonging to the sample statistic(s) τ(x) as supplied in tau. n must either have the same dimension as tau or be a single value, the latter of which is the usual case.

arg1

Used for treatment of unnamed arguments only, see Details.

arg2

Used for treatment of unnamed arguments only, see Details.

Details

To create a LuckModelData object, LuckModelData() must be called with either of the following argument (sets):

Slots of the resulting object

tauN:

A matrix with two named columns, with the first giving the sample statistic(s) tau, and the second giving the corresponding sample size(s) n. In a default LuckModelData object, tauN is NULL.

rawData:

Slot to store data vector(s) from which τ(x) and n can be determined. For pure LuckModelData objects (that are not simultaneously instances of a subclass inheriting from LuckModelData), rawData is NULL.

Methods

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

tauN

signature(object = "LuckModelData")

tauN<-

signature(object = "LuckModelData")

tau

signature(object = "LuckModelData")

tau<-

signature(object = "LuckModelData")

n

signature(object = "LuckModelData")

n<-

signature(object = "LuckModelData")

rawData

signature(object = "LuckModelData")

rawData<-

signature(object = "LuckModelData")

The replacement function for rawData is implemented at the level of the subclasses inheriting from LuckModelData to allow for distribution-specific consistency checks.
There is a method to display LuckModelData objects by text:

show

signature(object = "LuckModelData"): This is invoked when printing a LuckModelData object, or a LuckModel object containing data.

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, LuckModel for the models using this data representation, and ScaledNormalData or ExponentialData 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 LuckModelData object
data1 <- LuckModelData(tau=20, n=10)
data1
data1 <- LuckModelData(20, 10)
data2 <- LuckModelData(tau=c(50,20), n=10)
data2 <- LuckModelData(c(50,20), 10)
data2 <- LuckModelData(list(tau=c(50,20), 10))
data2 <- LuckModelData(matrix(c(50,20,10,10), ncol=2))
# access and replace slots
tauN(data1)
tau(data2)
tau(data2) <- c(0,0)
n(data2)
n(data2) <- c(5,5)

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