dCN {ContaminatedMixt} | R Documentation |
Probability density function and random number generation for the multivariate contaminated normal distribution.
dCN(x, mu = rep(0,p), Sigma, alpha = 0.99, eta = 1.01) rCN(n, mu = rep(0,p), Sigma, alpha = 0.99, eta = 1.01)
x |
either a vector of length |
mu |
either a vector of length |
Sigma |
a symmetric positive-definite matrix representing the scale matrix of the distribution; a vector of length 1 is also allowed (in this case, |
alpha |
proportion of good observations; it must be a number between 0 and 1 |
eta |
degree of contamination; it should be a number greater than 1 |
n |
the number of random vectors to be generated |
dCN
returns a vector of density values; rCN
returns a matrix of n
rows of random vectors
Antonio Punzo, Angelo Mazza, Paul D. McNicholas
Punzo A., Mazza A. and McNicholas P. D. (2018). ContaminatedMixt: An R Package for Fitting Parsimonious Mixtures of Multivariate Contaminated Normal Distributions. Journal of Statistical Software, 85(10), 1–25.
Punzo A. and McNicholas P. D. (2016). Parsimonious mixtures of multivariate contaminated normal distributions. Biometrical Journal, 58(6), 1506–1537.
point <- c(0,0,0) mu <- c(1,-2,3) Sigma <- diag(3) alpha <- 0.8 eta <- 5 f <- dCN(point, mu, Sigma, alpha, eta) x <- rCN(10, mu, Sigma, alpha, eta)