Extracting shared variance as scores in Lavaan CFA: Is it possible?

I’m working on a project where I need to get the common variance from three variables in my dataset. I thought about using Confirmatory Factor Analysis (CFA) with equal loadings and then somehow getting the measurement error as scores for each item and every data point. Kind of like how you can get factor scores, but for the error part instead.

I’ve been searching online, but I can’t find any examples or code that show how to do this. It doesn’t seem to be a common thing people do.

Does anyone know if this is even possible in Lavaan? Or maybe there’s a better way to approach this problem? I’d really appreciate any tips or suggestions on how to tackle this.

Thanks in advance for any help!

hey emma, interesting question! i’ve never tried extracting shared variance scores like that in lavaan before. have u considered using principal component analysis instead? it might give u something similar to what ur looking for in terms of shared variance. just a thought! good luck with ur project :slight_smile:

Hey there Emma_Brave! :thinking:

Your project sounds super intriguing! I’m really curious about why you’re specifically after the measurement error scores. What’s the end goal you’re trying to achieve with this approach?

Have you thought about using a different structural equation modeling package that might offer more flexibility in extracting these kinds of scores? I know some folks who’ve had success with Mplus for similar unconventional analyses.

Also, I’m wondering if you’ve considered reaching out to the Lavaan developers directly? They might have some insider tips or workarounds that aren’t widely known.

What other methods have you tried so far? I’d love to hear more about your process and maybe we can brainstorm some alternative approaches together!

Keep us posted on how it goes. This kind of creative problem-solving is what makes stats so exciting!

While Lavaan is a powerful tool for CFA, extracting measurement error scores as you’ve described isn’t a standard feature. Have you considered using residual scores instead? These can be calculated post-hoc from a CFA model and might serve as a proxy for what you’re trying to achieve.

Alternatively, you could explore Bayesian CFA methods. These allow for more flexible modeling and can provide posterior distributions of model parameters, including error terms. This approach might give you a more nuanced view of the measurement error for each item.

If you’re set on using Lavaan, you might need to implement a custom function to extract the information you need from the model object. This would require some advanced R programming, but it could be a valuable exercise if this type of analysis is crucial for your research.

Have you considered consulting with a statistical consultant or collaborating with someone who has experience in advanced SEM techniques? They might be able to provide more tailored advice for your specific research question.