Announcement

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

  • panel data regression


    Hey,

    I'm running panel data regressions, but I want to find out the coefficients for each country separately.

    So for example I use: xtreg y x i.countryid i.time, fe

    Now the coefficients are same for all the countries. Is there a possibility to get to the coefficients for each country, beside running a time series regression for each country (I don't really want to do this)?

    Thank you in advance

    Flora

  • #2
    Flora:
    I'm not sure I get what you are after, but you may want to try:
    Code:
    bysort countryid: xtreg y x i.time, fe
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      To add to Carlo's suggestion, one might also consider

      xtreg y c.x i.countryid i.countryid#c.x i.time, fe

      You don't say what your panel is - if it is something within countries that doesn't switch countries, you'll have trouble with i.country as a regressor (but it could work in the interaction).

      Comment


      • #4
        Thank you guys!

        Comment

        Working...
        X