Select a Bernstein polynomial model degree for density on [0,1] based on mode(s) used as an initial guess for the iterative method of moment of choosing the model degree
momodem(modes, x)A list with components
mode a vector of modes
nmod the number of modes in mode
m the method of mode estimate of degree
lam a vector of rough estimates of the mixing proportions
a list containing z, a vector of the known or estimated
locations of modes, ufz, a vector of upper confidence limits
of density values at modes, and fz, a vector of estimated density
values at modes by ks::kde or multimode::locmodes()
a vector sample values
Zhong Guan <zguan@iu.edu>