Announcement

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

  • Storing estimates from bysort: reg command into a new variable

    Hello,

    First time Statalist user here (please let me know if there is any way to improve my post)!
    I am using individual-level panel data that includes variables for income, years of education, and occupation-industry. I use the below code to estimate the returns of education on income, by industry-occupation.
    Code:
    bysort occupation_industry: reg income education, r
    I would like to store all of the coefficients for education in a variable, but I was not able to find any options in the regress command that allow me to do this. I would usually use _b[varname] or estimates save to save coefficients but as far as I am aware, these are not compatible with bysort: regress.

    Any suggestions?

  • #2
    Code:
    ssc install asreg
    It will automatically save the coefficients as variables.

    Comment

    Working...
    X