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?
Differencing in Panel Data
Moderators: EViews Gareth, EViews Moderator
Differencing in Panel Data
- 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
You need to restructure your workfile into a panel.
Re: Differencing in Panel Data
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
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
You need to have a variable which identifies the cross section, like "state" or "country" or something.
Re: Differencing in Panel Data
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
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
Try the @elem function to identify the years you want.
Re: Differencing in Panel Data
Oh yes! That's working well. Now I can tweak it as needed, thanks again.
Who is online
Users browsing this forum: No registered users and 2 guests
