Announcement

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

  • Getting matrix of standard errors

    Dear all,

    I need to compute an index only with significant coefficients of two regressions.

    I already know how to get the coefficients of a regression in matrix-form (by using e(b)). Now I am wondering if there is a similar command to get the t-values or standard errors in matrix form? Or if there is another way achieving this?

    Tobi

  • #2
    Immediately after a regression command, the second row of r(table), which is labeled "se," contains the standard errors.
    Code:
    mat list r(table)  // b, se, t, etc.
    mat A = r(table)    // capture r(table) in some conveniently named matrix
    mat se = A[2, 1..colsof(A)]
    Also, in -help regress-, right after the description of e(b), you will see a description for e(V), indicating that it is the variance-covariance matrix of the coefficient estimates. The square root of each diagonal element is the standard error of each corresponding coefficient.

    In my response to your previous related post, the problem with "temp" was that I had failed to assign anything to it before using it; that is, -mat temp = r(table)- was needed. Sorry I did not have a chance to look at this until today.

    Regards, Mike

    Comment


    • #3
      Just a minor point on the matrix language. If you need one particular row of a matrix you can write

      Code:
      mat se = A[2, 1...]
      Works the same way if you want one particular column. And you can also extract ranges of columns (or rows). See help matrix.

      Comment

      Working...
      X