Announcement

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

  • How to call the stored results in e()?

    I am using did_imputation and I read over the help file. I saw a part about the result regarding Stored result, I post a piece of this part here

    Stored results

    did_imputation stores the following in e():

    Matrices
    e(b) A row-vector of the estimates and pre-trend coefficients:
    - If horizons is specified, the program returns tauh for each h in the list of horizons.
    - If multiple wtr are specified, the program returns tau_v for each v in the list of wtr variables.
    - Otherwise the single returned coefficient is called tau.
    - In addition, if pretrends is specified, the command returns preh for each pre-trend coefficient h=1..pretrends.
    e(V) Corresponding variance-covariance matrix
    e(Nt) A row-vector of the number of treated observations used to compute each estimator

    Scalars
    e(Nc) the number of control observations used in imputation (scalar)
    e(pre_chi2), e(pre_p), e(pre_df)
    if pretrends is specified, the Wald statistic, pvalue, and dof for the joint test for no pre-trends
    e(Niter) the # of iterations to compute SE
    I am wondering how to call these value after running a regression by using did_imputation?

  • #2
    Code:
    local n_controls_used = e(Nc) // STORE SCALAR RESULT IN A LOCAL MACRO
    scalar n_iter = e(Niter) // STORE SCALAR RESULT IN A SCALAR
    
    matrix V = e(V) // STORE COVARIANCE MATRIX IN A STATA MATRIX
    matrix b = e(b) // STORE VECTOR OF ESTIMATES IN A STATA MATRIX
    By the way, there is nothing special to did_imputation about this. This process works after any Stata estimation command.

    Comment

    Working...
    X