plotmix:
Graphical representation of a normal mixture log-likelihood
Description
This function gives an image
representation of the log-likelihood
surface of a mixture (Chapter 6) of two normal densities with means $mu1$
and $mu2$ unknown. It first generates the random sample associated
with the distribution.
Usage
plotmix(mu1 = 2.5, mu2 = 0, p = 0.7, n = 500, plottin = TRUE, nl = 50)
Arguments
p
weight of the first component
plottin
boolean variable to plot the surface (or not)
Value
- sample
- the simulated sample
- like
- the discretised representation of the log-likelihood surface
Details
In this case, the parameters are identifiable: $mu1$
and $mu2$ cannot be confused when $p$ is not 0.5.
Nonetheless, the log-likelihood surface in this figure often
exhibits two modes, one being close to the true value of the parameters
used to simulate the dataset and one corresponding to a reflected separation of
the dataset into two homogeneous groups.