Class containing strata information for a data set.
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.
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, or NULL.
getValuessignature(x = "Strata"): get slot
values.
getSplitsignature(x = "Strata"): get slot
split.
getDesignsignature(x = "Strata"): get slot
design.
getNrsignature(x = "Strata"): get slot nr.
getLegendsignature(x = "Strata"): get slot
legend.
getSizesignature(x = "Strata"): get slot size.
getCallsignature(x = "Strata"): get slot call.
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.
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.
# NOT RUN {
showClass("Strata")
# }
Run the code above in your browser using DataLab