Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SUR error term correlation matrix from SEM

    Hi,

    I would like to run a Seemingly Unrelated Regression using complex survey weights. I understand I can do this using SEM.
    for example, I have the following code:
    Code:
    svy: sem (hls1avg <- $rhs) (hls2avg <- $rhs) (hls3avg <- $rhs) (hls4avg <- $rhs) (hls5avg <- $rhs) ///
        (hls6avg <- $rhs) (hls7avg <- $rhs) (hls8avg <- $rhs) (hls9avg <- $rhs) if age_65==1
    where $rhs is a macro for the variables I need.
    I'm wondering if there is a way to get the error correlation matrix?
    Any help greatly appreciated.

    Thanks,
    Jane.


  • #2
    You have not correlated the outcomes so there won't be any correlation among them. The other predictor variables in the model are assumed to be correlated. If you type:

    Code:
    mat li e(V)
    That should give you the covariance matrix among the other variables. The same can be obtained in a more structured way both in covariance and in correlation form using post estimation command -estat-:

    Code:
    estat vce //for covariance matrix
    estat vce, corr //for correlation matrix
    Roman

    Comment


    • #3
      Thank you Roman. How would I correlate all the error terms? Do I have to specify all the two way correlations or just as one?

      Comment


      • #4
        Hi Jane, just to clarify that I am not saying in #2 that you have to correlate the outcomes. Since I do not know your study design and what your variables are I cannot suggest that. All I indicated is that the model currently assumes, as you have defined it, the outcomes are independent of each other and you will not get any covariance from them. If you think they are correlated, you can define their covariance using the -cov- option. See below, for example, how to define covariance for the 3 variables hls1avg, hls2avg, hls3avg and you can add more based on what you think is justified. Read more here in -sem- help file for covariance structures . Also see the modification index , AIC, BIC, CFI -all these parameters- to see whether adding the covariances improve your model .

        Code:
        sem (hls1avg <- $rhs) (hls2avg <- $rhs) (hls3avg <- $rhs) (hls4avg <- $rhs) (hls5avg <- $rhs) ///
        (hls6avg <- $rhs) (hls7avg <- $rhs) (hls8avg <- $rhs) (hls9avg <- $rhs) if age_65==1, ///
        cov(e.hls1avg*e.hls2avg e.hls1avg*hls3avg e.hls2avg*hls3avg)
        Roman

        Comment


        • #5
          Thanks Roman.

          Comment

          Working...
          X