How to compute an asymptotic variance-covariance matrix for WLS or MLM estimator

502 views
Skip to first unread message

Markus Riek

unread,
Mar 9, 2013, 5:57:57 AM3/9/13
to lav...@googlegroups.com
Hey

I am trying to run a SEM analysis based on a polychoric correlation matrix. To get adjusted standard errors and test statistics I like to use the WLS estimator or the S-B scaling (MLM estimator). Unfortunatly I wasn't able to specify the asymptotic variance-covariance matrix, which is needed for both approaches.

According to the documentation I need to specify a matrix in the following way: "In the categorical case: first the thresholds (including the means for continuous variables), then the slopes (if any), the variances of continuous variables (if any), and finally the lower triangular elements of the correlation/covariance matrix excluding the diagonal, ordered column by column."

As I only have categorical variables I only need the thresholds and the elements of the correlations/covariance matrix.

Anyways I don't know how to put all elements together in one matrix. Can someone maybe post an example of how the matrix needs to look like.

Regards,
Markus

yrosseel

unread,
Mar 10, 2013, 5:47:20 AM3/10/13
to lav...@googlegroups.com
On 03/09/2013 11:57 AM, Markus Riek wrote:
> I am trying to run a SEM analysis based on a polychoric correlation
> matrix. To get adjusted standard errors and test statistics I like to
> use the WLS estimator or the S-B scaling (MLM estimator). Unfortunatly I
> wasn't able to specify the asymptotic variance-covariance matrix, which
> is needed for both approaches.

I'm not sure what you need here. lavaan computes this asymptotic
variance matrix out of the box. And you can 'get' it (after you have
fitted the model) by using

inspect(fit, "WLS.V")

If you only have polychoric correlation matrix as input (without the raw
data), there is no way to compute this matrix yourself.

But perhaps I have misunderstood your real question?

Yves.

Markus Riek

unread,
Mar 10, 2013, 9:44:42 AM3/10/13
to lav...@googlegroups.com

Hey Yves,

Thank you for your fast reply.  Yes, my question was whether I can compute the weight matrix from a polychoric correlation matrix myself.
 
If you only have polychoric correlation matrix as input (without the raw
data), there is no way to compute this matrix yourself.

Ok.
Is there an estimator available to adjust standard errors and test statistics based on the polychoric correlation matrix?

Regards,
Markus

yrosseel

unread,
Mar 10, 2013, 12:29:43 PM3/10/13
to lav...@googlegroups.com
I'm afraid not. Robust standard errors and test statistics typically
need the raw data.

Yves.

Markus Riek

unread,
Mar 10, 2013, 6:10:17 PM3/10/13
to lav...@googlegroups.com
Ok. Thanks again for your quick help

Njål Foldnes

unread,
Jul 2, 2014, 5:12:56 AM7/2/14
to lav...@googlegroups.com
Hi, as a follow up, how do we extract the asymptotic covariance matrix of the covariance matrix, for continuos data? This
matrix is used for instance to calculate the Satorra-Bentler correction, where we need to take the trace of some matrix U*Gamma, 
where Gamma is the asymptotic covariance matrix. 

My try is to estimate the model with WLS, and then obtain the inverse through

f1=cfa(my.model, data=X, estimator="WLS")
Gamma_inverse=inspect(f1, "WLS.V")

And then I guess I obtain Gamma by inverting Gamma_inverse??

Is there some better way to extract Gamma?

yrosseel

unread,
Jul 2, 2014, 10:54:33 AM7/2/14
to lav...@googlegroups.com
On 07/02/2014 11:12 AM, Njål Foldnes wrote:
> Hi, as a follow up, how do we extract the asymptotic covariance matrix
> of the covariance matrix, for continuos data? This
> matrix is used for instance to calculate the Satorra-Bentler correction,
> where we need to take the trace of some matrix U*Gamma,
> where Gamma is the asymptotic covariance matrix.

In 0.5-16, you can grab it from a fitted object as follows:

fit@SampleStats@NACOV[[1]]

but this not ideal (since the name/location will change). In the dev
version (0.5-17), I have added

inspect(fit, "Gamma")

(which works for WLS, ULS, DWLS, GLS and MLM, but not MLR, yet)

Yves.

Reply all
Reply to author
Forward
0 new messages