Announcement

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

  • How to compare countries in panel data regression?

    Hi everyone

    I am comparing variables for 3 countries over 20 years and I would like to have a coefficient on each explanatory variable for each country. I'm not sure if I should use dummy variables for the countries or if there is another way ?
    By independent variable is Disease.
    My explanatory variables are GDP, population and DAH.
    MY countries are named 1,2 and 3.

    I have set xtset Country, Year.
    And then I write "xtreg Disease GDP pop DAH". But I am not sure if this is giving the results for all countries together? I would like to have three tables as I have three countries.

    I would really appreciate some help here, thank you !

  • #2
    https://en.wikipedia.org/wiki/The_Nolans were a thing. I never heard any of their work (that I can remember).

    More seriously, the request here is to use a full real name. It's a request not a rule, but I've heard experienced users say: If people ignore that request, I don't take them seriously. That's their choice.

    More at https://www.statalist.org/forums/help#adviceextras #3

    In terms of your question: Yes, xtreg as you show it includes all the countries: look at the results with number of observations and number of groups.

    If you want separate results, use regress with if.

    To be frank at the enormous risk of seeming unfriendly: I am not a panel expert in any sense, but I understand this to be basic stuff panel-wise. The panel chapters of your econometric text or the equivalent text or your lecture notes are where this is explained. People may be reluctant to turn into personal tutors. Conversely if you want a personal tutor and are willing to pay, ask people to contact you by a message.

    Comment


    • #3
      Thank you for your rapid response. Unfortunately I have tried using 'if Country=1" but it says r2001 "insufficient observations" even though I should have about 30 for each country... I don't understand why

      Comment


      • #4
        ...and potentially interested listers do/will not understand either, unless you provide them with more details (echoing Nick's wise recommendation: read and act on the FAQ, not only about real names preference. Thanks).
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5

          Please show the results of

          Code:
          dataex Disease GDP pop DAH if country == 1
          Note the use of == (which you probably typed, as otherwise the error would have been different).

          Comment

          Working...
          X