ABLAGS - Generates Arellano-Bond instruments

Use this forum to post complete RATS "procedures". Please be sure to include instructions on using the procedure and detailed references where applicable.

ABLAGS - Generates Arellano-Bond instruments

Postby TomDoan » Thu Aug 04, 2011 1:58 pm

ABLags generates a VECT[SERIES] with the expanded panel data instruments for doing Arellano-Bond instrumental variables estimation. This is also used in the Holtz-Eakin--Newey-Rosen technique for estimating panel VAR's with individual effects. This does one series at a time, so with multiple explanatory variables, you'll need to use ABLAGS for each.

Updated August 2011 to add the MINLAGS option and March 2012 to add COLLAPSE

ablags.src
Procedure file
(3.63 KiB) Downloaded 125 times


@ABLags( options ) series abseries start end

Parameters

series (input) series for which lagged IV's are to be generated
abseries (output) VECT[SERIES] of expanded instruments
start end range (within each individual) that will be used for estimation


By default, start is entry 3 and end is the number of observations. If you estimate over a smaller range without adjusting these, the results will be correct, but you'll get a warning about redundant instruments.

Options

MAXLAG=Highest lag number to use [maximum possible, which will be the number of entries in each individual - 1]
MINLAGS=Lowest lag number to use [2]. For pre-determined variables, you can use MINLAGS=1. The default value of 2 is for endogenous variables (if the model uses one lag)
COLLAPSE/[NOCOLLAPSE]

[b]Description

This will generate a VECT[SERIES] which has a separate series for each combination of time period within the panel and lag for all lags>=MINLAGS and <=the value of the LAGS option, that is, when generating a value for the pair of (S,L), it will be series(S-L) at entry S within an individual's record and zero otherwise. With COLLAPSE, there will only be one for each lag. Either COLLAPSE or MAXLAG is needed for large T data sets to prevent the number of instruments from becoming excessive.

References

Arellano, M. and S. Bond (1991). "Some Tests of Specification for Panel Data: Monte Carlo Evidence and an Application to Employment Equations." Review of Economic Studies, Vol. 58, pp. 277-297.

Holtz-Eakin, Newey and Rosen(1988), "Estimating Vector Autoregressions with Panel Data," Econometrica, vol. 56, no 6, pp 1371-95.

Example

Code: Select all
*
* Greene, Econometric Analysis, 6th Edition
* Example 15.10, pp 476-9
*
open data tablef15-1.txt
calendar(panelobs=9) 1979
data(format=prn,org=columns) 1//1979:01 265//1987:01 id year expend revenue grants
*
set ds = expend-expend{1}
set dr = revenue-revenue{1}
set dg = grants-grants{1}
*
set d1983 = %year(t)==1983
set d1984 = %year(t)==1984
set d1985 = %year(t)==1985
set d1986 = %year(t)==1986
set d1987 = %year(t)==1987
*
* Generate the Arellano-Bond instruments over the required range
* (1983:1 to 1987:1)
*
@ablags expend  abspend  1983:1 1987:1
@ablags revenue abrev    1983:1 1987:1
@ablags grants  abgrants 1983:1 1987:1
*
set smpl = %year(t)>=1983.and.%year(t)<=1987
*
* The authors of the original paper used only the "own" lags as
* instruments, which is repeated in the textbook. Ordinarily, you would
* use all three sets of "AB" instruments for all equations. This also
* allows for general serial correlation within the individual records
* (LWINDOW=PANEL). The weight matrix is computed using the 3 lag
* regression, with the same weight matrix being used for the shorter
* lags.
*
* Spending equation
*
instruments d1983 d1984 d1985 d1986 d1987 abspend
linreg(instruments,smpl=smpl,lwindow=panel,optimal) ds
# d1983 d1984 d1985 d1986 d1987 ds{1 to 3} dr{1 to 3} dg{1 to 3}
linreg(instruments,smpl=smpl,wmatrix=%wmatrix) ds
# d1983 d1984 d1985 d1986 d1987 ds{1 to 2} dr{1 to 2} dg{1 to 2}
linreg(instruments,smpl=smpl,wmatrix=%wmatrix) ds
# d1983 d1984 d1985 d1986 d1987 ds{1 to 1} dr{1 to 1} dg{1 to 1}
*
* Revenue equation
*
instruments d1983 d1984 d1985 d1986 d1987 abrev
linreg(instruments,smpl=smpl,lwindow=panel,optimal) dr
# d1983 d1984 d1985 d1986 d1987 ds{1 to 3} dr{1 to 3} dg{1 to 3}
linreg(instruments,smpl=smpl,wmatrix=%wmatrix) dr
# d1983 d1984 d1985 d1986 d1987 ds{1 to 2} dr{1 to 2} dg{1 to 2}
linreg(instruments,smpl=smpl,wmatrix=%wmatrix) dr
# d1983 d1984 d1985 d1986 d1987 ds{1 to 1} dr{1 to 1} dg{1 to 1}
*
* Grants equation
*
instruments d1983 d1984 d1985 d1986 d1987 abgrants
linreg(instruments,smpl=smpl,lwindow=panel,optimal) dg
# d1983 d1984 d1985 d1986 d1987 ds{1 to 3} dr{1 to 3} dg{1 to 3}
linreg(instruments,smpl=smpl,wmatrix=%wmatrix) dg
# d1983 d1984 d1985 d1986 d1987 ds{1 to 2} dr{1 to 2} dg{1 to 2}
linreg(instruments,smpl=smpl,wmatrix=%wmatrix) dg
# d1983 d1984 d1985 d1986 d1987 ds{1 to 1} dr{1 to 1} dg{1 to 1}
*
* Three lag VAR with full set of instruments (Holtz-Eakin--Newey--Rosen)
*
instruments d1983 d1984 d1985 d1986 d1987 abspend abrev abgrants
linreg(optimal,instruments,smpl=smpl) ds
# d1983 d1984 d1985 d1986 d1987 ds{1 to 3} dr{1 to 3} dg{1 to 3}
linreg(optimal,instruments,smpl=smpl) dr
# d1983 d1984 d1985 d1986 d1987 ds{1 to 3} dr{1 to 3} dg{1 to 3}
linreg(optimal,instruments,smpl=smpl) dg
# d1983 d1984 d1985 d1986 d1987 ds{1 to 3} dr{1 to 3} dg{1 to 3}


Last bumped by TomDoan on Thu Aug 04, 2011 1:58 pm.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Return to RATS Procedures

Who is online

Users browsing this forum: No registered users and 1 guest