dmix | R Documentation |
Computes the density or their logarithmic values of a
mixture distribution, where the component family depends on the
class of x
.
x
must belong to a mixture family, as specified by its class.
dmix(x, mix, beta = NULL, log = FALSE)
x |
a data object of a mixture model class. |
mix |
a discrete distribution, as defined by class
|
beta |
the structural parameter, if any. |
log |
if |
Yong Wang <yongwang@auckland.ac.nz>
Wang, Y. (2007). On fast computation of the non-parametric maximum likelihood estimate of a mixing distribution. Journal of the Royal Statistical Society, Ser. B, 69, 185-198.
Wang, Y. (2010). Maximum likelihood computation for fitting semiparametric mixture models. Statistics and Computing, 20, 75-86
cnm
, cnmms
,
npnorm
, nppois
, disc
,
## Poisson mixture
mix0 = disc(c(1,4), c(0.7,0.3))
x = rnppois(10, mix0)
dmix(x, mix0)
dmix(x, mix0, log=TRUE)
## Normal mixture
x = rnpnorm(10, mix0, sd=1)
dmix(x, mix0, 1)
dmix(x, mix0, 1, log=TRUE)
dmix(x, mix0, 0.5, log=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.