2-period difference panel regression

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

Kavorka
Posts: 47
Joined: Mon Nov 30, 2009 6:06 am

2-period difference panel regression

Postby Kavorka » Mon Feb 16, 2015 4:17 am

(please ask for my licence codes, and I will send them to you)

This should hopefully be 4 rather standard questions for you, but I have not figured them out so I would like to have some help.

I am having some computer assignments for my students.

I have a data set based on Stock and Watson’s book Intro. to econometrics (based on Stata, but I think EViews usually is more user-friendly).

I would like to replicate the result for my students (please see the attchment fatality.wf1 which is freely accessible from the website).
First I run a cross-section for 1988
smpl 1988 1988
ls MRALL c beertax

and then for 1982
smpl 1982 1982
ls MRALL c beertax
Then I do this using a FEM between 1982-1988, in order take into account for some omitted variables which do not change over time.

However, in the book (Stock and Watson page 355, eq.( 10.8 ) they also estimate a regression for 2 period Difference panel regression (only with 1988 and 1982). Difference regression (n = 48)

I tried Ls (MRALL(1988)-MRALL(1982)) c (beertax(1988)-beertax(1982)) but it is wrong... but you can see which model I want to estimate (therefore I write this out)

Q1---Therefore, instead I would like to know how to get the following result (for a 2-period panel difference regression)
The estimated result should be as below

MRALL(1988)-MRALL(1982) = –.072 – 1.04(BeerTax(1988)–BeerTax(1982))

(all cross-sections, US states, are included)

(N.B. it fatalities per 10 000 inhabitants)

Q2--- I guess I can change the sample so that we only have 1982 together with 1988 (all cross-sections, US states), like a 2-period Difference panel regression (did not figure that out, but it would be good to know how to do this not very elegant solution anyway).

Q3--- In another part of the question they only use 3 cross sections (only 3 cross-sections, US states: CA, TX, MA, but with all years 1982-1988). How can I change so that only these 3 states are taken into account together with all years between 1982-1988)? (Panel)

Q4--- With rather awkard programming I solved how to Entity-demean the panel (WG, within-group estimator), but is there a canned routine in EViews to solve this?

Thanks!
Attachments
fatality.xlsx
Fatality.xlsx (original file)
(143.84 KiB) Downloaded 470 times
fatality - original.wf1
Fatality (converted file to wf1)
(142.48 KiB) Downloaded 343 times

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: 2-period difference panel regression

Postby trubador » Mon Feb 16, 2015 6:21 am

For Q1 and Q2 the following trick should work:

Code: Select all

smpl @all if @year = 1988 equation eq.ls mrall-mrall(-6) c beertax-beertax(-6)
By the same token, you can confine your analysis to the states of your interest. I am not sure about the corresponding numbers of states, but you can do something along the following lines:

Code: Select all

smpl @all if state=1 or state=8 or state=13
As for your last question, I think you are looking for @meansby function:

Code: Select all

series mrall_dm = mrall - @meansby(mrall,@crossid,"1982 1988")

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: 2-period difference panel regression

Postby EViews Glenn » Mon Feb 16, 2015 8:51 am

On the last question, if you want to run the regression, use the "cx=f" option to ls

Kavorka
Posts: 47
Joined: Mon Nov 30, 2009 6:06 am

Re: 2-period difference panel regression

Postby Kavorka » Mon Feb 16, 2015 5:16 pm

Excellent help! Thanks!


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests