Announcement

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

  • Fixed Effects on Panel Data

    Dear all,

    I am unsure about conducting pandel data with FE estimation. I use xtreg depvar variablelist, fe. Does this command automatically take care of both the country or region and time effect that are present in the fixed effect model? And how can I test whether there is a country effect but no time effect, or the other way around? What are the commands?

    Thanks a lot

  • #2
    As far as I know, the fixed effects model is
    \[ y_{it} = \alpha + X_{it} \beta + \eta_i + \varepsilon_{it} \]
    So it only includes fixed effects by cross sectional unit. This is what xtreg, fe does. If you want time effects you have to include them explicitly,
    To test for individual effects or time effects you could just try them explicitly in a regression with regress and then test their joint significance.

    PD:
    1) Statalist courtesy is to post under your real name. Please read the FAQ
    2 ) This is discussed in the manual entry for xtreg. Please read those before posting to Statalist.
    3) Please provide tags for your question. Suggested tags are: Panel Data, xtreg.
    Last edited by Jorge Eduardo Perez Perez; 15 Apr 2014, 12:54.
    Jorge Eduardo Pérez Pérez
    www.jorgeperezperez.com

    Comment


    • #3
      You can do two-way clustering with either xtivreg2/ivreg2 or cgmreg.

      ivreg2, cluster(varname1 varname2) provides 2-way cluster-robust SEs described by Cameron, Gelbach and Miller (2006) and Thompson (2009). These are robust to arbitrary within-group correlation in two distinct non-nested categories defined by varname1 and varname2 (like panel id and time). The order of varname1 and varname2 does not matter, but calculations will be faster if the category with the larger number of categories is listed first. xtivreg2 is a basically a wrapper for ivreg2. Despite the IV in the command name, no IVs are required.

      cgmreg implements 2-way and multi-way clustering for OLS. The two-way clustered variance-covariance estimator is calculated using 3 different VCEs: one clustered on varname1, the second clustered on varname2, and the third clustered on the intersection of varname1 and varname2. ivreg2 and cgmreg will produce slightly different SEs because they make different adjustments.
      Last edited by Dimitriy V. Masterov; 15 Apr 2014, 17:47.

      Comment


      • #4
        Thank's for all answers. I also got some tips from other sources saying that, in specifying fixed effects with Country and Year fixed effects, we can do (other than xtreg Y X, fe):
        (1). xi: regress y x1 x2 x3 x4 x5 x6 x7 i.country i.year
        (2). xi: areg y x1 x2 x3 x4 x5 x6 x7 i.year, absorb(country)
        (3). xi: xtreg y x1 x2 x3 x4 x5 x6 x7 i.year, fe

        Having conducted those commands, I found that the coefficients are the same, but R Square are different for each one. Command (1) has a lot higher r square (probably because more dummies are included) than the (3) one. Which one should I use in this case?

        @Jorge eduardo perez: I have sent a mail to administrator to change my user name.

        Comment


        • #5
          That is a FAQ. http://www.stata.com/support/faqs/st...rsus-xtreg-fe/

          Comment

          Working...
          X