Hey everyone!
I’m trying to figure out something tricky with Lavaan. I’ve got 3 variables and I want to get the variance they share. My idea was to do a CFA, make the loadings the same for all items, and then somehow get the measurement error as scores for each item and each person. You know, kind of like how you can get factor scores for everyone.
But I’m stuck. I’ve looked all over and can’t find any examples of how to do this. It seems like it’s not a common thing to do.
Does anyone know if this is even possible? Or am I barking up the wrong tree here? Any tips or ideas would be super helpful!
Thanks a bunch!
yo surfingwave, interesting idea! not sure if lavaan can do that exactly. maybe try looking into residual covariance matrices? they might give u what ur after. or check out some multivariate techniques like canonical correlation analysis. could be worth a shot. good luck with ur research bro!
While your approach is innovative, extracting shared variance as scores from a CFA in Lavaan might be challenging. The package isn’t typically used for this purpose. Have you considered alternative methods like structural equation modeling (SEM) or bifactor models? These could potentially capture the shared variance you’re after.
If you’re set on using Lavaan, you might need to employ some creative coding. One possibility is to fit your CFA model, then use the fitted model to calculate residuals. These residuals could represent the non-shared variance, which you could then subtract from your original variables to estimate the shared component.
However, this approach would require careful validation. I’d recommend consulting with a statistical expert or methodologist to ensure the results are interpretable and statistically sound. Good luck with your analysis!
Hey SurfingWave! That’s an intriguing question you’ve got there. 
I’m not a Lavaan expert, but your approach sounds pretty creative. Have you considered using a different method to extract shared variance? Maybe something like principal component analysis (PCA) or exploratory factor analysis (EFA) could work?
I’m curious about why you specifically want to use CFA for this. Is there a particular reason you’re leaning towards that method? It might help to know a bit more about your research goals.
Also, have you tried posting on some R-specific forums or maybe reaching out to the Lavaan developers directly? They might have some insights into whether this is possible within the package.
Keep us posted on what you find out! I’d love to learn more about this approach if you manage to make it work. Good luck with your analysis!