FSR/ Factor Score Regression

Does anyone familiar with the Factor Score Regression (fsr) function in R? I'm trying to run the two-step estimation method (essentially trying to treat factor scores as manifest variables so as to reduce parameters in my SEM). R keeps saying it doesn't recognise the fsr function - anyone know why?

This is because there is no fsr() function in base R, I think you are trying to use the fsr() function from the lavaan package, don't forget to load the library with library(lavaan) before using the function

Sorry, I should have added I have loaded lavaan but apparently the fsr function was removed from the package, I've tried multiple versions of the package to no avail. This is the error message I get:

Error in fsr(CS_T1.model, data = MtvDataT12, fsr.method = "regression") :
could not find function "fsr"

I think you should file an issue about this on the github page of the package because the function is documented and the code is there but is not available to the user.

https://www.rdocumentation.org/packages/lavaan/versions/0.6-1.1161/topics/fsr

1 Like

fsr() is "hidden" and considered as an experimental at the moment. However, you can still use it with lavaan:::fsr()