Holtz-Eakin-Newey-Rosen example

Questions related to panel (pooled cross-section time series) data.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Holtz-Eakin-Newey-Rosen example

Unread post by TomDoan »

levierfr wrote:Tom,

No worries, we are all in the same boat here.

So let me get this straight: I obtain the first difference of the endogenous variables to get rid of the individual effects and essentially to use all the past information of Y(i,t) as instruments, which I do in the ablags step (restricting the max. no, of lags). Then I run a regression using these instrumental variable, then later use the GMM to estimate these regressions in a panel setting (hence the lwindow=panel). By then grouping these six linreg lines of code, I essentially replicate the VAR in a panel setting, and by running the SUR on it I get the covariance/correlation matrix of residuals. From here can I directly generate the appropriate IRFs and FEVDs using the IMPULSE and ERRORS commands? The steps should equal 5 (i.e. the max. lag) or 10 (given in textbooks).
That all sounds correct. The number of steps of IRF's doesn't have to match with the lags at all, but I probably wouldn't put much stock in them beyond about five simply because you have only 20 time series points, not because of the number of lags of instruments.

BTW, because you have 20 data points, and thus not a really small T, you can also try estimating the equations by standard fixed effects (on the undifferenced data)---the dynamic panel bias diminishes with T. That can be done by PREG one equation at a time, or by SYSTEM with a set of individual dummies as DETERMINISTICS. Those estimates would be (slightly) biased, but may have lower overall MSE than the GMM approach. A comparison of the results might be interesting.
levierfr
Posts: 9
Joined: Sun May 03, 2015 8:55 am

Re: Holtz-Eakin-Newey-Rosen example

Unread post by levierfr »

Dear Tom,

Thanks for your feedback. That could be interesting, I will defintely give it a shot.

At the momen, I am having difficulty generating the error bands for the IRFs with the @montevar procedure and was wondering whether you could answer a quick question of mine. I am able to generate the IRFs and FEVDs with no hassle, but when I use the @montevar procedure, I get the following error:

## MAT2. Matrices with Dimensions 6 x 6 and 36 x 6 Involved in + Operation
The Error Occurred At Location 570, Line 65 of MONTEVAR
/Applications/RATS Pro 9.0 Trial/Procedures/montevar.src Line 94

As you very well may know, I am no expert when it comes to RATS. Could you help me by indicating how the error could be fixed?

Kind regards,

Frank
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Holtz-Eakin-Newey-Rosen example

Unread post by TomDoan »

You can't apply @MONTEVAR to this type of model. Unlike a standard VAR, this isn't being estimated by OLS, and also unlike a standard VAR, it's not a likelihood-based estimation technique so the justification for the calculations in @MONTEVAR as draws from the posterior doesn't apply.

There are two approaches to getting error bands for this type of model. You can do a panel bootstrap, though with just 20 individuals, that might be a bit hard to justify. (Each bootstrap draw would do a random draw with replacement from the 20 individual records). You could also take draws from the asymptotic distribution for the lag coefficients. However, it sounds like you can't get a joint estimate of the covariance matrix of the coefficients for the full model because of the N-T size problem.
levierfr
Posts: 9
Joined: Sun May 03, 2015 8:55 am

Re: Holtz-Eakin-Newey-Rosen example

Unread post by levierfr »

Tom,

Thanks for your reply.

It seems I have no alternative to determine the significance of the IRFs other than the panel bootstrapping method.

How do I go about doing this panel bootstrap? Will they appear on the graphs of the IRFs?

Regards
levierfr
Posts: 9
Joined: Sun May 03, 2015 8:55 am

Re: Holtz-Eakin-Newey-Rosen example

Unread post by levierfr »

Or could you kindly suggest a way to determine the statistical significance of the impulse-responses?
levierfr
Posts: 9
Joined: Sun May 03, 2015 8:55 am

Re: Holtz-Eakin-Newey-Rosen example

Unread post by levierfr »

This is what the code looks like so far:

calendar(panelobs=22,a) 1990
all 22//2011:01
OPEN DATA "/Users/frank/Desktop/datafile_new_HC.xlsx"
DATA(FORMAT=XLSX,ORG=COLUMNS) 1//1990:01 22//2011:01 merg gf gdp fmd hc infl
print
set dmerg = merg-merg{1}
set dgf = gf-gf{1}
set dgdp = gdp-gdp{1}
set dfmd = fmd-fmd{1}
set dhc = hc-hc{1}
set dinfl = infl-infl{1}
@ablags(minlag=2,maxlag=5,collapse) merg abmerg
@ablags(minlag=2,maxlag=5,collapse) gf abgf
@ablags(minlag=2,maxlag=5,collapse) gdp abgdp
@ablags(minlag=2,maxlag=5,collapse) fmd abfmd
@ablags(minlag=2,maxlag=5,collapse) hc abhc
@ablags(minlag=2,maxlag=5,collapse) infl abinfl
instruments abinfl abhc abfmd abgdp abgf abmerg
linreg(inst,define=infleq) dinfl
# dinfl{1} dhc{1} dfmd{1} dgdp{1} dgf{1} dmerg{1}
linreg(inst, define=hceq) dhc
# dinfl{1} dhc{1} dfmd{1} dgdp{1} dgf{1} dmerg{1}
linreg(inst,define=fmdeq) dfmd
# dinfl{1} dhc{1} dfmd{1} dgdp{1} dgf{1} dmerg{1}
linreg(inst,define=gdpeq) dgdp
# dinfl{1} dhc{1} dfmd{1} dgdp{1} dgf{1} dmerg{1}
linreg(inst,define=gfeq) dgf
# dinfl{1} dhc{1} dfmd{1} dgdp{1} dgf{1} dmerg{1}
linreg(inst,define=mergeq) dmerg
# dinfl{1} dhc{1} dfmd{1} dgdp{1} dgf{1} dmerg{1}
linreg(inst,equation=infleq,optimal,lwindow=panel)
linreg(inst,equation=hceq,optimal,lwindow=panel)
linreg(inst,equation=fmdeq,optimal,lwindow=panel)
linreg(inst,equation=gfeq,optimal,lwindow=panel)
linreg(inst,equation=mergeq,optimal,lwindow=panel)
group pvar infleq hceq fmdeq gdpeq gfeq mergeq
sur(model=pvar,inst,zudep,update=continuous)

impulse(model=pvar,result=imps,steps=10)
errors(model=pvar,result=imps,steps=10)
compute implabel=|| "infl","hc","fmd","gdp","gf","merg"||
@varirf(model=pvar,steps=10,varlabels=implabel,page=byshocks)
Post Reply