densityMclust.diagnostic: Diagnostic plots for mclustDensity estimation
Description
Diagnostic plots for density estimation. Only available for the one-dimensional case.
Usage
densityMclust.diagnostic(object, data, what = c("cdf", "qq"), col = c(1,3),
lwd = c(2,2), lty = c(1,2), legend = TRUE, ...)
Arguments
object
mclustDensity object obtained from densityMclust function.
data
data points used for density estimation.
what
the type of graph requested:
[object Object],[object Object]
col
a pair of values for the color to be used for plotting, respectively, the estimated CDF and the empirical cdf.
lwd
a pair of values for the line width to be used for plotting, respectively, the estimated CDF and the empirical cdf.
lty
a pair of values for the line type to be used for plotting, respectively, the estimated CDF and the empirical cdf.
legend
a logical indicating if a legend must be added to the plot of fitted CDF vs the empirical CDF.
...
additional arguments.
References
Loader C. (1999), Local Regression and Likelihood. New York, Springer.
C. Fraley, A. E. Raftery, T. B. Murphy and L. Scrucca (2012).
mclust Version 4 for R: Normal Mixture Modeling for Model-Based
Clustering, Classification, and Density Estimation.
Technical Report No. 597, Department of Statistics, University of Washington.
Details
The two diagnostic plots for density estimation in the one-dimensional case are discussed in Loader (1999, pp- 87-90).
x = faithful$waiting
dens = densityMclust(x)
plot(dens, x, what = "diagnostic")
# ordensityMclust.diagnostic(dens, x, what = "cdf")
densityMclust.diagnostic(dens, x, what = "qq")