conta_normal: Sample contaminated normal

Description Usage Arguments Value

View source: R/simu_data.R

Description

This function samples normal distribution with normal contamination

Usage

1
2
3
4
5
6
7
8
conta_normal(
  n,
  Omega,
  byrow = FALSE,
  cont_rate = 0.05,
  mu = 10,
  sd = sqrt(0.2)
)

Arguments

n

samplesize

Omega

precision matrix of the normal

byrow

whether the contamination happened by row? FALSE stand for cellwise contamination

cont_rate

how many cells/rows are contaminated?

mu

mean of the contamination

sd

standard deviation of the contamination

Value

a matrix of contaminated (multivariate) normal distributed data, row as sample


robustcov documentation built on Aug. 4, 2021, 5:07 p.m.