Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 Quantlet: epscontnorm Description: Produces T i.i.d. Variates from an eps-contamination Model P= (1-eps) N(mid,Cid) + eps K with K=N(mcont,Ccont) if DirNorm ==0 with K=dirac(mcont) if DirNorm == -1 with K=dirac( +/- mcont) if DirNorm == 1

 Usage: {X,Ind}= epscontnorm(T,eps,mid,Cid,mcont,Ccont,DirNorm) Input: T number of Variates to be generated eps (contamination radius) numeric in [0,1) mid (ideal mean) n x 1 vector Cid (ideal Covariance) n x n matrix mcont (contaminating mean) n x 1 vector Ccont (contaminating Covariance) n x n matrix DirNorm (decides which type of contaminating distribution K is taken) K=N(mcont,Ccont) if DirNorm ==0 K=dirac(mcont) if DirNorm == -1 K=dirac( +/- mcont) if DirNorm == 1 Output: X T x n matrix of generated Variates, T is the number of generated Variates, n is the dimension of generated Variates Ind T Indicator of contamination ( 0 = no cont. 1 = cont.)

Example:
```library("kalman")
library("plot")
randomize(0)
T = 100
eps = 0.1
mid=#(0,0)
Cid = #(2,1)~#(1,1)
mcont=#(3,3)
Ccont = #(3,0)~#(0,0.2)
erg=epscontnorm(T,eps,mid,Cid,mcont,Ccont,0)
color=2*erg.Ind+2 ; red(4)  if clipped green(2) else
data=erg.X
setmaskp(data,color, 3, 8) ; rest :default
disp = createdisplay(1,1)
show(disp,1,1,data)

```
Result:
```Generates 100 observations of
(1-eps) N(0,Cid)+eps N(mcont,Ccont)
and plots the contaminated data in red, the rest in green
```

Author: P. Ruckdeschel, 19991020
(C) MD*TECH Method and Data Technologies, 05.02.2006