Confirmatory Factor Analysis (CFA) with continuous and categorical variables in R


I am trying to perform Confirmatory Factor Analysis with mixed variables ( 6 continuous and 6 categorical variables). Several online source suggest that Mplus is a suitable software for CFA analysis that involves mixed variables. However, I would like to use R, but I am not sure whether it can handle mixed variables well. I am new to R, so please advise.

Thank you,



It seems the lavaan package will be able to implement CFA for you. I found a great tutorial online:

It also explains how to use categorical variables with the lavTables() function

Hope this helps,


Thank you very much PJ.

Can lavaan handle dichotomous items along with continuous items in the same model?


I have not used this package before and am not very familiar with this type of analysis, but it seems this method/package should allow it... Best to just experiment with it and see.

Hope you get it to work :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.