Announcement

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

  • Save standard errors after -areg-

    Good morning,
    I am building tables for the output of a regression run using -areg- command and I am wondering how could I save standard errors for the cofficients of interest given that -areg- save the variance-covariance matrix in e(V).
    Thanks for you help

  • #2
    They are already available to you in the "virtual" vector _se. So, for example:

    Code:
    webuse nlswork, clear
    areg ln_wage hours tenure, absorb(idcode)
    local se_cons = _se[_cons]
    local se_hours = _se[hours]
    local se_tenure = _se[tenure]
    will save those standard errors in local macros that you can then use later.

    Or if you want to create a vector (matrix) of the standard errors:

    Code:
    matrix std_errors = vecdiag(e(V))
    forvalues i = 1/3 {
        matrix std_errors[1, `i'] = sqrt(std_errors[1, `i'])
    }
    does that.


    Comment

    Working...
    X