tdcm.compare {TDCM}R Documentation

Comparing the fit of two TDCMs

Description

Provides a comparison of two TDCMs. Can be used to compare different measurement models or assess measurement invariance over time or over groups in the multigroup TDCM case. Only accepts two models.

Usage

tdcm.compare(model1, model2)

Arguments

model1

a gdina object returned from the tdcm or mg.tdcm function.

model2

a second gdina object returned from the tdcm or mg.tdcm function

Value

This function returns a data frame with model fit statistics (AIC/BIC) and results from a likelihood ratio or deviance test.

Note

Examples


## Example 1: T = 2, A = 4
data(data.tdcm01, package = "TDCM")
dat1 <- data.tdcm01$data
qmat1 <- data.tdcm01$q.matrix

# estimate TDCM with invariance assumed and full LCDM
m1 <- TDCM::tdcm(dat1, qmat1, num.time.points = 2, invariance = TRUE, rule = "GDINA")

# estimate TDCM with invariance not assumed
m2 <- TDCM::tdcm(dat1, qmat1, num.time.points = 2, invariance = FALSE, rule = "GDINA")

# compare models to assess measurement invariance.
TDCM::tdcm.compare(m1, m2)


[Package TDCM version 0.1.0 Index]