Learn R Programming

simFrame (version 0.5.0)

DARContControl-class: Class "DARContControl"

Description

Class for controlling contamination in a simulation experiment. The values of the contaminated observations will be distributed at random (DAR), i.e., they will depend on on the original values.

Arguments

encoding

utf8

Objects from the Class

Objects can be created by calls of the form new("DARContControl", ...), DARContControl(...) or ContControl(..., type="DAR").

Extends

Class "ContControl", directly. Class "VirtualContControl", by class "ContControl", distance 2. Class "OptContControl", by class "ContControl", distance 3.

Details

With this control class, contamination is modeled as a two-step process. The first step is to select observations to be contaminated, the second is to model the distribution of the outliers. In this case, the original values will be modified by the function given by slot fun, i.e., values of the contaminated observations will depend on on the original values.

Methods

Methods are inherited from "ContControl".

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 RPackage 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 RPackage simFrame. Journal of Statistical Software, 37(3), 1--36. URL http://www.jstatsoft.org/v37/i03/.

Alfons, A., Templ, M. and Filzmoser, P. (2010) Contamination Models in the RPackage simFrame for Statistical Simulation. In Aivazian, S., Filzmoser, P. and Kharin, Y. (editors) Computer Data Analysis and Modeling: Complex Stochastic Data and Systems, volume 2, 178--181. Minsk. ISBN 978-985-476-848-9.

Béguin{Beguin}, C. and Hulliger, B. (2008) The BACON-EEM Algorithm for Multivariate Outlier Detection in Incomplete Survey Data. Survey Methodology, 34(1), 91--103.

Hulliger, B. and Schoch, T. (2009) Robust Multivariate Imputation with Survey Data. 57th Session of the International Statistical Institute, Durban.

See Also

"DCARContControl", "ContControl", "VirtualContControl", contaminate

Examples

Run this code
require(mvtnorm)
mean <- rep(0, 2)
sigma <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
foo <- generate(size = 10, distribution = rmvnorm, 
    dots = list(mean = mean, sigma = sigma))
cc <- DARContControl(target = "V2",
    epsilon = 0.2, fun = function(x) x * 100)
contaminate(foo, cc)

Run the code above in your browser using DataLab