Learn R Programming

nonnest2 (version 0.2)

icci: Information Criteria Confidence Intervals

Description

Calculate confidence intervals of AIC and BIC for non-nested models.

Usage

icci(object1, object2, conf.level = 0.95)

Arguments

object1
a model object
object2
a model object
conf.level
confidence level of the interval

Value

  • an object of class icci containing test results.

Details

Functionality is currently available for models of classes lm, glm, glm.nb, clm, hurdle, zeroinfl, mlogit, nls, polr, rlm, and lavaan.

Users should take care to ensure that the two models have the same dependent variable (or, for lavaan objects, identical modeled variables), with observations ordered identically within each model object. Assuming the same data matrix is used to fit each model, observation ordering should generally be identical. There are currently no checks for this, however.

Note: if models are nested or if the "variance test" from vuongtest() indicates models are indistinguishable, then the intervals returned from icci() will be incorrect.

References

Vuong, Q. H. (1989). Likelihood ratio tests for model selection and non-nested hypotheses. Econometrica, 57, 307-333.

Merkle, E. C., You, D., & Preacher, K. (2014). Testing non-nested structural equation models. Manuscript under review.

Examples

Run this code
## Count regression comparisons
require(MASS)
house1 <- glm(Freq ~ Infl + Type + Cont, family=poisson, data=housing)
house2 <- glm(Freq ~ Infl + Sat, family=poisson, data=housing)

## CI for BIC
icci(house2, house1)

## Further comparisons to hurdle, zero-inflated models
require(pscl)
bio1 <- glm(art ~ fem + mar + phd + ment, family=poisson, data=bioChemists)
bio2 <- hurdle(art ~ fem + mar + phd + ment, data=bioChemists)
bio3 <- zeroinfl(art ~ fem + mar + phd + ment, data=bioChemists)
icci(bio2, bio1)
icci(bio3, bio1)
icci(bio3, bio2)

## Latent variable model comparisons
require(lavaan)
HS.model <- 'visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '
fit1 <- cfa(HS.model, data=HolzingerSwineford1939)
fit2 <- cfa(HS.model, data=HolzingerSwineford1939, group="school")
icci(fit1, fit2)

Run the code above in your browser using DataLab