Announcement

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

  • First-Difference Regression with Panel Data

    Hello,

    I'm trying to retrace the empirical findings of Daniel M. Bernhofen, Zouheir El-Sahli und Richard Kneller (2013) in their Paper: Estimating the Effects of the Container Revolution on World Trade, CESifo Working Paper No. 4136. So I created a Panel with the bilateral exports, the portcont, fullcont, FTA and GATT Dummy and tried to run a first-differenced regression in stata. Here is an example of my data:

    Click image for larger version

Name:	paneldata.png
Views:	1
Size:	36.6 KB
ID:	1557327


    I imported the data and declared it as panel data:


    . xtset ID Jahr, generic
    panel variable: ID (weakly balanced)
    time variable: Jahr, 1962 to 1990
    delta: 1 unit

    But as soon as I run a fixed effect regression, all my dummies are ommited. How did the authors in the paper managed to run this regression? I only created the dummies like this: gen portcont = 1 if porti == 1 & portj == 1. I also created the variable logExporte.
    I know I still have to create lag time variables and the first-difference variable. But when I created: gen dlogExporte = d.logExporte, the variable had no data.

    Does somebody know where I made mistakes and how to run this regression in Stata?

    Thanks in advance!
    Attached Files

  • #2
    Greetings.

    I believe you should be aware of the conceptual restrictions of using fixed effects.

    Consider that fixed-effects can capture two types of effects, individual effects and time effects. If you're using dummy variables for each of the variables of interest, then your approach is an individual fixed effects approach (maybe the authors used dummy variables to capture a structural break).

    Now consider the word fixed. Meaning that it remains fixed "across time". If your variables are fixed over time (meaning they don't change over time) it's natural that in the first difference approach all of them get deleted. Why? Simply because if they remain fixed (e.g. a value of the fixed effect which doesn't change over time, then the variation gets the same over time, maybe a null effect) therefore fixed effects in first differences overrides the effects itself. and they are omitted.

    Comment


    • #3
      Hello,
      thank you for your fast response. Actually, the authors set the Importers and Exporters as fixed, which is automatically the case in my paneldata. So I dont need to set fixed effects anymore, right?
      Do you probably know why my first-differenced variable had no data then?

      Comment


      • #4
        To expand on John's helpful comment, if something doesn't vary within a panel than when you first difference it everything will be zero.

        It is by no means clear what you mean by setting importers and exporters as fixed. The thinking about fixed effects really should depend heavily on your modeling strategy.

        Often it is not necessary to do all of the difference variables since conventional fixed effects and first difference fixed effects give very similar results.

        Comment

        Working...
        X