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

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

Description

ScaledNormalData objects represent data from a scaled Normal distribution (a Normal, or Gaussian, distribution with variance 1). For inferences based on this data in the framework of generalized iLUCK models, the class ScaledNormalLuckModel can be used. ScaledNormalData extends the class LuckModelData. Objects can be created using the constructor function ScaledNormallData() described below.

Usage

1
2
ScaledNormalData(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 a Normal distribution with variance 1, i.e., x ~ N(mu,1).

mean

The mean of n observations from a Normal distribution with variance 1. Must be supplied together with n.

n

The sample size of observations from a Normal distribution with variance 1 and mean given in mean.

sim

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

Details

ScaledNormalData 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 for ScaledNormalData objects

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

tauN

signature(object = "ScaledNormalData")

tauN<-

signature(object = "ScaledNormalData")

tau

signature(object = "ScaledNormalData")

tau<-

signature(object = "ScaledNormalData")

n

signature(object = "ScaledNormalData")

n<-

signature(object = "ScaledNormalData")

rawData

signature(object = "ScaledNormalData")

rawData<-

signature(object = "ScaledNormalData")

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 ScaledNormalData objects by text:

show

signature(object = "ScaledNormalData"): This is invoked when printing a ScaledNormalData object, or a ScaledNormalLuckModel 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, and ScaledNormalLuckModel 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
# generate a ScaledNormalData object
set.seed(8553)
x <- rnorm(10)
scndata1 <- ScaledNormalData(data = x)
# also possible:
scndata2 <- ScaledNormalData(mean = mean(x), n = length(x))
scndata3 <- ScaledNormalData(mean = 0, n = 10, sim = TRUE)
data1 <- LuckModelData(tau=20, n=10)
scndata4 <- ScaledNormalData(data1)
# access and replace slots
tauN(scndata1)
rawData(scndata1) <- rnorm(n = 20, mean=3)
scndata1
tau(scndata2)
tau(scndata2) <- 0
n(scndata2)
n(scndata2) <- 100

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