Announcement

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

  • Time Fixed Effects

    Hello,

    I am working with panel data containing 22 years and more than 160 countries. I want to run regressions using fixed effects for time periods and regions. Here I use regions instead of countries and break down the 22-time frame into two periods each of them having 11 years.

    I want to control for unobservables by using FE. I have tried several regressions, but I am finding difficulty in telling the difference between the following two commands because they give me totally different results. The first one gives me insignificant variables, while the second gives me some significant variables, which leaves me to question which one I should take and why?

    asdoc xtreg lnvdem lnreal lngini lnedu lnunemp if period == 1, fe replace
    asdoc xtreg lnvdem lnreal lngini lnedu lnunemp i.period, fe replace

    Period = 1 if the time period of the second, i.e. from 2007 to 2017 and 0 otherwise.

    Many thanks!

  • #2
    Hi Uendi,

    A good habit to use Stata is to use only lowercase letters in your variable names, except you have special reasons.
    Code:
    rename *, lower
    I'm confused which FE you want to use. One is two-way FE: periods and regions. The other one is periods * regions. I assume you use two-way FE. But you probably consider the second also.

    Your first line of code only includes period == 1. In other words, you drop all period == 2 observations, thus your first line of code is totally wrong.

    Comment


    • #3
      Uendi:
      as an aside to Yao's helpful advice, please note that with 22-year long T dimension, -xtregar,fe- may sound as better choice.
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #4
        Hi Yao and Carlos,

        Thank you, I appreciate your time and help!

        To respond to your question Yao, yes, I am using two-way FE, which leads me to another question. Namely, I have seven regions, for which I have created a corresponding numerical dummy called "reg". So I would have for example the following:

        gen reg = 1
        replace reg = 2 if region == "North America"
        replace reg = 3 if region == "Latin America & the Caribbean" and so on until I come to reg = 7.

        In this case would the two-way FE regression model be the following:

        asdoc xtregar lnvdem lnreal lngini lnedu lnunemp i.period i.reg, fe replace

        or do I have to create six dummies (number of regions - 1) and regress as below:

        gen reg1 = 1 if region == "North America"
        gen reg2 = 1 if region == "Latin America & the Caribbean" and so on... until reg6 = 1 if region == "Oceania"?

        asdoc xtregar lnvdem lnreal lngini lnedu lnunemp i.period i.regi, fe replace

        A better question would be: what is the difference between using one or the other?

        Many thanks!

        Comment


        • #5
          It is a good idea to simplify what you're doing as much as you can before posting it. asdoc is largely irrelevant to the issues you're dealing with so don't add it in.

          It doesn't matter what regression estimator were using, they have the same issue. If we want separate parameters for two groups, we can either run the model on the subsample one group and then on the subsample for the other group or, we can interact the right-hand side variables with i.group. The results should be very similar [with fixed effects they may be somewhat different because you're allowing separate fixed effects for both subsamples when you do the two regressions and only one set of fixed effects when you do one regression] but remember the results for group equals one will be the main effect plus the parameter for group equal one.

          Comment

          Working...
          X