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
.
getValues
signature(x = "Strata")
: get slot
values
.
getSplit
signature(x = "Strata")
: get slot
split
.
getDesign
signature(x = "Strata")
: get slot
design
.
getNr
signature(x = "Strata")
: get slot nr
.
getLegend
signature(x = "Strata")
: get slot
legend
.
getSize
signature(x = "Strata")
: get slot size
.
getCall
signature(x = "Strata")
: get slot call
.
head
signature(x = "Strata")
: returns the first parts
of strata information.
show
signature(object = "Strata")
: print strata
information on the R console.
simApply
signature(x = "data.frame", design = "Strata",
fun = "function")
: apply a function to subsets.
simSapply
signature(x = "data.frame", design = "Strata",
fun = "function")
: apply a function to subsets.
summary
signature(object = "Strata")
: produce a
summary of strata information.
tail
signature(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