Learn R Programming

simFrame (version 0.5.4)

ContControl-class: Class "ContControl"

Description

Virtual class for controlling contamination in a simulation experiment (used internally).

Arguments

Objects from the Class

A virtual Class: No objects may be created from it.

Slots

target:

Object of class "OptCharacter"; a character vector specifying specifying the variables (columns) to be contaminated, or NULL to contaminate all variables (except the additional ones generated internally).

epsilon:

Object of class "numeric" giving the contamination levels.

grouping:

Object of class "character" specifying a grouping variable (column) to be used for contaminating whole groups rather than individual observations.

aux:

Object of class "character" specifying an auxiliary variable (column) whose values are used as probability weights for selecting the items (observations or groups) to be contaminated.

Extends

Class "'>VirtualContControl", directly. Class "'>OptContControl", by class "VirtualContControl", distance 2.

Accessor and mutator methods

In addition to the accessor and mutator methods for the slots inherited from "'>VirtualContControl", the following are available:

getGrouping

signature(x = "ContControl"): get slot grouping.

setGrouping

signature(x = "ContControl"): set slot grouping.

getAux

signature(x = "ContControl"): get slot aux.

setAux

signature(x = "ContControl"): set slot aux.

Methods

In addition to the methods inherited from "'>VirtualContControl", the following are available:

contaminate

signature(x = "data.frame", control = "ContControl"): contaminate data.

show

signature(object = "ContControl"): 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.

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. 10.18637/jss.v037.i03.

See Also

"'>DCARContControl", "'>DARContControl", "'>VirtualContControl", contaminate

Examples

Run this code
# NOT RUN {
showClass("ContControl")
# }

Run the code above in your browser using DataLab