ABLAGS Procedure |
@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.
@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]
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 MAXLAGS 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.
Examples
This estimates a dynamic panel regression by instrumental variables on first differences, with only the dependent variable treated as exogenous.
open data cornwell&rupert.xls
calendar(panelobs=7,a) 1976
data(format=xls,org=columns) 1//1976:01 595//1982:01 exper wks occ ind $
south smsa ms fem union ed blk lwage
*
set expersq = exper^2
*
set dwks = wks-wks{1}
set dlwage = lwage-lwage{1}
set dunion = union-union{1}
set docc = occ-occ{1}
set dexper = exper-exper{1}
*
* IV on first differences
*
@ablags wks abwks
instruments lwage{0 1} union{0 1} occ{0 1} exper{0 1} abwks
linreg(inst) dwks
# dlwage dunion docc dexper dwks{1}
This applies the Holtz-Eakin–Newey–Rosen procedure to a three variable panel VAR. Estimation is over a reduced set of (time series) entries, which is why the @ABLAGS use the start and end parameters. If you don't include those, you'll generate an extra set of instruments which will be zero over the working sample. Note that that has no practical effect: they would end up getting ignored.
open data tablef13-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
*
* 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}
Copyright © 2025 Thomas A. Doan