I’m working on a Confirmatory Factor Analysis (CFA) for the Theory of Planned Behavior (TPB) in R. My model has 4 factors: Attitude, Subjective Norm, Perceived Behavioral Control, and Intention. Each factor is split into inverted and non-inverted items.
The sample size is 75, and items were rated on a 1-7 scale. After running the categorical part of the analysis, I got a warning about the variance-covariance matrix not being positive definite.
Here’s a simplified version of my code:
library(lavaan)
model <- '
Attitude =~ att1 + att2 + att3_inv
SubNorm =~ sn1 + sn2_inv + sn3
PBC =~ pbc1 + pbc2_inv + pbc3
Intention =~ int1 + int2 + int3_inv
'
fit <- cfa(model, data = my_data, ordered = TRUE)
summary(fit)
Does anyone know what might be causing this issue? How can I fix it? Any help would be appreciated!
hey Charlotte91, i’ve run into this before. usually means ur model’s too complex for ur sample size. with only 75 participants and 12 items, ur pushing it. try simplifying ur model - maybe combine inverted/non-inverted items or reduce factors. also, check for multicollinearity between items. hope this helps!
Hey Charlotte91! That’s a tricky situation you’re in. I’ve dabbled with CFA before, and non-positive definite matrices can be such a headache. 
Have you considered the possibility of model misspecification? Sometimes, the way we conceptualize our factors doesn’t quite match the underlying structure of the data. Maybe try running an exploratory factor analysis first to see if the items load as expected?
Also, I’m curious about your data distribution. With a 1-7 scale, are any of your items heavily skewed? That could potentially cause issues.
Oh, and here’s a wild thought - have you tried a Bayesian approach? It might handle the small sample size better. Plus, it’s always fun to dive into new methods!
What do you think? Have you explored any of these avenues yet?
The non-positive definite variance-covariance matrix issue is indeed tricky. Given your sample size of 75, you’re estimating quite a few parameters relative to observations. One approach you might consider is parceling - combining items into composite scores before running the CFA. This can reduce the number of parameters and potentially resolve the issue. For instance, you could create parcels for each factor by averaging the inverted and non-inverted items. This would give you a more parsimonious model with 4 factors and 2 indicators each. Additionally, ensure there’s no perfect collinearity between items and check for outliers that might be skewing your results. If these steps don’t work, you may need to collect more data to achieve a stable solution.