Model Selection Mixtures of Multinomials
multmixmodel.sel.RdAssess the number of components in a mixture of multinomials model using the Akaike's information criterion (AIC), Schwartz's Bayesian information criterion (BIC), Bozdogan's consistent AIC (CAIC), and Integrated Completed Likelihood (ICL).
Arguments
- y
Either An nxp matrix of data (multinomial counts), where n is the sample size and p is the number of multinomial bins, or the output of the
makemultdatafunction. It is not necessary that all of the rows contain the same number of multinomial trials (i.e., the row sums ofyneed not be identical).- comps
Vector containing the numbers of components to consider. If NULL, this is set to be 1:(max possible), where (max possible) is floor((m+1)/2) and m is the minimum row sum of y.
- ...
Arguments passed to
multmixEMthat control convergence of the underlying EM algorithm.
Value
multmixmodel.sel returns a table summarizing the AIC, BIC, CAIC, ICL, and log-likelihood
values along with the winner (the number with the lowest aforementioned values).
Examples
##Data generated using the multinomial cutpoint method.
set.seed(100)
x <- matrix(rpois(70, 6), 10, 7)
x.new <- makemultdata(x, cuts = 5)
multmixmodel.sel(x.new$y, comps = c(1,2), epsilon = 1e-03)
#> number of iterations= 5
#> 1 2 Winner
#> AIC -16.87652 -17.04152 1
#> BIC -17.02782 -17.49540 1
#> CAIC -17.52782 -18.99540 1
#> ICL -17.02782 -16.82665 2
#> Loglik -15.87652 -14.04152 2