DataControl-class: Class '"DataControl"'

Description Objects from the Class Slots Extends Accessor methods Methods UML class diagram Author(s) References See Also Examples

Description

Class for controlling model-based generation of data.

Objects from the Class

Objects can be created by calls of the form DataControl(...).

Slots

size:

A numeric vector giving the data sizes, i.e., the numbers of observations to be generated.

tuning:

A data frame giving tuning parameters for data generation. A list is converted to a data frame during initialization via expand.grid.

indices:

An integer matrix in which the first column contains the indices of the data sizes and the second column contains the row indices of the tuning parameters for the different data configurations.

fun:

A function generating the data, e.g., rnorm (the default) or rmvnorm. 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:

A list containing additional arguments to be passed to fun.

colnames:

A character vector specifying the column names for the generated data frame, or NULL.

Extends

Class "VirtualDataControl", directly. Class "OptDataControl", distance 2.

Accessor methods

The following accessor methods are available in addition to the inherited ones:

getTuning

signature(x = "DataControl"): get slot tuning.

getIndices

signature(x = "DataControl"): get slot indices.

getFun

signature(x = "DataControl"): get slot fun.

getDots

signature(x = "DataControl"): get slot dots.

getColnames

signature(x = "DataControl"): get slot colnames.

Methods

The following methods are available in addition to the inherited ones:

generate

signature(control = "DataControl"): generate data.

length

signature(x = "DataControl"): get the number of different data configurations to be used.

show

signature(object = "DataControl"): print the object on the R console.

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.

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. URL http://www.jstatsoft.org/v37/i03/.

See Also

generate

Examples

1
2
3
4
5
6
library("mvtnorm")
mean <- rep(0, 2)
sigma <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
dc <- DataControl(size = 10, fun = rmvnorm, 
    dots = list(mean = mean, sigma = sigma))
generate(dc)

aalfons/simFrame documentation built on June 3, 2017, 10:52 a.m.