**[XT] xtabond** -- Arellano-Bond linear dynamic panel-data estimation

__Syntax__

**xtabond** *depvar* [*indepvars*] [*if*] [*in*] [**,** *options*]

*options* Description
-------------------------------------------------------------------------
Model
__nocons__**tant** suppress constant term
__diff__**vars(***varlist***)** already-differenced exogenous variables
**inst(***varlist***)** additional instrument variables
__la__**gs(***#***)** use *#* lags of dependent variable as
covariates; default is **lags(1)**
__maxld__**ep(***#***)** maximum lags of dependent variable for use as
instruments
__maxlag__**s(***#***)** maximum lags of predetermined and endogenous
variables for use as instruments
__two__**step** compute the two-step estimator instead of the
one-step estimator

Predetermined
**pre(***varlist*[*...*]**)** predetermined variables; can be specified more
than once

Endogenous
__end__**ogenous(***varlist*[*...*]**)** endogenous variables; can be specified more
than once

SE/Robust
**vce(***vcetype***)** *vcetype* may be **gmm** or __r__**obust**

Reporting
__l__**evel(***#***)** set confidence level; default is **level(95)**
__ar__**tests(***#***)** use *#* as maximum order for AR tests; default
is **artests(2)**
*display_options* control spacing and line width

__coefl__**egend** display legend instead of statistics
-------------------------------------------------------------------------
A panel variable and a time variable must be specified; use **xtset**; see
**[XT] xtset**.
*indepvars* and all *varlists*, except **pre(***varlist*[*...*]**)** and
**endogenous(***varlist*[*...*]**)**, may contain time-series operators; see
tsvarlist. The specification of *depvar* may not contain time-series
operators.
**by**, **statsby**, and **xi** are allowed; see prefix.
**coeflegend** does not appear in the dialog box.
See **[XT] xtabond postestimation** for features available after estimation.

__Menu__

**Statistics > Longitudinal/panel data > Dynamic panel data (DPD) >**
**Arellano-Bond estimation**

__Description__

**xtabond** fits a linear dynamic panel-data model where the unobserved
panel-level effects are correlated with the lags of the dependent
variable, known as the Arellano-Bond estimator. This estimator is
designed for datasets with many panels and few periods, and it requires
that there be no autocorrelation in the idiosyncratic errors.

__Options__

+-------+
----+ Model +------------------------------------------------------------

**noconstant**; see **[R] estimation options**.

**diffvars(***varlist***)** specifies a set of variables that already have been
differenced to be included as strictly exogenous covariates.
**diffvars()** may not be used for models with a constant or models for
which level-equation instruments are specified.

**inst(***varlist***)** specifies a set of variables to be used as additional
instruments. These instruments are not differenced by **xtabond** before
including them in the instrument matrix.

**lags(***#***)** sets p, the number of lags of the dependent variable to be
included in the model. The default is p=1.

**maxldep(***#***)** sets the maximum number of lags of the dependent variable that
can be used as instruments. The default is to use all T_i-p-2 lags.

**maxlags(***#***)** sets the maximum number of lags of the predetermined and
endogenous variables that can be used as instruments. For
predetermined variables, the default is to use all T_i-p-1 lags. For
endogenous variables, the default is to use all T_i-p-2 lags.

**twostep** specifies that the two-step estimator be calculated.

+---------------+
----+ Predetermined +----------------------------------------------------

**pre(***varlist* [**,** __lag__**struct(***prelags***,*** premaxlags***)**]**)** specifies that a set of
predetermined variables be included in the model. Optionally, one
may specify that *prelags* lags of the specified variables also be
included. The default for *prelags* is 0. Specifying *premaxlags* sets
the maximum number of further lags of the predetermined variables
that can be used as instruments. The default is to include T_i-p-1
lagged levels as instruments for predetermined variables. You may
specify as many sets of predetermined variables as you need within
the standard Stata limits on matrix size. Each set of predetermined
variables may have its own number of *prelags* and *premaxlags*.

+------------+
----+ Endogenous +-------------------------------------------------------

__end__**ogenous(***varlist* [**,** __lag__**struct(***endlags***,*** endmaxlags***)**]**)** specifies that a
set of endogenous variables be included in the model. Optionally,
one may specify that *endlags* lags of the specified variables also be
included. The default for *endlags* is 0. Specifying *endmaxlags* sets
the maximum number of further lags of the endogenous variables that
can be used as instruments. The default is to include T_i-p-2 lagged
levels as instruments for endogenous variables. You may specify as
many sets of endogenous variables as you need within the standard
Stata limits on matrix size. Each set of endogenous variables may
have its own number of *endlags* and *endmaxlags*.

+-----------+
----+ SE/Robust +--------------------------------------------------------

**vce(***vcetype***)** specifies the type of standard error reported, which
includes types that are derived from asymptotic theory and that are
robust to some kinds of misspecification; see *Remarks and examples* in
**[XT] xtabond**.

**vce(gmm)**, the default, uses the conventionally derived variance
estimator for generalized method of moments estimation.

**vce(robust)** uses the robust estimator. After one-step estimation,
this is the Arellano-Bond robust VCE estimator. After two-step
estimation, this is the Windmeijer (2005) WC-robust estimator.

+-----------+
----+ Reporting +--------------------------------------------------------

**level(***#***)**; see **[R] estimation options**.

**artests(***#***)** specifies the maximum order of the autocorrelation test to be
calculated. The tests are reported by **estat** **abond**; see **[XT] xtabond**
**postestimation**. Specifying the order of the highest test at
estimation time is more efficient than specifying it to **estat** **abond**,
because **estat** **abond** must refit the model to obtain the test
statistics. The maximum order must be less than or equal to the
number of periods in the longest panel. The default is **artests(2)**.

*display_options*: **vsquish** and **nolstretch**; see **[R] estimation options**.

The following option is available with **xtabond** but is not shown in the
dialog box:

**coeflegend**; see **[R] estimation options**.

__Examples__

Setup
**. webuse abdata**

Basic model with two lags of dependent variable included as regressors
**. xtabond n l(0/1).w l(0/2).(k ys) yr1980-yr1984, lags(2)**
**. xtabond n l(0/1).w l(0/2).(k ys) yr1980-yr1984, lags(2)** **vce(robust)**
**. xtabond n l(0/1).w l(0/2).(k ys) yr1980-yr1984, lags(2) twostep**

Treat **w** and **k** as predetermined and include **w**, **L.w**, **k**, **L.k**, and **L2.k** as
additional regressors
**. xtabond n l(0/2).ys yr1980-yr1984, lags(2)** **pre(w, lag(1,.)) pre(k,**
**lag(2,.))**

Treat **L.w** and **L2.k** as endogenous and include **w**, **L.w**, **k**, **L.k**, and **L2.k** as
additional regressors
**. xtabond n l(0/2).ys yr1980-yr1984, lags(2)** **endogenous(w, lag(1,.))**
**endogenous(k, lag(2,.))**

__Stored results__

**xtabond** stores the following in **e()**:

Scalars
**e(N)** number of observations
**e(N_g)** number of groups
**e(df_m)** model degrees of freedom
**e(g_min)** smallest group size
**e(g_avg)** average group size
**e(g_max)** largest group size
**e(t_min)** minimum time in sample
**e(t_max)** maximum time in sample
**e(chi2)** chi-squared
**e(arm***#***)** test for autocorrelation of order #
**e(artests)** number of AR tests computed
**e(sig2)** estimate of sigma_epsilon^2
**e(rss)** sum of squared differenced residuals
**e(sargan)** Sargan test statistic
**e(rank)** rank of **e(V)**
**e(zrank)** rank of instrument matrix

Macros
**e(cmd)** **xtabond**
**e(cmdline)** command as typed
**e(depvar)** name of dependent variable
**e(twostep)** **twostep**, if specified
**e(ivar)** variable denoting groups
**e(tvar)** variable denoting time within groups
**e(vce)** *vcetype* specified in **vce()**
**e(vcetype)** title used to label Std. Err.
**e(system)** **system**, if system estimator
**e(transform)** specified transform
**e(diffvars)** already-differenced exogenous variables
**e(datasignature)** checksum from **datasignature**
**e(datasignaturevars)**
variables used in calculation of checksum
**e(properties)** **b V**
**e(estat_cmd)** program used to implement **estat**
**e(predict)** program used to implement **predict**
**e(marginsok)** predictions allowed by **margins**

Matrices
**e(b)** coefficient vector
**e(V)** variance-covariance matrix of the estimators

Functions
**e(sample)** marks estimation sample

__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* 58: 277-297.

Windmeijer, F. 2005. A finite sample correction for the variance of
linear efficient two-step GMM estimators. *Journal of Econometrics*
126: 25-51.