Announcement

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

  • Problem with 'beta' in estadd

    A colleagued tried to run some code I wrote using STATA version 18.1. The code is below and works fine on STATA version 15.1. On STATA version 18.1 the error message comes back as
    "e(beta) already defined." When I run the code below and switch "beta" to "mean" the code works fine.

    Any suggestions on how to fix estadd for STATA 18.1

    * Treated subjects v. Untreated subjects
    set more off
    eststo clear
    foreach y of varlist Age Prior Vprior TSPre Male Black Asian White Hispanic {
    eststo: regress `y' Treatment if Connect==0, beta
    estadd beta
    estadd local Group "Treated"
    }
    esttab using S_balance.rtf, cell(beta) drop(_cons) stats(Group, fmt(%9.3f %9.0fc)) replace
Working...
X