
Last chance! 50% off unlimited learning
Sale ends in
npEM(x, mu0, blockid = 1:ncol(x), bw = bw.nrd0(as.vector(as.matrix(x))), samebw = TRUE, h = bw, eps = 1e-8, maxiter = 500, stochastic = FALSE, verb = TRUE)
x
) that are
assumed to be identically distributed (i.e., in the same block). For instance,
the default has all distinct elements, indicating that no two coordinates
are assumed identically distributed and thus a separate set of $m$
density estimates is produced for each column of $x$. On the other hand,
if blockid=rep(1,ncol(x))
, then the coordinates in each row
are assumed conditionally i.i.d.TRUE
, use the same bandwidth for
each iteration and for each component and block. If FALSE
,
use a separate bandwidth for each component and block, and update
this bandwidth at each iteration of the algorithm using a suitably
modified bw.nrd0
method as described in
Benaglia et al (2011).lambda
vector (of mixing proportion estimates) does not exceed
eps
.stochastic = FALSE
), convergence
may be declared before maxiter
iterations (see eps
above).maxiter
iterations.npEM
returns a list of class npEM
with the following items:
stochastic = TRUE
, this matrix is computed
from an average over the maxiter
iterations.samebw==TRUE
,
same as the bw
input argument; otherwise, value of bw
matrix
at final iteration. This
information is needed by any method that produces density estimates from the
output.blockid
input argument, but recoded to have
positive integer values. Also needed by any method that produces density
estimates from the output.stochastic = FALSE
,
or the average mixing proportions if stochastic = TRUE
.
plot.npEM
, normmixrm.sim
, spEMsymloc
,
spEM
, plotseq.npEM
## Examine and plot water-level task data set.
## First, try a 3-component solution where no two coordinates are
## assumed i.d.
data(Waterdata)
set.seed(100)
## Not run:
# a <- npEM(Waterdata[,3:10], mu0=3, bw=4) # Assume indep but not iid
# plot(a) # This produces 8 plots, one for each coordinate
# ## End(Not run)
## Next, same thing but pairing clock angles that are directly opposite one
## another (1:00 with 7:00, 2:00 with 8:00, etc.)
## Not run:
# b <- npEM(Waterdata[,3:10], mu0=3, blockid=c(4,3,2,1,3,4,1,2), bw=4) # iid in pairs
# plot(b) # Now only 4 plots, one for each block
# ## End(Not run)
Run the code above in your browser using DataLab