Methods for printing LuckModel and LuckModelData objects of package ‘luck’

Description

The output at the prompt for objects in the S4 system is generated by the function show, as compared to the function print for objects in the S3 system. If a LuckModel object contains a LuckModelData object, the show output of the LuckModelData object is included in the show output for the LuckModel object, i.e., information on the data contained in the LuckModel object is displayed as well. For plain LuckModel objects, just the bounds for the canonical parameters of the prior are displayed, whereas for subclasses of LuckModel objects also the translation to the usual prior parameters are shown.

See Also

luck for a general description of the package, LuckModel as the central class of the package, LuckModelData as the class for its data slot, ScaledNormalLuckModel and ExponentialLuckModel 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
# generate a generic generalized iLUCK model without data
luck1 <- LuckModel(n0=c(2,10), y0=c(3, 4))
# display the model (this invokes show())
luck1
show(luck1) # same result
# add a LuckModelData object to the LuckModel object
data(luck1) <- LuckModelData(tau=20, n=10)
# display the model
luck1
# generate a generalized iLUCK model for inference from exponentially distributed data
expluck <- ExponentialLuckModel(y0=c(1,3), n0=c(1,2), data=ExponentialData(mean=mean(rexp(5)), n=5))
# display the model
expluck