rmscn: Multiple Scaled Contaminated Normal Distribution
Description
Probability density function and pseudo random number generation for the multiple scaled contaminated normal distribution.
Usage
dmscn(x, mu = NULL, L = NULL, G = NULL, Sigma = NULL, alpha = NULL, eta = NULL)
rmscn(n,d=2,mu=rep(0,d),L=NULL,G=NULL,Sigma=diag(d),alpha=rep(0.99,d),eta=rep(1.01,d))
Value
dmscn
returns a vector of density values.
rmscn
returns a matrix of n rows of observations.
Arguments
x
A matrix or data frame such that rows correspond to observations and columns correspond to variables.
n
The number of random vectors to be generated.
d
A number specifing the dimenstion.
mu
Either a vector of length d, representing the mean value, or (except for rmscn) a matrix whose rows represent different mean vectors; if it is a matrix, its dimensions must match those of x.
L
Lambda diagonal d-dimensional matrix of the eigenvalues of Sigma.
G
Gamma orthogonal d-dimensional matrix whose columns are the normalized eigenvectors of Sigma.
Sigma
A symmetric positive-definite d-dimensional matrix representing the scale matrix of the distribution; a vector of length 1 is also allowed (in this case, d = 1 is set). Identity matrix by default.
alpha
d-dimensional vector containing the proportion of good observations; it must be a number between 0 and 1.
eta
d-dimensional vector containing the degree of contamination; it should be a number greater than 1.
Author
Cristina Tortora and Antonio Punzo
References
Punzo, A. & Tortora, C. (2021). Multiple scaled contaminated normal distribution and its application in clustering.Statistical Modelling, 21(4): 332--358.
x <- matrix(c(0,0),1,2)
alpha <- c(0.8,0.6)
eta <- c(2,4)
density <- dmscn(x = x, alpha = alpha, eta = eta)
density
n <- 100
random <- rmscn(n = n, alpha = alpha, eta = eta)
plot(random)