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

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.

Objects can be created by calls of the form
`new("DARContControl", ...)`

, `DARContControl(...)`

or
`ContControl(..., type="DAR")`

.

`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.`fun`

:Object of class

`"function"`

generating the values of the contamination data. The original values of the observations to be contaminated will be passed as its first argument. Furthermore, it should return an object that can be coerced to a`data.frame`

, containing the contamination data.`dots`

:Object of class

`"list"`

containing additional arguments to be passed to`fun`

.

Class `"ContControl"`

, directly.
Class `"VirtualContControl"`

, by class "ContControl", distance 2.
Class `"OptContControl"`

, by class "ContControl", distance 3.

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.

In addition to the accessor and mutator methods for the slots inherited from
`"ContControl"`

, the following are available:

`getFun`

`signature(x = "DARContControl")`

: get slot`fun`

.`setFun`

`signature(x = "DARContControl")`

: set slot`fun`

.`getDots`

`signature(x = "DARContControl")`

: get slot`dots`

.`setDots`

`signature(x = "DARContControl")`

: set slot`dots`

.

Methods are inherited from `"ContControl"`

.

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.
The slot `grouping`

was named `group`

prior to version 0.2.
Renaming the slot was necessary since accessor and mutator functions were
introduced in this version and a function named `getGroup`

already
exists.

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

Alfons, A., Templ, M. and Filzmoser, P. (2010) Contamination Models in the **R**
Package 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, 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.

`"DCARContControl"`

, `"ContControl"`

,
`"VirtualContControl"`

, `contaminate`

1 2 3 4 5 6 7 8 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.