plotmix {bayess} | R Documentation |
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.
plotmix(mu1 = 2.5, mu2 = 0, p = 0.7, n = 500, plottin = TRUE, nl = 50)
mu1 |
first mean |
mu2 |
second mean |
p |
weight of the first component |
n |
number of observations |
plottin |
boolean variable to plot the surface (or not) |
nl |
number of contours |
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.
sample |
the simulated sample |
like |
the discretised representation of the log-likelihood surface |
resumix=plotmix()