Class for controlling contamination in a simulation experiment. The values of the first observations will either be contaminated completely at random (CCAR; i.e., not depending on the original values) or contaminated at random (CAR; i.e., depending on the original values).
Objects can be created by calls of the form
ContControl(..., sub = "Basic").
A character vector specifying specifying the
variables (columns) to be contaminated, or
NULL to contaminate
all variables (except additional ones generated internally).
A numeric vector giving the contamination levels.
A data frame giving tuning parameters for the
contamination. A list is converted to a data frame during initialization
An integer matrix in which the first column contains the indices of the contamination levels and the second column contains the row indices of the tuning parameters for the different contamination settings.
A function generating the values of the contaminated
data. As its first argument, it should take either the number of
observations to be created (if
"CCAR") or the
original values of the observations to be contaminated (if
"CAR"). Furthermore, it should return an object that can be
coerced to a data frame, containing the contaminated data.
A list containing additional arguments to be passed to
A character string specifying whether observations
should be contaminated completely at random (
contaminated at random (
"VirtualContControl", distance 2.
"OptContControl", distance 3.
Accessor methods are inherited.
The following methods are available in addition to the inherited ones:
signature(x = "data.frame",
control = "BasicContControl"): contaminate data.
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
vignette("simFrame-intro") to view this vignette.
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/.
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.