Skip to contents

Assess the number of components in a mixture of regressions model using the Akaike's information criterion (AIC), Schwartz's Bayesian information criterion (BIC), Bozdogan's consistent AIC (CAIC), and Integrated Completed Likelihood (ICL).

Usage

regmixmodel.sel(x, y, w = NULL, k = 2, type = c("fixed", 
                "random", "mixed"), ...)

Arguments

x

An nxp matrix (or list) of predictors. If an intercept is required, then x must NOT include a column of 1's! Requiring an intercept may be controlled through arguments specified in ....

y

An n-vector (or list) of response values.

w

An optional list of fixed effects predictors for type "mixed" or "random".

k

The maximum number of components to assess.

type

The type of regression mixture to use. If "fixed", then a mixture of regressions with fixed effects will be used. If "random", then a mixture of regressions where the random effects regression coefficients are assumed to come from a mixture will be used. If "mixed", the mixture structure used is the same as "random", except a coefficient of fixed effects is also assumed.

...

Additional arguments passed to the EM algorithm used for calculating the type of regression mixture specified in type.

Value

regmixmodel.sel returns a matrix of the AIC, BIC, CAIC, and ICL values along with the winner (i.e., the highest value given by the model selection criterion) for various types of regression mixtures.

References

Biernacki, C., Celeux, G. and Govaert, G. (2000) Assessing a Mixture Model for Clustering with the Integrated Completed Likelihood, IEEE Transactions on Pattern Analysis and Machine Intelligence 22(7), 719–725.

Bozdogan, H. (1987) Model Selection and Akaike's Information Criterion (AIC): The General Theory and its Analytical Extensions, Psychometrika 52, 345–370.

Examples

## Assessing the number of components for NOdata.

data(NOdata)
attach(NOdata)
#> The following objects are masked from NOdata (pos = 3):
#> 
#>     Equivalence, NO
#> The following objects are masked from NOdata (pos = 4):
#> 
#>     Equivalence, NO
#> The following objects are masked from NOdata (pos = 5):
#> 
#>     Equivalence, NO
#> The following objects are masked from NOdata (pos = 6):
#> 
#>     Equivalence, NO
#> The following objects are masked from NOdata (pos = 8):
#> 
#>     Equivalence, NO
#> The following objects are masked from NOdata (pos = 12):
#> 
#>     Equivalence, NO
#> The following objects are masked from NOdata (pos = 13):
#> 
#>     Equivalence, NO
set.seed(100)
regmixmodel.sel(x = NO, y = Equivalence, k = 3, type = "fixed")
#> number of iterations= 25 
#> number of iterations= 103 
#>             1        2        3 Winner
#> AIC  14.16514 116.0384 117.5675      3
#> BIC  11.68780 108.6063 105.1808      2
#> CAIC 10.68780 105.6063 100.1808      2
#> ICL  11.68780 109.2993 106.1943      2