Page **1** of **1**

### Rolling estimation with panel data

Posted: **Wed Oct 11, 2017 9:06 am**

by **PM.GR**

Hello,

I have a balanced panel model, with 18 sections and 170 points in time. At its current version it is very simple, given that it only contains one explanatory and a constant. I have estimated it in constant-parameters form with system GMM FE. Now I want to lift the constant-parameters assumption and test for time-variation of the aplha and beta parameters, while also possibly incorporating more determinants in next steps.

I have previously run rolling regression in time series equations, but have not found a similar formula for panel data.

Is there any (ideally ready-to-use) add-in for rolling the time dimension of the sample in panel data?

Thank you in advance!

### Re: Rolling estimation with panel data

Posted: **Thu Oct 19, 2017 3:00 am**

by **PM.GR**

In order to give more details:

I want to capture the time-variation of the coefficients of the relationship, which involves a balanced panel data of 170 time-observations across 18 sections. Currently, I have done the time-varying coefficient estimation, only for the cross-section dimension (i.e. with 1 time-observation); however, this way I cannot incorporate cross-section fixed effects. So, I need to estimate the panel FE specifications for 170-T1 time observations (T1=the dimension of the period observations included in the first estimation). One way to do this is to manually estimate 170-T1 panel data equations.

However, rolling over the sample may be easier; it will certainly be less time-consuming. Technically, this could be done by estimating the relationship for an initial sub-sample, e.g. consisting of 40 out of the total 170-time observations. Then, rolling the period could be done, by adding at the end of the period one time-observation and removing one time-observation from the start of the sample, across all sections. In this way, the same relationship, for the same number of sections, could be re-estimated, by employing LS (in case of TV-parameters LS will do the job) with cross-section fixed effects.

Is it possible to adjust the 'roll' or the 'advroll' add-ins in order to perform panel data estimation with LS-FE?

### Re: Rolling estimation with panel data

Posted: **Thu Oct 19, 2017 8:00 am**

by **EViews Gareth**

The typical rolling regression code works just fine in a panel context, since sample changes are the same.

You'll just need to change a line that estimates an equation to include the fixed effects option

(so rather than something that says .ls you would have something that says .ls(cx=f) ).

### Re: Rolling estimation with panel data

Posted: **Fri Oct 20, 2017 2:40 am**

by **PM.GR**

Thank you Gareth. I will try that.

### Re: Rolling estimation with panel data

Posted: **Fri Oct 20, 2017 3:17 am**

by **PM.GR**

Gareth,

The 'roll' add-in works fine, when I try time-series; however, trying to apply the 'roll' formula in my panel data results to an error message of the type: "Procedure cannot be run in panel workfiles". Moreover, I couldn't find the .ls command in its code.

Perhaps, I should not use the 'roll.prg' add-in, but some code for rolling the sample, as you mention? If yes, could you please provide it?

### Re: Rolling estimation with panel data

Posted: **Fri Oct 20, 2017 7:37 am**

by **EViews Gareth**

### Re: Rolling estimation with panel data

Posted: **Tue Nov 28, 2017 3:39 am**

by **PM.GR**

Sorry, Gareth. I do not understand what I am supposed to see in the discussion you refer.

What I understand from the latest posts in that discussion is that rolling of the time dimension in a LS estimation, while keeping the functions and the cross-section unchanged is not an easy task.

Thanks anyway.