Description Objects from the Class Slots Extends Accessor and mutator methods Methods UML class diagram Author(s) References See Also Examples
Class for controlling model-based generation of data.
Objects can be created by calls of the form new("DataControl", ...) or
DataControl(...).
size:Object of class "numeric" giving the number of
observations to be generated.
distribution:Object of class "function" generating
the data, e.g., rnorm (the default) or
rmvnorm from package mvtnorm. It should take a positive
integer as its first argument, giving the number of observations to be
generated, and return an object that can be coerced to a
data.frame.
dots:Object of class "list" containing additional
arguments to be passed to distribution.
colnames:Object of class "OptCharacter" ; a character
vector to be used as column names for the generated data.frame, or
NULL.
Class "VirtualDataControl", directly.
Class "OptDataControl", by class "VirtualDataControl", distance 2.
getSizesignature(x = "DataControl"): get slot
size.
setSizesignature(x = "DataControl"): set slot
size.
getDistributionsignature(x = "DataControl"): get slot
distribution.
setDistributionsignature(x = "DataControl"): set slot
distribution.
getDotssignature(x = "DataControl"): get slot
dots.
setDotssignature(x = "DataControl"): set slot
dots.
getColnamessignature(x = "DataControl"): get slot
colnames.
setColnamessignature(x = "DataControl"): set slot
colnames.
In addition to the methods inherited from
"VirtualDataControl", the following are available:
generatesignature(control = "DataControl"): generate
data.
showsignature(object = "DataControl"): print the
object on the R console.
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.
Andreas Alfons
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.
"VirtualDataControl", generate
1 2 3 | dc <- DataControl(size = 10, distribution = rnorm,
dots = list(mean = 0, sd = 2))
generate(dc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.