2
$\begingroup$

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?

$\endgroup$
  • 2
    $\begingroup$ Although it is painfully popular to do so, bootstrapping does in no way guarantee good results for small sample sizes. Bootstrapping is asymptotic theory, that just has been proven to give reliable results in some (very) finite cases. $\endgroup$ – Nick Sabbe Jul 13 '11 at 12:09
  • 2
    $\begingroup$ @Nick I think bootstrap was invented to give better estimates in small sample size problems, hence the name. If you bootstrap, then you reach asymptotics. Bootstrap is a way to "create" asymptotics, and must be done is small sample size studies to get better estimates of the parameter and standard deviation. $\endgroup$ – suncoolsu Jul 13 '11 at 14:33
  • 5
    $\begingroup$ @suncoolsu To nitpick: If you bootstrap, then you hope that you create a world similar to asymptotics. ;) Your point is well taken though; the bootstrap works incredibly well and has a pretty solid theoretical foundation at this point. But in a complicated latent variable model like SEM I'd be skeptical of any analysis based on 20 honest to goodness observations, personally. $\endgroup$ – JMS Jul 13 '11 at 14:40
  • 1
    $\begingroup$ @JMS I agree, very well said. I also agree that no procedure (even a sound one like bootstrap) can extract more information than what is in the data. I would definitely bootstrap in a SEM model, but trusting the results with this sample size is an example of positivism. $\endgroup$ – suncoolsu Jul 13 '11 at 14:45
  • 1
    $\begingroup$ Do you have observed variables only, or latent ones as well? At any rate, with such a tiny sample size, I would only run regression analysis, if it is at all applicable to your situation. $\endgroup$ – StasK Aug 10 '11 at 14:37
2
$\begingroup$

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.

$\endgroup$
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.