Differencing in Panel Data

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

diggetybo
Posts: 152
Joined: Mon Jun 23, 2014 12:04 am

Differencing in Panel Data

Postby diggetybo » Fri Jul 10, 2015 10:15 am

Hey everyone,

I have a quick question on differencing in the case of two-period panel data. I can't seem to match my textbooks answer of the following simple regression (of crime rate and unemployment):

d_crmrte = 15.40 + 2.22d_unem

I know in time series, I can simply difference by the syntax: d(xj)

But in this workfile I get the wrong results using that kind of syntax. How would we go about panel differencing?
Attachments
crime2.wf1
(36.81 KiB) Downloaded 276 times

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Differencing in Panel Data

Postby startz » Fri Jul 10, 2015 11:58 am

You need to restructure your workfile into a panel.

diggetybo
Posts: 152
Joined: Mon Jun 23, 2014 12:04 am

Re: Differencing in Panel Data

Postby diggetybo » Tue Jul 21, 2015 5:34 am

I tried forum search and related web queries throughout the week, couldn't find anything about reformatting unstructured data to panel data. It's probably too simple for much of the reading audience here. I, on the other hand, can't quite figure it out.

It seems rather arduous, when I set the workfile structure type to panel, it asks for cross section id and date id. In the above workfile, the date id is easy enough. It is "year". However there are over 20 explanatory series used. Is there an easy, more elegant solution that I am not aware of?

Please elaborate

Thank you

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Differencing in Panel Data

Postby startz » Tue Jul 21, 2015 6:13 am

You need to have a variable which identifies the cross section, like "state" or "country" or something.

diggetybo
Posts: 152
Joined: Mon Jun 23, 2014 12:04 am

Re: Differencing in Panel Data

Postby diggetybo » Tue Jul 21, 2015 7:02 am

Thanks startz, one follow up question though,

As an alternative solution, assuming I was forced to work with the current workfile structure, and wanted to perform a difference of the change over the years 82 and 87 (as seen in the "year" series in the workfile) for my regressors, rather than the current difference operation which is xt+1-xt, is there a way to denote this during my equation estimation?

Thank you very much

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Differencing in Panel Data

Postby startz » Tue Jul 21, 2015 7:22 am

Try the @elem function to identify the years you want.

diggetybo
Posts: 152
Joined: Mon Jun 23, 2014 12:04 am

Re: Differencing in Panel Data

Postby diggetybo » Tue Jul 21, 2015 7:47 am

Oh yes! That's working well. Now I can tweak it as needed, thanks again.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests