em_clust_pois | R Documentation |
This function uses the EM algorithm to do clustering of k-mixture components
where each component is pois(\lambda)
.
em_clust_pois(data, nclust, mu_init = NULL, itmax = 10000, tol = 10^-8)
data |
An n-length vector. Must not be character. |
nclust |
The number of clusters. |
mu_init |
Optional. Vector of initial cluster means |
itmax |
The maximum number of iterations allowed. Defaults to 10000. |
tol |
Tuning parameter for convergence. Defaults to 10^-8. |
A list containing: it
the number of iterations; clust_prop
the estimated mixture proportions; clust_params
the estimated mixture parameters;
mix_est
a vector of the estimated mixture for each data point; log_lik
the
log likelihood of the data; bic
the modeled BIC.
# generate test data
c1 <- rpois(100, 3); c2 <- rpois(100, 20); c3 <- rpois(100, 100)
c_tot <- c(c1, c2, c3); rm(c1,c2,c3)
# run example
pois <- em_clust_pois(c_tot, nclust= 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.