Announcement

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

  • How to get a fixed effects coefficients using statsby command

    statsby mpg=_b[mpg], by(foreign) nodots: regress price weight length mpg

    Likewise the above regression, I want to get the industry fixed effect coefficients for each industry and assign them their respective industry codes as a variable name. In regression, I have used i.industrycode, which works, but the variable name for the coefficients is random such as "_stats_." I tried to add i.industrycode = _b[i.industrycode], but Im getting an error. Is there any way to do it

  • #2
    It isn't clear to me what kind of data you have, nor what you are trying to do. The code you show is for an ordinary regression on non-panel data. But apparently you are trying to do something with panel data. Please post back and use the -dataex- command to show an example of your actual data, and also show the full and exact -statsby- command you are trying to get running.

    Comment


    • #3
      I think you should try to manually generate your industry dummies, and give them some names you like, e.g., their respective industry codes .

      Comment

      Working...
      X