aic_bic_clcm: AIC, BIC, -2LL

View source: R/aic_bic_clcm.R

aic_bic_clcmR Documentation

AIC, BIC, -2LL

Description

Compute AIC, BIC, and 2LL of the CLCM model

Usage

aic_bic_clcm(mod)

Arguments

mod

object from the clcm() function

Value

Returns the -2LL, AIC, and BIC of the confirmatory latent class model.

Examples

## Not run: 
set.seed(3112021)
sim.dat <- simulate_clcm(N=1000,
                         number.timepoints = 1,
                         item.type = rep('Ordinal', 5),
                         categories.j = rep(4, 5),
                         lc.prop = list('Time_1' = c(0.5, 0.5)) )


mod1 <- clcm(dat = sim.dat$dat,
            item.type = rep('Nominal', 5),
            item.names = sim.dat$item.names,
            Q = sim.dat$Q)


mod2 <- clcm(dat = sim.dat$dat,
           item.type = rep('Ordinal', 5),
           item.names = sim.dat$item.names,
           Q = sim.dat$Q)


mod.fit1 <- aic_bic_clcm(mod1)
mod.fit2 <- aic_bic_clcm(mod2)


unlist(mod.fit1)
unlist(mod.fit2)

## End(Not run)

CJangelo/CLCM documentation built on May 22, 2022, 9:27 a.m.