plot.densityMclustBounded {mclustAddons} | R Documentation |
Plotting method for model-based mixture density estimation for bounded data
Description
Plots for mclustDensityBounded
objects.
Usage
## S3 method for class 'densityMclustBounded'
plot(x, what = c("BIC", "density", "diagnostic"),
data = NULL, ...)
Arguments
x |
An object of class |
what |
The type of graph requested:
|
data |
Optional data points. |
... |
Further available arguments.
|
Value
No return value, called for side effects.
Author(s)
Luca Scrucca
References
Scrucca L. (2019) A transformation-based approach to Gaussian mixture density estimation for bounded data. Biometrical Journal, 61:4, 873–888. https://doi.org/10.1002/bimj.201800174
See Also
densityMclustBounded
,
predict.densityMclustBounded
.
Examples
# univariate case with lower bound
x <- rchisq(200, 3)
dens <- densityMclustBounded(x, lbound = 0)
plot(dens, what = "BIC")
plot(dens, what = "density", data = x, breaks = 15)
# univariate case with lower & upper bound
x <- rbeta(200, 5, 1.5)
dens <- densityMclustBounded(x, lbound = 0, ubound = 1)
plot(dens, what = "BIC")
plot(dens, what = "density", data = x, breaks = 9)
# bivariate case with lower bounds
x1 <- rchisq(200, 3)
x2 <- 0.5*x1 + sqrt(1-0.5^2)*rchisq(200, 5)
x <- cbind(x1, x2)
dens <- densityMclustBounded(x, lbound = c(0,0))
plot(dens, what = "density")
plot(dens, what = "density", data = x)
plot(dens, what = "density", type = "hdr")
plot(dens, what = "density", type = "persp")