fit.norm {semisup} | R Documentation |
This function fits the semi-supervised Gaussian mixture model.
It is called by fit.wrap
.
fit.norm(y, z, it.em, epsilon)
y |
observations:
numeric vector of length |
z |
class labels:
integer vector of length |
it.em |
(maximum) number of iterations in the |
epsilon |
convergence criterion for the |
This function returns the parameter estimates, the posterior probabilities, and the likelihood.
This is an internal
function.
The user functions are mixtura
and scrutor
.
# data simulation n <- 100 z <- rep(0:1,each=n/2) y <- rnorm(n=n,mean=2*z,sd=1) z[(n/4):n] <- NA # model fitting fit.norm(y,z,it.em=100,epsilon=1e-04)