rcn: random contaminated normal deviates

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/rcn.r

Description

Generate a random sample from a contaminated normal distribution.

Usage

1
rcn(n, eps, sigmac)

Arguments

n

sample size

eps

proportion of proportion of contamination

sigmac

standard devation of contaiminated component

Details

With probability (1-eps) a deviates are drawn from a standard normal distribution. With probability eps deviates are drawn from a normal distribution with mean 0 and standard devation sigmac

Value

n x 1 numeric vector containing the random deviates.

Author(s)

John Kloke [email protected], Joseph McKean

References

Hogg, R. McKean, J, Craig, A (2013) Introduction to Mathematical Statistics, 7th Ed. Boston: Pearson.

See Also

rnorm

Examples

1
qqnorm(rcn(100,.25,10))

npsm documentation built on May 29, 2017, 12:12 p.m.

Related to rcn in npsm...