spEMsymloc(x, mu0, bw = bw.nrd0(x), h=bw, eps = 1e-8, maxiter = 100, stochastic = FALSE, verbose = FALSE)maxiter iterations
whenever the maximum change in any coordinate of the
lambda (mixing proportion estimates) and mu (means)
vector does not exceed eps.stochastic = FALSE), convergence
may be declared before maxiter iterations (see eps above).maxiter iterations.spEMsymloc returns a list of class npEM with the following items:
stochastic = TRUE, this matrix is computed
from an average over the maxiter iterations.bw input argument, returned because this
information is needed by any method that produces density estimates from the
output.stochastic =
FALSE, the average over the sequence if stochastic = TRUE.stochastic =
FALSE, the average over the sequence if stochastic = TRUE.
plot.npEM, rnormmix,
npEM, spEMsymlocN01, plotseq.npEM
## Example from a normal location mixture
set.seed(100)
n <- 200
lambda <- c(1/3,2/3)
mu <- c(0, 4); sigma<-rep(1, 2)
x <- rnormmix(n, lambda, mu, sigma)
out.stoc <- spEMsymloc(x, mu0=c(-1, 2), stochastic=TRUE)
out.nonstoc <- spEMsymloc(x, mu0=c(-1, 2))
Run the code above in your browser using DataLab