Time-varying effects in a fixed effects panel model

Hello Statlist,

I have a relatively balanced panel of about 700 locations, observed on a decadal basis between 1940 and 2010 (T=8). My baseline specification is a two-way fixed effects model - something like:

where y is the log of a continuous variable; x, which is my key independent variable, is a fraction ranging in practice between 0 and about 0.65; and z is a vector of controls.

However, my theory leads me to expect the effect of x on y to vary by year - or at least by some periods within my overall panel. Motivated by this idea, I have tried versions where I run the model above separately for years within each distinct period. Confirming the intuition given by theory, this tells me that x is not significant for period 1, and is positive and significant in period 2. So, below are results for period 1, followed by those for period 2:

Here is my question: Based on the idea that another way of thinking of this is that the slope of x on y depends on the year, and that within 'periods' slopes may not be consistent (my mental picture is something like a sine-wave across time) I was wondering if it makes sense to run something like

After running a regression like this, I have tried to interpret the resulting output using margins, as follows:

this produced the following:

Based on my naive interpretation, the results are the opposite of what I got when I did the 'period' based regressions - ie coefficients for years in period 1 are positive and significant, and the coefficients for years that fall into period 2 are negative, and largely insignificant.

However - it may be that I am misinterpreting these results...more generally I am not quite clear on whether to interpret margins in a FE model differently from what one would do with a non-panel OLS model.

Another possibility is that this interaction-based approach is not sensible given the questions I am chasing down.

I would welcome the collective wisdom of the list!

Thank you

Tom

Hello Statlist,

I have a relatively balanced panel of about 700 locations, observed on a decadal basis between 1940 and 2010 (T=8). My baseline specification is a two-way fixed effects model - something like:

Code:

xtreg y x z i.year, fe

However, my theory leads me to expect the effect of x on y to vary by year - or at least by some periods within my overall panel. Motivated by this idea, I have tried versions where I run the model above separately for years within each distinct period. Confirming the intuition given by theory, this tells me that x is not significant for period 1, and is positive and significant in period 2. So, below are results for period 1, followed by those for period 2:

Code:

. eststo l1: xtreg y x z i.year if year<1990, fe // convergence Fixed-effects (within) regression Number of obs = 2,665 Group variable: czone Number of groups = 687 R-sq: Obs per group: within = 0.9482 min = 1 between = 0.1759 avg = 3.9 overall = 0.7102 max = 5 F(6,1972) = 6016.99 corr(u_i, Xb) = -0.1600 Prob > F = 0.0000 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .0578142 .1297792 0.45 0.656 -.1967045 .312333 z | -.02596 .0120427 -2.16 0.031 -.0495778 -.0023422 | year | 1950 | .4027728 .0064565 62.38 0.000 .3901105 .4154351 1960 | .6947271 .0073666 94.31 0.000 .68028 .7091743 1970 | .9610166 .008406 114.33 0.000 .9445311 .9775021 1980 | .9730421 .0096244 101.10 0.000 .954167 .9919173 | _cons | 2.155035 .0719909 29.93 0.000 2.013849 2.296221 -------------+---------------------------------------------------------------- sigma_u | .19346937 sigma_e | .09002546 rho | .82201413 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(686, 1972) = 7.69 Prob > F = 0.0000

Code:

. eststo l2: xtreg y x ltp i.year if year>1970, fe // divergence Fixed-effects (within) regression Number of obs = 2,478 Group variable: czone Number of groups = 696 R-sq: Obs per group: within = 0.7363 min = 1 between = 0.5035 avg = 3.6 overall = 0.5922 max = 4 F(5,1777) = 992.10 corr(u_i, Xb) = -0.1616 Prob > F = 0.0000 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | .1704771 .060941 2.80 0.005 .0509535 .2900006 z | .0579945 .0093522 6.20 0.000 .0396521 .0763369 | year | 1990 | -.0151207 .0030884 -4.90 0.000 -.021178 -.0090634 2000 | .0730655 .003749 19.49 0.000 .0657125 .0804185 2010 | .1147842 .0047111 24.36 0.000 .1055443 .124024 | _cons | 2.54693 .0568694 44.79 0.000 2.435393 2.658468 -------------+---------------------------------------------------------------- sigma_u | .08922207 sigma_e | .04943455 rho | .76511993 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(695, 1777) = 9.39 Prob > F = 0.0000

Code:

xtreg y i.year##c.x z, fe

Code:

margins year, at(x=(0(0.1)0.7)) marginsplot, xdimensions(at(x)) recast(line) recastci(rarea)

Based on my naive interpretation, the results are the opposite of what I got when I did the 'period' based regressions - ie coefficients for years in period 1 are positive and significant, and the coefficients for years that fall into period 2 are negative, and largely insignificant.

However - it may be that I am misinterpreting these results...more generally I am not quite clear on whether to interpret margins in a FE model differently from what one would do with a non-panel OLS model.

Another possibility is that this interaction-based approach is not sensible given the questions I am chasing down.

I would welcome the collective wisdom of the list!

Thank you

Tom

## Comment