*! version 1.4.3 26feb2017

*! Sebastian Kripfganz, www.kripfganz.de

Title

xtdpdqml -- Quasi-maximum likelihood linear dynamic panel data estimation

Syntax

Fixed-effects (FE) model

xtdpdqml depvar [indepvars] [if] [in] [, fe FE_options]

Random-effects (RE) model

xtdpdqml depvar [indepvars] [if] [in] , re [RE_options]

FE_options

Model
projection() projection variables; can be specified more than once

stationary assume stationarity of all variables

noconstant suppress constant term

SE/Robust
vce(vcetype) vcetype may be oim, opg, or robust

Reporting
mlparams display all ML parameter estimates

level(#) set confidence level; default is level(95)

noheader suppress output header

notable suppress coefficient table

first show only the first equation

neq(#) show only the first # equations

display_options control

Maximization
from(init_specs) initial values for the coefficients

storeinit(name) store initial GMM estimation results

initval(numlist) initial values for the variance parameters

inititer(#) update initial values with # iterations

concentration maximize the concentrated log-likelihood function

method(method) log-likelihood evaluator method; seldom used

maximize_options control the maximization process; seldom used

RE_options

Model
projection() projection variables; can be specified more than once

stationary assume stationarity of all variables

noeffects drop the unit-specific error component from the model

noconstant suppress constant term

SE/Robust
vce(vcetype) vcetype may be oim, opg, or robust

Reporting
mlparams display all ML parameter estimates

level(#) set confidence level; default is level(95)

noheader suppress output header

notable suppress coefficient table

first show only the first equation

neq(#) show only the first # equations

display_options control

Maximization
from(init_specs) initial values for the coefficients

storeinit(name) store initial GMM estimation results

initval(numlist) initial values for the variance parameters

method(method) log-likelihood evaluator method; seldom used

maximize_options control the maximization process; seldom used

You must xtset your data before using xtdpdqml; see [XT] xtset.

depvar, indepvars, and all varlists may contain time-series operators; see tsvarlist.

See xtdpdqml postestimation for features available after estimation.

Description

xtdpdqml implements the unconditional quasi-maximum likelihood estimators of Bhargava and Sargan (1983) for linear dynamic panel models with random effects
and Hsiao, Pesaran, and Tahmiscioglu (2002) for linear dynamic panel models with fixed effects when the number of cross sections is large and the time dimension is fixed.
In the fixed-effects case, the estimator of Hsiao, Pesaran, and Tahmiscioglu (2002) maximizes the transformed likelihood function after a first-difference transformation of the model.

Options

Model

projection(varlist [, leads(#) nodifference omit]) specifies the exogenous variables that are used in the initial-observations projection. leads(#) restricts the number of leads.
The default is leads(.) which means that all available leads are used. In the fixed-effects model, first differences of varlist are used unless nodifference is specified.
By default, all indepvars are used unless varlist is excluded with omit. You may specify as many sets of projection variables as you need. The options nodifference and omit are seldom used.

stationary assumes that the process of depvar started in the infinite past, the autoregressive coefficient is less than unity in absolute value (which is not enforced), and all indepvars are stationary as well
(in first differences if a fixed-effects model is estimated). As a consequence, the initial-observations parameters are restricted to equal their long-run values if there are no time-varying indepvars,
and the constant term in the initial-observations equation is restricted to zero (unless a random-effects model with constant term is estimated). By default, none of the parameter restrictions are imposed.

noeffects restricts the variance of the unit-specific error component and its covariance with the initial observations in the random-effects model to be zero.

noconstant; see [R] estimation options.
In the fixed-effects model, the constant term is estimated with the two-stage approach of Kripfganz and Schwarz (2015) unless the option mlparams is specified.

SE/Robust

vce(oim), the default, uses the observed information matrix (OIM).

vce(opg) uses the sum of the outer product of the gradient (OPG) vectors. This option is seldom used.

vce(robust) uses the sandwich estimator.

Reporting

mlparams reports all quasi-maximum likelihood parameter estimates including the model coefficients, the initial-observations coefficients, and the variance parameters. By default, only the model coefficients are reported.

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

coeflegend; see [R] estimation options.

noheader suppresses display of the header above the coefficient table that displays the number of observations.

notable suppresses display of the coefficient table.

first in combination with mlparams displays a coefficient table reporting results for the first equation only and makes it appear as if only one equation was estimated.

neq(#) in combination with mlparams displays a coefficient table reporting results for the first # equations. neq(1) is equivalent to first.
neq(2) displays the model coefficients and the initial-observations coefficients.

Maximization

from(init_specs) specifies initial values for the coefficients; see [R] maximize. By default, initial values are taken from GMM estimation; see [XT] xtdpd.

storeinit(name) stores the initial GMM estimation results under the name name; see [R] estimates store.

initval(numlist) specifies initial values for the variance parameters. In the fixed-effects model at most two numbers are allowed. The first entry refers to the variance of the idiosyncratic error component
and the second entry to the initial-observations variance relative to that of the idiosyncratic component. By default, the first parameter is computed from the residuals given the initial coefficient values specified with the from() option,
and the last parameter from the first-order condition of the maximization problem given all other parameters. In the random-effects model at most four numbers are allowed.
The first entry refers to the variance of the unit-specific error component, the second entry to the variance of the idiosyncratic error component, the third entry to the initial-observations variance,
and the fourth entry to the covariance of the initial observations with the unit-specific error component relative to the initial-observations variance. Missing values are allowed to request the default initialization. This option is seldom used.

inititer(#) specifies the number of iterations used to update the initial values before maximizing the likelihood function.
inititer(0), the default, uses the initial values for the coefficients and variance parameters as specified with the from() and initval() options.
inititer(1) starts the maximization with the minimum distance estimates given the estimate of the initial-observations variance parameter from the previous step.
From the second iteration onwards, the analytical first-order condition for the initial-observations variance parameter is evaluated at the parameter values from the previous iteration step,
and subsequently new minimum distance estimates are obtained for the other parameters given the updated value of the initial-observations variance parameter.

concentration specifies that the concentrated log-likelihood function of the transformed model with the initial-observations variance as single parameter should be maximized.
All other parameter estimates are obtained from the analytical first-order conditions given the optimal value of the initial-observations variance parameter.
By default, maximization is done over all parameters simultaneously. A concentrated log-likelihood function is not available under the stationary assumption when the model is a pure autoregressive process without additional indepvars.

method(method) specifies the evaluator method for the log-likelihood function, where method is one of d0, d1, d2 (or the respective long form); see [R] ml. Default is method(d2).
This option is seldom used.

maximize_options: technique(algorithm_spec), iterate(#), nolog, showstep, showtolerance, tolerance(#), ltolerance(#), nrtolerance(#), and nonrtolerance;
see [R] maximize. These options are seldom used. Supported algorithm_spec are nr, dfp, and bfgs (and combinations).
iterate(0) can be used to evaluate the log-likelihood function at the initial parameter values.

Remarks

See Kripfganz (2016) for background information about the implemented estimators.

Unbalanced panels are supported but groups with interior missing values (gaps) are dropped from the estimation sample.

Hayakawa and Pesaran (2015) show for the fixed-effects model that the estimator is still consistent with cross-sectional heteroskedasticity. Robust standard errors in this case are obtained with vce(robust).

The minimum distance estimator of Hsiao, Pesaran, and Tahmiscioglu (2002) for the fixed-effects model can be obtained by setting inititer(1) and evaluating the log-likelihood function at the initial values, iterate(0).
However, in contrast to the maximum likelihood estimates, the resulting variance-covariance matrix of this estimator is inconsistent because it assumes that the true value of the initial-observations variance parameter is known
while instead an estimate is used.

It can occur that the initial values for the optimization are not feasible. In the fixed-effects model, specifying inititer(2) or higher solves the problem.
Alternatively, the option initval() may help, in particular choosing its second value (b) such that the following inequality holds for each group:

b > (T - 1) / T

where T refers to the time length excluding the initial observations. In the random-effects model, specifying different initial values for the variance parameters with the option initval() may help,
in particular increasing the first or second value, or decreasing the third or fourth value such that the following inequality holds for each group:

b + (a - c * d^2) * T > 0

where a, b, c, and d refer to the first, second, third, and fourth element specified with the initval() option, respectively.
When the option stationary is invoked, this condition might not be sufficient to yield feasible initial values. In such a situation, further increasing b can be helpful.

Example

Setup

. webuse abdata

Fit a fixed-effects model and store the initial GMM results

. xtdpdqml n w k yr1978-yr1984, storeinit(init_gmm)

Display the initial GMM estimation results

. estimates replay init_gmm

Fit a random-effects model with initial values from the fixed-effects estimation and alternative starting values for the variance parameters

. matrix b_fe = e(b)

. xtdpdqml n w k yr1978-yr1984, re from(b_fe) initval(.1 .2 .2 .3)

Saved results

xtdpdqml saves the following in e():

Scalars

e(N) number of observations

e(N_g) number of groups

e(g_min) smallest group size

e(g_avg) average group size

e(g_max) largest group size

e(k_aux) number of ancillary parameters in e(b)

e(k_eq) number of equations in e(b)

e(ll) log likelihood

e(rank) rank of the Hessian matrix from the ml optimization

e(ic) number of iterations

e(converged) = 1 if converged, 0 otherwise

e(stationary) = 1 if option stationary specified

Macros

e(cmd) xtdpdqml

e(cmdline) command as typed

e(ivar) variable denoting groups

e(tvar) variable denoting time

e(estat_cmd) xtdpdqml_estat

e(predict) xtdpdqml_p

e(model) fe or re

e(ml_method) type of ml method

e(vce) oim, opg, or robust

e(vcetype) title used to label Std. Err.

e(properties) b V

e(depvar) name of dependent variable

Matrices

e(b) coefficient vector

e(V) variance-covariance matrix of the estimators

e(V_modelbased) model-based variance; not always saved

e(gradient) gradient vector

e(ilog) iteration log (up to 20 iterations)

Functions

e(sample) marks estimation sample

Author

Sebastian Kripfganz, University of Exeter, http://www.kripfganz.de

References

Bhargava, A., and J. D. Sargan. 1983.
Estimating dynamic random effects models from panel data covering short time periods.
Econometrica 51: 1635-1659.

Hayakawa, K., and M. H. Pesaran. 2015.
Robust standard errors in transformed likelihood estimation of dynamic panel data models with cross-sectional heteroskedasticity.
Journal of Econometrics 188: 111-134.

Hsiao, C., M. H. Pesaran, and A. K. Tahmiscioglu. 2002.
Maximum likelihood estimation of fixed effects dynamic panel data models covering short time periods.
Journal of Econometrics 109: 107-150.

Kripfganz, S. 2016.
Quasi-maximum likelihood estimation of linear dynamic short-T panel-data models.
Stata Journal 16: 1013-1038.

Kripfganz, S., and C. Schwarz. 2015.
Estimation of linear dynamic panel data models with time-invariant regressors.
ECB Working Paper 1838. European Central Bank.