Is there a way to run the
sem function (R sem package) by using WLS method?
Furthermore I have a very small data set (20 observations), can I overcome this problem by using a bootstrapping technique?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.Sign up to join this community
I'm not particularly familiar with the sem package, but I do know that the lavaan package offers a WLS estimation method for cfa and sem models. It should all be described in the relevant documentation.
As for the use of bootstrapping, I'm not familiar enough with the theory, but I would tend to avoid such methods with such a tiny sample.
Yes. Take a look at the Fml objective function in the code. It's totally my bad that there isn't a WLS function yet as it's been low on my coding priority list, but, it should be fairly simple to implement. The trick is going to be writing the weighting function, but, once you do that, it should be straightforward to plus it in and specify the new objective. sem has just been re-written so that ANY objective function can be slotted in as long as you can write it using the same framework as the Fml objective function.
Also, note, the lavaan package already has WLS incorporated.