Learn R Programming

ContaminatedMixt (version 1.3.8)

CNpredict: Cluster Prediction

Description

Cluster prediction for multivariate observations based on uncontaminated/contaminated normal mixture models

Usage

CNpredict(newdata, prior, mu, invSigma, eta=NULL, alpha=NULL)
# S3 method for ContaminatedMixt
predict(object, newdata, ...)

Value

a vector with group membership

Arguments

newdata

a dim=c(n,p) matrix representing the coordinates of n new data point(s)

object

an object of class ContaminatedMixt resulting from a call to CNmixt. When several models have been estimated, getBestModel is used to select one of them

...

Options to be passed to getBestModel

prior

a vector with length=G, where G is the number of components of the mixture model. Its \(k\)th component is the mixing proportion for the \(k\)th component

mu

a dim=c(p,G) matrix with mean values for each component of the mixture model

invSigma

an array with dim=c(p,p,G) whose element invSigma[,,k] is the inverse covariance matrix for the \(k\)th component of the mixture model.

alpha

a vector of length=G with the proportions of good observations; it must be a number between 0 and 1. Use NULL for uncontaminated models

eta

a vector of length=G with the degree of contamination; it should be a number greater than 1. Use NULL for uncontaminated models

Author

Antonio Punzo, Angelo Mazza, Paul D. McNicholas

References

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.

See Also

ContaminatedMixt-package

Examples

Run this code

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)

Run the code above in your browser using DataLab