icci: Information Criteria Confidence Intervals

View source: R/icci.R

icciR Documentation

Information Criteria Confidence Intervals

Description

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

Usage

icci(object1, object2, conf.level = 0.95, ll1 = llcont, ll2 = llcont)

Arguments

object1

a model object

object2

a model object

conf.level

confidence level of the interval

ll1

an optional function for computing log-likelihood contributions of object1

ll2

an optional function for computing log-likelihood contributions of object2

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.

Value

an object of class icci containing test results.

Author(s)

Ed Merkle and Dongjun You

References

Vuong, Q. H. (1989). Likelihood ratio tests for model selection and non-nested hypotheses. Econometrica, 57, 307-333. <DOI:10.2307/1912557>

Merkle, E. C., You, D., & Preacher, K. (2016). Testing non-nested structural equation models. Psychological Methods, 21, 151-163. <DOI:10.1037/met0000038>

Examples

## Not run: 
## 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, meanstructure=TRUE)
fit2 <- cfa(HS.model, data=HolzingerSwineford1939, group="school")
icci(fit1, fit2)

## End(Not run)


nonnest2 documentation built on Aug. 13, 2023, 5:07 p.m.