| SampleSetup-class {simFrame} | R Documentation |
Class "SampleSetup"
Description
Class for set up samples.
Objects from the Class
Objects can be created by calls of the form new("SampleSetup", ...) or
SampleSetup(...).
However, objects are expected to be created by the function setup
or clusterSetup, these constructor functions are not supposed to
be called by the user.
Slots
indices:Object of class
"list"; each list element contains the indices of the sampled observations.prob:Object of class
"numeric"giving the inclusion probabilities.control:Object of class
"VirtualSampleControl"; the control object used to set up the samples.seed:Object of class
"list"containing the seeds of the random number generator before and after setting up the samples, respectively (for replication purposes).call:Object of class
"SimCall"; the function call used to set up the samples, orNULL.
Accessor methods
getIndicessignature(x = "SampleSetup"): get slotindices.getProbsignature(x = "SampleSetup"): get slotprob.getControlsignature(x = "SampleSetup"): get slotcontrol.getSeedsignature(x = "SampleSetup"): get slotseed.getCallsignature(x = "SampleSetup"): get slotcall.
Methods
clusterRunSimulationsignature(cl = "ANY", x = "data.frame", setup = "SampleSetup", nrep = "missing", control = "SimControl"): run a simulation experiment on a cluster.drawsignature(x = "data.frame", setup = "SampleSetup"): draw a sample.headsignature(x = "SampleSetup"): returns the first parts of set up samples.lengthsignature(x = "SampleSetup"): get the number of set up samples.runSimulationsignature(x = "data.frame", setup = "SampleSetup", nrep = "missing", control = "SimControl"): run a simulation experiment.showsignature(object = "SampleSetup"): print set up samples on the R console.summarysignature(object = "SampleSetup"): produce a summary of set up samples.tailsignature(x = "SampleSetup"): returns the last parts of set up samples.
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.
Furthermore, the slot seed was added in version 0.2, and the slot
control was added in version 0.3. Since the control object used to
set up the samples is now stored, the redundant slots design,
grouping, collect and fun were removed. This has been
done as preparation for additional control classes for sampling, which will
be introduced in future versions.
Author(s)
Andreas Alfons
References
Alfons, A., Templ, M. and Filzmoser, P. (2010) An Object-Oriented Framework for Statistical Simulation: The R Package simFrame. Journal of Statistical Software, 37(3), 1–36. doi: 10.18637/jss.v037.i03.
See Also
"SampleControl", "TwoStageControl",
"VirtualSampleControl",
setup, draw
Examples
showClass("SampleSetup")