## Generate and print simulated dataset.
Theta <- rbind(pdf = rep("binomial", 3),
theta1 = c(10, 10, 10),
theta2 = c(0.1, 0.4, 0.9))
simulated <- RNGMIX(Dataset = "simulated",
rseed = -1,
n = c(40, 60, 50),
Theta = Theta)
simulated
## Estimate number of components, component weights and component parameters.
simulatedest <- REBMIX(Dataset = simulated$Dataset,
Preprocessing = "histogram",
D = 0.025,
cmax = 6,
Criterion = "AIC",
Variables = "discrete",
pdf = "binomial",
Theta1 = 10,
K = 1)
## Print and plot finite mixture.
simulatedest
plot(simulatedest)
Run the code above in your browser using DataLab