covariance estimate in function sem (Lavaan)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

covariance estimate in function sem (Lavaan)

Luna
Dear R users,
I have a hard time interpreting the covariances in the parameter estimates output (standardized), even in the example documented (PoliticalDemocracy).  Can anyone tell me if the estimated covariances are residual covariances (unexplained by the model), or the covariances of the observable variables?  I haved checked the data and it does not look like the covariances of the observable variables, however when I tried to find out using simulated data ( with correlated residuals) the estimates did not seem to be the covariance of the residuals either (much much underestimated). Can anyone help?

Below is the output:

lavaan (0.4-14) converged normally after 70 iterations

  Number of observations                            75

  Estimator                                         ML
  Minimum Function Chi-square                   38.125
  Degrees of freedom                                35
  P-value                                        0.329

Parameter estimates:

  Information                                 Expected
  Standard Errors                             Standard

                   Estimate  Std.err  Z-value  P(>|z|)   Std.lv  Std.all
Latent variables:
  Ind60 =~
    x1                1.000                               0.670    0.920
    x2                2.180    0.139   15.742    0.000    1.460    0.973
    x3                1.819    0.152   11.967    0.000    1.218    0.872
  Dem60 =~
    y1                1.000                               2.223    0.850
    y2                1.257    0.182    6.889    0.000    2.794    0.717
    y3                1.058    0.151    6.987    0.000    2.351    0.722
    y4                1.265    0.145    8.722    0.000    2.812    0.846
  Dem65 =~
    y5                1.000                               2.103    0.808
    y6                1.186    0.169    7.024    0.000    2.493    0.746
    y7                1.280    0.160    8.002    0.000    2.691    0.824
    y8                1.266    0.158    8.007    0.000    2.662    0.828

Regressions:
  Dem60 ~
    Ind60             1.483    0.399    3.715    0.000    0.447    0.447
  Dem65 ~
    Ind60             0.572    0.221    2.586    0.010    0.182    0.182
    Dem60             0.837    0.098    8.514    0.000    0.885    0.885

Covariances:
  y1 ~~
    y5                0.624    0.358    1.741    0.082    0.624    0.296
  y2 ~~
    y4                1.313    0.702    1.871    0.061    1.313    0.273
    y6                2.153    0.734    2.934    0.003    2.153    0.356
  y3 ~~
    y7                0.795    0.608    1.308    0.191    0.795    0.191
  y4 ~~
    y8                0.348    0.442    0.787    0.431    0.348    0.109
  y6 ~~
    y8                1.356    0.568    2.386    0.017    1.356    0.338

Variances:
    x1                0.082    0.019                      0.082    0.154
    x2                0.120    0.070                      0.120    0.053
    x3                0.467    0.090                      0.467    0.239
    y1                1.891    0.444                      1.891    0.277
    y2                7.373    1.374                      7.373    0.486
    y3                5.067    0.952                      5.067    0.478
    y4                3.148    0.739                      3.148    0.285
    y5                2.351    0.480                      2.351    0.347
    y6                4.954    0.914                      4.954    0.443
    y7                3.431    0.713                      3.431    0.322
    y8                3.254    0.695                      3.254    0.315
    Ind60             0.448    0.087                      1.000    1.000
    Dem60             3.956    0.921                      0.800    0.800
    Dem65             0.172    0.215                      0.039    0.039
Reply | Threaded
Open this post in threaded view
|

Re: covariance estimate in function sem (Lavaan)

yrosseel
On 07/30/2012 11:00 PM, Luna wrote:
> Dear R users,
> I have a hard time interpreting the covariances in the parameter estimates
> output (standardized), even in the example documented (PoliticalDemocracy).
> Can anyone tell me if the estimated covariances are residual covariances
> (unexplained by the model), or the covariances of the observable variables?

They are *residual* covariances.

> I haved checked the data and it does not look like the covariances of the
> observable variables, however when I tried to find out using simulated data
> ( with correlated residuals) the estimates did not seem to be the covariance
> of the residuals either (much much underestimated). Can anyone help?

How did you simulate your data? It is rather tricky to generate data
under a known CFA/SEM model with pre-specified residual (co)variances.

Yves Rosseel.
http://lavaan.org

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: covariance estimate in function sem (Lavaan)

Luna
This post has NOT been accepted by the mailing list yet.
Hi Yrosseel,
Thanks for the reply. I first generated the factors (Ind60, Dem60, and Dem65) together with the disturbance,
Ind60=rnorm(n,mean=8,sd=3) #no disturbance
Dem60=Ind60*1.5+rnorm(n,mean=0,sd=1) #with disturbance
Dem65=0.8*Dem60+0.5*Ind60+rnorm(n,mean=0,sd=2) #with disturbance

and then the correlated residuals (e1-e11) for the indicators indicators (y1-y8 and x1-x3).
for example
e1=rnorm(n,sd=0.8)
e5=as.numeric(corgen(e1,r=0.6)$y) #correlated with e1
then generate all the indicators, for example
y1=Dem60+e1
y2=1.3*Dem60+e2

The final data contains only indicators, and the model can correctly estimate all the coefficients (like the 1.3 above) but the residual covariance does not seem to correspond to the covariance of e1 and e5.

Did I do something wrong?






On Sat, Aug 11, 2012 at 1:08 AM, yrosseel [via R] <[hidden email]> wrote:
On 07/30/2012 11:00 PM, Luna wrote:
> Dear R users,
> I have a hard time interpreting the covariances in the parameter estimates
> output (standardized), even in the example documented (PoliticalDemocracy).
> Can anyone tell me if the estimated covariances are residual covariances
> (unexplained by the model), or the covariances of the observable variables?

They are *residual* covariances.

> I haved checked the data and it does not look like the covariances of the
> observable variables, however when I tried to find out using simulated data
> ( with correlated residuals) the estimates did not seem to be the covariance
> of the residuals either (much much underestimated). Can anyone help?

How did you simulate your data? It is rather tricky to generate data
under a known CFA/SEM model with pre-specified residual (co)variances.

Yves Rosseel.
http://lavaan.org

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



If you reply to this email, your message will be added to the discussion below:
http://r.789695.n4.nabble.com/covariance-estimate-in-function-sem-Lavaan-tp4638454p4640022.html
To unsubscribe from covariance estimate in function sem (Lavaan), click here.
NAML