lavaan EFA - get variance explained?

1,146 views
Skip to first unread message

Corbin Butler

unread,
Aug 29, 2021, 4:38:26 AM8/29/21
to lavaan
Hi all,
So with the fa() function, you get an output called "cumulative var" the final column of which tells you how much of the total variance of observed variables is explained by the model.
One or two people have asked about this here before, but they have asked in the context of finding the variance explained for CFA models, which doesnt make as much sense. But now that lavaan does EFA blocks, there must be a way to get this output?

Im sure there is a way to calculate it myself. But I'm quite new to this, and my googling hasn't got me far. I would gladly learn more about factor analysis and solve this myself, but my honours thesis is due in a few weeks.

Thanks so much for any help

Corbin

Terrence Jorgensen

unread,
Aug 31, 2021, 4:01:15 AM8/31/21
to lavaan
I think the generalization to CFA (or oblique factors more generally) is the average variance explained (AVE), which is available from most lavaan objects with latent variables (EFA or CFA) from semTools::reliability()

You could also look at the R-squared for each outcome (as opposed to the variance explained by each factor across multiple indicators). 

summary(fit, rsq = TRUE)

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Corbin Butler

unread,
Sep 2, 2021, 11:22:24 PM9/2/21
to lavaan
For anyone who is interested, this problem has been solved by an advisor from my university, and its very simple!
Just sum the "variance" output for each item and divide by the number of items! The "variance" values are actually "variance explained".

Corbin Butler

unread,
Sep 5, 2021, 8:46:47 PM9/5/21
to lavaan
Sorry, correction:
Just sum  (1 -"variance") output for each item and divide by the number of items. The "variance" values are actually the left-over/unique variance of each item.
e.g. in r: total_variance_explained <- mean(1-mean(rowSums(inspect(results,what="std")$theta)))
Reply all
Reply to author
Forward
0 new messages