Announcement

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

  • Creating new VCE matrix

    Hello,

    I am runnning the following model

    Code:
    sem(M<-T C1 C2 C3)(Y<- T M C1 C2 C3)
    and I get the direct/indirect effects using the option
    Code:
     estat teffects
    which uses the VCE matrix from the previous estimation. This matrix size is e(V) [11,11]

    The SE of my second equation however need to be corrected so I need to create a new VCE matrix containing the corrected SE of the second equation.

    Since the sem command essentially estimates two OLS regressions, I have proceed as follows:

    Step 1 - Estimate VCE from equation 1
    Code:
    reg M T C1 C2 C3
    matrix vceq1 = e(V)
    The size of vceq1 is [5,5]

    Step 2 - Show VCE from equation 2 using corrected SE previously calculated.
    Code:
    matrix list vceq2
    The size of vceq2 is [6,6]

    What I need to do is to create a new VCE matrix, newvce, that contains the information of vceq1 and vceq2 and with a size [11,11] so that I can run the following command

    Code:
    sem(M<-T C1 C2 C3)(Y<- T M C1 C2 C3)
    matrix b=e(b)
    ereturn post b newvce
    estat teffects
    Could anyone tell me how to create the new matrix newvce?

    Thank you very much for your help.
    Rubén


Working...
X