I’m having trouble with Confirmatory Factor Analysis (CFA) in R using the lavaan package. It works fine with 4 or more variables, but I’m getting strange results with just 3.
Here’s a simple example using the built-in mtcars dataset:
library(lavaan)
data(mtcars)
model <- 'factor =~ mpg + disp + hp'
fit <- cfa(model, data=mtcars, estimator='MLR')
summary(fit, fit.measures=TRUE)
When I run this, all the fit measures (CFI, RMSEA, SRMR) come out as 1 or 0, which doesn’t seem right. But if I add a fourth variable to the model, I get normal-looking results.
I thought 3 variables was the minimum for CFA. Am I doing something wrong? Or is there a special way to handle 3-variable models in lavaan?
Any help would be great. Thanks!
yo maxrock, i’ve run into this too. with 3 variables, ur model’s just-identified - means perfect fit no matter what. it’s not wrong, just not super useful for testing fit. maybe try adding more indicators or use a different approach? EFA could work. good luck with ur analysis, man!
Hey there, MaxRock56! 
That’s a really interesting question you’ve got there about CFA with just 3 variables. I’ve actually been wondering about this myself!
You know, I’m not a stats expert, but from what I understand, the perfect fit you’re seeing (like CFI=1 and RMSEA=0) isn’t necessarily a good thing in this case. It’s kinda like when something fits too perfectly, you know?
Have you thought about maybe adding more variables to your model? I’m curious, what’s the specific research question you’re trying to answer with this CFA? Maybe there are other ways to approach it that could give you more meaningful results?
Also, I wonder if anyone else here has experience with small-scale CFAs like this? It’d be really interesting to hear about alternative approaches or if there are any special considerations for 3-variable models.
Keep us posted on what you find out! This stuff fascinates me, and I’d love to learn more about how you end up tackling this challenge. 
I’ve encountered this issue before and it’s a common misconception regarding CFA with just three variables. The perfect fit indices (CFI = 1, RMSEA = 0, SRMR = 0) occur because a three-variable CFA model is just-identified, meaning the number of parameters equals the number of unique variances and covariances. This saturation forces a perfect fit regardless of the actual relationships among variables.
While CFA with three variables is possible, it doesn’t provide a meaningful test of model fit. In cases with only three variables, you might consider expanding your indicators, employing exploratory factor analysis, or using alternative methods such as item response theory. Essentially, CFA aims to test a hypothesized structure, and with three variables you are largely describing the data rather than testing it.