| Strata-class {simFrame} | R Documentation |
Class "Strata"
Description
Class containing strata information for a data set.
Objects from the Class
Objects can be created by calls of the form new("Strata", ...) or
Strata(...).
However, objects are expected to be created by the function
stratify, these constructor functions are not supposed to be
called by the user.
Slots
values:Object of class
"integer"giving the stratum number for each observation.split:Object of class
"list"; each list element contains the indices of the observations belonging to the corresponding stratum.design:Object of class
"character"giving the variables (columns) defining the strata.nr:Object of class
"integer"giving the stratum numbers.legend:Object of class
"data.frame"describing the strata.size:Object of class
"numeric"giving the stratum sizes.call:Object of class
"OptCall"; the function call used to stratify the data, orNULL.
Accessor methods
getValuessignature(x = "Strata"): get slotvalues.getSplitsignature(x = "Strata"): get slotsplit.getDesignsignature(x = "Strata"): get slotdesign.getNrsignature(x = "Strata"): get slotnr.getLegendsignature(x = "Strata"): get slotlegend.getSizesignature(x = "Strata"): get slotsize.getCallsignature(x = "Strata"): get slotcall.
Methods
headsignature(x = "Strata"): returns the first parts of strata information.showsignature(object = "Strata"): print strata information on the R console.simApplysignature(x = "data.frame", design = "Strata", fun = "function"): apply a function to subsets.simSapplysignature(x = "data.frame", design = "Strata", fun = "function"): apply a function to subsets.summarysignature(object = "Strata"): produce a summary of strata information.tailsignature(x = "Strata"): returns the last parts of strata information.
UML class diagram
A slightly simplified UML class diagram of the framework can be found in
Figure 1 of the package vignette An Object-Oriented Framework for
Statistical Simulation: The R Package simFrame. Use
vignette("simFrame-intro") to view this vignette.
Note
There are no mutator methods available since the slots are not supposed to be changed by the user.
Author(s)
Andreas Alfons
See Also
Examples
showClass("Strata")