How to calculate the variance of error terms of endogenous latent variables?

762 views
Skip to first unread message

tran viet Yen

unread,
Apr 9, 2018, 9:51:10 PM4/9/18
to lavaan
Dear all,

As far as I know, the latent endogenous variables accompany with an error term (denoted as "zeta") as described in the picture below, while the exogenous latent variables do not.

So how to exact information of these error terms? For instance, Ψ (psi) the covariance matrix of z? 


I tried to find information on this issue in Lavaan but I could not find anything. Any suggestion is highly appreciated.

Thanks so much for reading.

Best regards,

Tran Viet Yen.

Leslie Rutkowski

unread,
Apr 10, 2018, 9:11:03 AM4/10/18
to lavaan
Hi Tran Viet Yen,

Can you be more specific? Are you trying to figure out where in the output the psi estimates are? If yes, they are under "Variances." If no, please provide a bit more information.

Leslie

tran viet Yen

unread,
Apr 10, 2018, 8:05:10 PM4/10/18
to lav...@googlegroups.com
Hi Leslie,

Let's take a look on the results of the above model in Lavaan tutorial:


Under the estimates of Variances are the elements of:
Θϵ (the covariance matrix of ϵ),  in this case from y1 to y8, 
- Θd (the covariance matrix of  d),  in this case from x1 to x3, 
F (covariance matrix of ξ), in this case the covariance matrix of ind60
  Ψ (covariance matrix of  z), in this case the covariance matrix of dem60 and dem65

What I'm interested in is the two values in the last row (highlighted in yellow). We know that in a SEM: , so what is the implied objects of the values in the two last rows that correspond with dem60 and dem65:
- Are they the variance of zeta z? That means they are elements of  Ψ (covariance matrix of  z) 
- Are they the variance of eta  η ?

If the variance in the last two rows are psi estimate, then how to calculate the variance of eta η ?

Thank you very much.

Best regards,

Tran Viet Yen.

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+unsubscribe@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.



--
Trần Việt Yên
PhD Student
Civil and Environmental Engineering Department, Graduate school of Engineering, Nagoya University, Japan.

kma...@aol.com

unread,
Apr 10, 2018, 11:34:15 PM4/10/18
to lavaan
Tran Viet Yen,

Sometimes it helps to view the estimates in matrix form.

> lavInspect(fit, what='est')
$lambda
   ind60 dem60 dem65
x1
1.000 0.000 0.000
x2
2.180 0.000 0.000
x3
1.819 0.000 0.000
y1
0.000 1.000 0.000
y2
0.000 1.257 0.000
y3
0.000 1.058 0.000
y4
0.000 1.265 0.000
y5
0.000 0.000 1.000
y6
0.000 0.000 1.186
y7
0.000 0.000 1.280
y8
0.000 0.000 1.266

$theta
   x1    x2    x3    y1    y2    y3    y4    y5    y6    y7    y8  
x1
0.082                                                            
x2
0.000 0.120                                                      
x3
0.000 0.000 0.467                                                
y1
0.000 0.000 0.000 1.891                                          
y2
0.000 0.000 0.000 0.000 7.373                                    
y3
0.000 0.000 0.000 0.000 0.000 5.067                              
y4
0.000 0.000 0.000 0.000 1.313 0.000 3.148                        
y5
0.000 0.000 0.000 0.624 0.000 0.000 0.000 2.351                  
y6
0.000 0.000 0.000 0.000 2.153 0.000 0.000 0.000 4.954            
y7
0.000 0.000 0.000 0.000 0.000 0.795 0.000 0.000 0.000 3.431      
y8
0.000 0.000 0.000 0.000 0.000 0.000 0.348 0.000 1.356 0.000 3.254

$psi
      ind60 dem60 dem65
ind60
0.448            
dem60
0.000 3.956      
dem65
0.000 0.000 0.172

$beta
      ind60 dem60 dem65
ind60
0.000 0.000     0
dem60
1.483 0.000     0
dem65
0.572 0.837     0

 

You can see the estimates of interest in the psi matrix.  These are the residual/disturbance variances for the latent variables.  Because Lavaan uses the 'all y' parameterization, this includes both exogenous and endogenous variables.  ind60 is (syntactically) exogenous, so the residual/disturbance variance is also the variance of ind60 because the implicit loading is tacitly fixed to 1 and there are no other contributors.  In contrast, dem60 and dem65 are (syntactically) endogenous.  So, the residual/disturbance variances will be less than the total variance of the latent variable itself because other sources also contribute to the total variance of these variables.

I am not sure whether that was what you were asking but I hope that it helps.

Keith
------------------------
Keith A. Markus
John Jay College of Criminal Justice, CUNY
http://jjcweb.jjay.cuny.edu/kmarkus
Frontiers of Test Validity Theory: Measurement, Causation and Meaning.
http://www.routledge.com/books/details/9781841692203/

tran viet Yen

unread,
Apr 11, 2018, 12:24:10 AM4/11/18
to lav...@googlegroups.com
Dear Keith,

This is the estimates of the model above:

I agree with you that there is no error term for exogenous latent variable, hence the variance in the row 32  is the variance of ind60. However, for other endogenous variables and even the observed variables, there is always an error term accompanying with them. For instance, we know that: . So the value 0.082 in the variance of x1 (in row 21) stands for variance of x1 or d1? If we need to have the variance of both x1 and d1 , then we have to manually calculate?

PS: I think the term "residual" should be used for observed variables only. Because it is understood as the discrepancy between the observed value and the implied value.

Thank you for your comment.

Best,

Yen.



--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+unsubscribe@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Leslie Rutkowski

unread,
Apr 11, 2018, 10:48:53 AM4/11/18
to lavaan
Hi Yen,

All of the latent variable variances are reported together - exogenous and endogenous residual variance. As Keith mentions, this all shows up in the psi matrix. But if you are adhering to LISREL notation, where phi is the exogenous latent variable variance, then this will cause some confusion. So, the point is that for endogenous LVs, the "variance" estimates are conditional variance estimates. And for exogenous LVs, the "variance" estimates are marginal variance estimates. 

Similarly, if you are dealing with a measurement model, variance that is reported for the indicators is the measurement error variance. 

Hope this helps,
Leslie
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.

To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

tran viet Yen

unread,
Apr 12, 2018, 2:40:27 AM4/12/18
to lav...@googlegroups.com
​Hi ​Leslie,

Thank you for your comment. I understand that Lavaan does not differentiate between exogenous and endogenous variables when estimating the variance, hence only psi matrix.

By the way, can you explain why you called the variance estimate of endogenous latent variables as "conditional" variance?

Best,

Yen.

To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+unsubscribe@googlegroups.com.

To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

kma...@aol.com

unread,
Apr 12, 2018, 9:12:11 AM4/12/18
to lavaan
Yen,
I do not know what you mean by d1.  This label does not occur in the summary of estimates that you pasted.

However, your language suggests that you are still unclear about the parameterization.  When Leslie referred to "LISREL notation" he meant the full LISREL model.  Lavaan also uses a LISREL model but uses a submodel commonly referred to as the all-y model.  Essentially, what are separated as x and y variables in the full model are all modeled as y variables in the all-y model.

There is a one-to-one correspondence between parameters in the full LISREL model and the all-y model.  The variance of an endogenous variable is not a parameter in either model.  However, you can obtain the implied variances from the main diagonal of the implied covariance matrix.  Which parameterizaion is used by the software has no impact on this.

The full LISREL model stands at one end of a continuum.  Designed at a time when computing costs were high, the full model was designed to minimize the use of large matrices with many zero elements.  The solution was to break up the model into seven matrices to keep each matrix small.  The all-y model falls somewhere in the middle of the continuum.  If you follow the logic to the other extreme, you get the reticular action model which underlies the sem package in R.  This model uses only three matrices.  All symmetric coefficients are collected into a single matrix, including variances, residuals on latent variables, unique variances for observed indicators, as well as any covariances.  This model gains in elegance what it gives up in computational efficiency.

If you think of factor indeterminacy by holding the identity of the factor fixed and attributing indeterminacy to its values, then what you said about residuals makes sense.  However, the same logic applies to the term 'error'.  So, if you think about things this way, there will be parameters for which you have no term with which to refer to them.  Instead, I prefer to think of the values of every factor as determinate and apply factor indeterminacy to the identity of the factor (that is, which factor of the many possible factors is the one represented in my model?).  This way, terms like residual and error always make sense.

Leslie Rutkowski

unread,
Apr 12, 2018, 9:41:31 AM4/12/18
to lavaan
Hi Yen,

Sure, it's conditional because it's what's left after accounting for the predictors. Formally, var(eta | xsi), for example. 

Best,
Leslie

kma...@aol.com

unread,
Apr 12, 2018, 9:51:41 AM4/12/18
to lavaan
Yen,
Maybe I was a little too terse on this point.  The unfiltered symmetric matrix in the RAM parameterization contains the implied variances for both latent and observed variables.  To obtain these in Lavaan, you need to request one matrix for the observed variables and another for the latent variables.

lavInspect(fit, what='sampstat')$cov
lavInspect
(fit, what='cov.lv')

kma...@aol.com

unread,
Apr 12, 2018, 1:36:50 PM4/12/18
to lavaan
I had forgotten about 'cov.all' until I saw it in Terrence's post.  Here is a way to display all the implied variances with no distractions.

round(diag(lavInspect(fit, what='cov.all')),2)

Also, I pasted the wrong line earlier.  Where it says 'sampstat' it should have been 'sigma'.
Reply all
Reply to author
Forward
0 new messages