Latent Class Analysis in R: Model Selection (Vuong-Lo-Mendell-Rubin test/Bootstrap Ratio test)

184 views Asked by At

I have run a variety of different Latent Class Mixture Models in R using the LCMM package. I have derived standard 'fit' criteria upon which to initially compare models with respectively 2, 3 and 4 groups. However, it is advised that class model selection should also include the use of tests for a model with k versus k-1 classes.

I have undertaken the Lo-Mendell-Rubin test using the calc_lrt function from PoLCA as follows:

calc_lrt(length(mod2d[["pred"]][["ID"]]), mod2d$loglik,  length(mod2d[["best"]]), mod2d$ng,
         mod2e$loglik,  length(mod2e[["best"]]), mod2e$ng)

I would additionally like to compare outcomes using the Bootstrap Ratio test [as advised in relevant literature], but was unsure of the best approach. I have already derived the models using the LCMM package.

I had identified the boot.LR function (from mirt) and tried to use as follows:

library(mirt)
boot.LR(mod2d, mod2e, R = 1000, verbose = TRUE)

However, I get an error (Error in boot.LR(mod2d, mod2e, R = 1000, verbose = TRUE) : is(mod, "SingleGroupClass") is not TRUE) that I'm not sure how to resolve.

I wondered whether there was a way to get to relevant model parameters to circumvent such or whether anyone had used an alternative?

0

There are 0 answers