if (FALSE) {
data(weibull)
# Create object of class EM.Control.
EM <- new("EM.Control", strategy = "single", variant = "EM",
acceleration = "fixed", acceleration.multiplier = 1.0, tolerance = 1.0E-4,
maximum.iterations = 1000)
# Estimate number of components, component weights and component parameters.
weibullest <- REBMIX(Dataset = list(weibull),
Preprocessing = "kernel density estimation",
cmin = 2,
cmax = 4,
Criterion = "BIC",
pdf = "Weibull",
EMcontrol = EM)
# Plot finite mixture.
plot(weibullest, what = c("pdf", "marginal cdf", "IC", "logL", "D"),
nrow = 3, ncol = 2, npts = 1000)
# Bootstrap finite mixture.
weibullboot <- boot(x = weibullest, Bootstrap = "nonparametric", B = 10)
weibullboot
}
Run the code above in your browser using DataLab