Announcement

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

  • #16
    Originally posted by Carlo Lazzaro View Post
    Simon:
    1) if you actually have panel data, (pooled) OLS should not be your first choice;
    2) if you have repeated time values, you can simply -xtset- your panel dataset with your -panelid- only:
    Code:
    xtset panelid
    However, this fix comes at a cost of making time-series operators unfeasible;
    3) if your regressand is continuos, you can go -xtreg-.
    Hello, I am having a similar problem with repeated time values. I have a pooled panel data, that is the interviewees are selected at random each year, but are selected from the same region. I want to look at regional effects, but since the combination of region and year are not unique I failed to "xtset region year, yearly", so I was wondering if I can simply "xtset region", but then how would I control for the time variable?

    Thank you, Gigi

    Comment


    • #17
      Gigi:
      welcome to this forum.
      You can -xtset- your dataset with the -panelid- only and add -i.year- as a predictor in the right-hand side of your regression equation.
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #18
        Hi, I tried doing that but my independent variable became negative, but when I ran the regression earlier without the i.year (v007=year in my data) it was fine. What I expected is that the probability of stunting is higher in the "mita" districts.

        variabels explained:
        "stunting" is a binary variable =1 if the child is stunted, =0 otherwise. is my dependent variable
        "mita" is the binary variable =1 if the district historically belonged to an extractive institution called 'mita' =0 other wise.
        "b4" is the gender of the child
        "v218" is the number of living children in the household
        "v007" is the variable for year of interview


        I want to run a logit regression on the probability of stunting and 'mita' districts with fixed effect on 'region' and 'gender' but I am really struggling with the commands. Please suggest what I can do. Thank you ver much!

        Sorry for the screen shot I don't know how to import Stata results into the forum.

        Gigi

        without i.v007

        Screenshot 2022-04-20 at 15.54.50.png

        with i.v07 added on

        Screenshot 2022-04-20 at 15.59.57.png

        Comment


        • #19
          Gigi:
          1) please use CODE delimiters to share what you typed and what Stata gave you back (just clincing the #.shaped toggle you will get . Just put the stuff in between);
          2) -mita- is never different from zero, no matter your -xtlogit- code.
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment

          Working...
          X