*! version 1.1.0 25nov2014
help for xtbcfe

Title

xtbcfe -- Bootstrap Corrected Fixed Effects (BCFE) estimation and inference in dynamic panel data models

Syntax

xtbcfe
depvar
[varlist]
[if]
[,
options]

Estimation
lags(#) select the number of lags of the dependent variable; default is lags(1)

bciters(#) select the number of bootstrap samples used for bias-correction; default is bciters(250)

criterion(#) specify the convergence criterion; default is crit(0.005)

te include time dummies

Resampling
resampling(scheme) select the error (re)sampling pattern; default is res(mcho)

initialization(initial) select the method used for generating initial conditions; default is ini(det)

Inference
inference(option) choose a method for standard errors and confidence intervals; default is no inference

distribution(histogram) save the bcfe bootstrap distribution in e(dist_bcfe) and select a histogram option

infiters(#) select the number of bootstrap samples used for inference

level(#) select the confidence level for confidence intervals; default is level(95)

param request parametric bootstapping for inference instead of the non-parametric default

- A panel variable and a time variable must be specified using xtset; see [XT] xtset

- The estout, moremata and distinct packages must be installed before the xtbcfe routine can be applied

- Lags of depvar should not be included in varlist but specified through the lags(#) option. Also, time series operators are not allowed in varlist

- Time dummies in varlist will be removed; include time effects with the te option

scheme

mcho Monte Carlo error sampling: homoscedastic

mche Monte Carlo error sampling: cross-sectional heteroscedasticity

mcthe Monte Carlo error sampling: temporal heteroscedasticity

iid resampling error terms: independent

cshet resampling error terms: cross-sectional heteroscedasticity

cshet_r resampling error terms: randomized cross-sectional heteroscedasticity

thet resampling error terms: temporal heteroscedasticity

thet_r resampling error terms: randomized temporal heteroscedasticity

wboot resampling error terms: wild bootstrap

wboot_r resampling error terms: randomized wild bootstrap (balanced panels only)

csd resampling error terms: contemporaneous cross-sectional dependence (balanced panels only)

initial

det deterministic initialization

bi burn-in initialization

aho analytical homogeneous initialization

ahe analytical heterogeneous initialization

option

inf_appr Standard errors approximated by the bootstrap distribution of the fixed effects estimator; confidence intervals based on the t-distribution; infiters(#) must be at least 5

inf_se Standard errors estimated from the bootstrap distribution of the xtbcfe estimator; confidence intervals based on the t-distribution; infiters(#) must be at least 5

inf_ci Standard errors estimated from the bootstrap distribution of the xtbcfe estimator; confidence intervals are bootstrap percentile intervals; infiters(#) cannot be smaller than 100

histogram

none Save the bcfe distribution in e(dist_bcfe) without displaying histograms

sum Save the bcfe distribution in e(dist_bcfe) and display a histogram for the sum of AR coefficients

all Save the bcfe distribution in e(dist_bcfe) and display histograms for all AR coefficients and their sum

- Omit the distribution option entirely to delete the bootstrap distribution after estimation

Postestimation syntax

Syntax for predict after xtbcfe estimation

predict
[type]
[newvarname]
[if]
[,
statistic]

where y[i,t] = y[i,t-1]a[1] + ... + y[i,t-p]a[p] + x[i,t]b + u[i] + e[i,t]

statistic

xb a[1]y[i,t-1] + ... + a[p]y[i,t-p] + x[i,t]b ; fitted values, the default

ue u[i] + e[i,t] ; the combined residuals (fixed effect + observation-specific error)

xbu (*) a[1]y[i,t-1] + ... + a[p]y[i,t-p] + x[i,t]b + a[i] ; fitted values, including the fixed effect

u (*) u[i] ; the fixed effect

e (*) e[i,t] ; the observation-specific error component

Unstarred statistics are available both in and out of sample; type "predict ... if e(sample) ..." to calculate the statistic only for the
estimation sample. Starred statistics can only be calculated for the estimation sample, even when "if e(sample)" is not specified.

Description

xtbcfe is a bootstrap-corrected fixed effects estimator for dynamic panel data models of general order (p)

y[i,t] = y[i,t-1]a[1] + ... + y[i,t-p]a[p] + x[i,t]b + u[i] + e[i,t]

where - a[1] to a[p] are the autoregressive coefficients (coefficients for lags of the dependent variable)
- b is the coefficient vector for the strictly exogenous predictors x
- u[i] is the fixed effect corresponding to cross-section i
- e[i,t] is the error specific to cross-section i at time t

xtbcfe estimates the specified model with the fixed effects estimator and corrects its small T bias (see Nickell, 1981) using a simplified but extended version of the approach presented in Everaert and Pozzi (2007).
The algorithm evaluates the bias of fixed effects in a numerical way to avoid the use of analytical correction formulas. xtbcfe is
therefore also applicable to higher order (more than one lag of the dependent variable) models with a potential non-standard error structure. With an appropriate choice of the resampling scheme, xtbcfe can take into account
several heteroscedasticity and cross-sectional dependence patterns which would invalidate the standard correction methods.

Options

Estimation

lags(#) specifies the number of lags of the dependent variable that are to be included among the predictors.

bciters(#) specifies the number of bootstrap samples used to evaluate the bias of the fixed effects estimator. As we evaluate the bias numerically, more samples implies a higher degree of accuracy and less remaining bias.
However, as the algorithm works with estimated means, the number of samples does not need to be very large to provide reliable results. The default is 250 samples.

criterion(#) indicates the criterion that needs to be satisfied before the algorithm is terminated. The default is crit(0.005). This number is multiplied by the number of lags of the dependent variable (lags(#))
as it will be more difficult to satisfy in larger models. Convergence of the algorithm is evaluated by taking the (absolute) difference between estimates of two consecutive iterations of the bootstrap estimator. If this difference is smaller
than the number supplied, the algorithm stops and estimates from the final iteration are the bcfe coefficient estimates. If convergence has not been achieved after a few iterations, we compare the difference between the average
over the last 4 iterations and the average 4 iterations before with the criterion. This avoids that the algorithm alternates indefinitely within a small band.
Note that computation time will be influenced by the size of this number as a small criterion implies that we are strict before accepting convergence and hence require more iterations.

te requests the inclusion of time dummies in the model. Time effects are generated and named using the
time indicator specified by the xtset command. Variables in the active dataset with identical names will be overwritten. Time dummies in the variable list will be deleted.

Resampling

resampling(scheme) specifies the error (re)sampling pattern the algorithm uses to generate bootstrap samples. The scheme should be chosen such that
the resampling process is as random as possible while preserving the error structure (e.g. heteroscedasticity, cross-section dependence,...). Below we describe the resampling options. We denote e_b[i,t] as the sampled error term in
period t for cross section i and call e[i,t] the original estimated error term.

mcho: Monte Carlo homoscedastic: sample error terms from the normal distribution with homoscedastic variance.

mche: Monte Carlo heteroscedastic: sample error terms from the normal distribution with cross-section specific variance.

mcthe: Monte Carlo temporal heteroscedasticity: sample error terms from the normal distribution with period-specific (t-specific) variance.

iid: resample error terms independently, i.e. set e_b[i,t] = e[j,s] with j and s drawn completely at random from 1,...,N and 1,...,T respectively.

cshet: cross-sectional heteroscedasticity: resample error terms within cross-sections, i.e. for every t=1,...,T we set e_b[i,t] = e[i,s] where s is drawn with replacement from 1,...,T.

cshet_r: randomized cross-sectional heteroscedasticity: similar to cshet we resample error terms within cross-sections but then reshuffle cross-section indices. Hence, error term vectors are no longer bound
to their respective cross-sections but randomly reassigned, i.e. for every cross-section i=1,...,N we draw a j with replacement from 1,...,N (assign a fixed j to every i) and for every t=1,...,T set e_b[i,t] = e[j,s] with
s drawn with replacement from 1,...,T.

thet: temporal heteroscedasticity: resample error terms within time periods; i.e. for every t=1,...,T we set e_b[i,t] = e[j,t] where j is drawn with replacement from j = 1,...,N.

thet_r: randomized temporal heteroscedasticity: resample whole time periods and then resample error terms within time periods (see above); i.e. for every t=1,...,T we draw
a time index s with replacement from 1,...,T (assign a fixed s to every t) and set e_b[i,t] = e[j,s] where j is drawn with replacement from j = 1,...,N.

wboot: wild bootstrap: multiply the error term with a factor -1 with 0.5 probability, i.e. for every i=1,...,N and t=1,...,T we set e_b[i,t] = e[i,t]*g, where g a random variable that equals 1 or -1
each with 0.5 probility.

wboot_r: randomized wild bootstrap: resample cross-section indices (sample a random cross-section's error terms as those for cross-section i),
then multiply the error term with -1 with 0.5 probability (balanced panels only!); i.e. for every i=1,...,N draw a cross-section index j with replacement from 1,...,N
(assign a fixed j to every i) and set e_b[i,t] = e[j,t]*g

csd: cross-sectional dependence: resample time indices (identically for all cross-sections) but keep error terms cross-section specific (balanced panels only!);
i.e. for every t=1,...,T we draw a time index s with replacement from 1,...,T (assign a fixed s to every t) and set e_b[i,t] = e[i,s]. For example, for t=1 we randomly draw t=5.
Then we assign the t=5 error term to t=1 for every cross-section i, i.e. for i=1,...,N we set e_b[i,1] = e[i,5].

Initialization

initialization(initial) selects a method for generating initial conditions in the resampling process (i.e. values for the first observations of the lagged dependent variables).
The following options are available

det: deterministic initialization: initial observations are kept fixed, i.e. we initiate data generation with initial conditions observed in the original sample.

bi: burn-in initialization: the series for the dependent variable is initiated at zero and data are generated using the
currently estimated model parameters and selected resampling scheme. After a burn-in period we take the generated conditions as the initial values
for the bootstrap sample. Note that this is the most general initialization scheme that also takes the specified resampling process into account.

aho: analytical homogeneous initiation: initial conditions are sampled from the multivariate normal distribution with cross-section specific mean but a homogeneous variance-covariance matrix
(estimated variance-covariance matrices are averaged over cross-sections).

ahe: analytical heterogeneous initiation: initial conditions are sampled from the multivariate normal distribution with cross-section specific means and variance-covariance matrices.

Inference

inference(option) specifies the standard errors and confidence intervals required. The small sample distribution of xtbcfe can be simulated by resampling the original data and applying
the bootstrap bias-correction to the fixed effects estimates in each of the constructed samples. From this simulated distribution we can then calculate standard deviations and percentile intervals.
Alternatively, we may roughly approximate the distribution of xtbcfe from the distribution of the fixed effects estimates in the constructed samples. The available options are listed below

inf_appr: approximate the standard error of xtbcfe using the bootstrapped distribution of the fixed effects estimator and calculate confidence intervals using the t-distribution.
This is the fastest option for standard error estimation but is known to be biased downwards. Use only as a fast and rough indication.

inf_se: estimate the xtbcfe variance covariance matrix using the bootstrap and calculate the corresponding confidence intervals from the t-distribution.

inf_ci: estimate the xtbcfe variance covariance matrix using the bootstrap. Confidence intervals are bootstrap percentile intervals. Percentile intervals may be more appropriate
in small datasets where the bcfe estimator may have a non-normal or skewed distribution.

distribution() requests that the bootstrap-simulated distribution of the bcfe estimator is saved in e(dist_bcfe). This grants the user the possibility to further inspect
the bootstrap distribution and calculate additional statistics. If the distribution option is not specified the bootstrap matrix will be deleted after estimation. Note that these
options will be ignored if the estimation algorithm failed to converge.

distribution(none): saves the obtained coefficient matrix after estimation without further action.

distribution(sum): saves the coefficient matrix and displays a histogram for the sum of the coefficients on the lagged dependent variable(s). This may be informative to assess stationarity.

distribution(all): saves the coefficient matrix and displays histograms for all autoregressive coefficients separately as well as their sum.

infiters(#) specifies the number of iterations (bootstrap samples) used for inference. Choose a value >= 5 in combination with inf_appr and inf_se and at least 100 for inf_ci.
We recommend 50 or greater for the inf_appr or inf_se options and 1000 for the inf_ci option.

level(#) specifies the confidence level for confidence intervals. The default is level(95).

param specifies the use of the parametric bootstrap for inference. The advantage of the parametric approach is that the resampling of the data used to obtain the
small sample distribution of the BCFE estimator is exactly the same as the resampling of the data used to bias-correct the FE estimator.
As such, each of the above mentioned resampling and initialization schemes is available. In the non-parametric case (the default setting), we resample the original data for cross-sectional
units as a whole with replacement. The advantage of this resampling scheme is that it preserves the dynamic panel structure without the need to make parametric assumptions.

Remarks

- The computation time of the algorithm is mainly determined by the bciters(#), infiters(#) and criterion(#) options. However, computation time will also
(to a lesser degree) be dependent on the chosen resampling scheme and properties of the data (non-stationarity, noise,...).

- As gaps in the observed time series will result in inconsistency for dynamic models (see Millimet and McDonough, 2013), xtbcfe will adjust the estimation sample to avoid this issue.
Observations are removed so that the data is free of gaps but the estimation sample is still as large as possible.

- xtbcfe will not attempt inference in case the algorithm failed to converge. Estimates would not be reliable and are unsuitable for the inference algorithm. Convergence can often
be achieved without altering the convergence criterion by selecting the deterministic initiation ini(det).

Examples

load the Arellano-Bond dataset

. webuse abdata

Estimate a second order model (two lags of n) with iid resampling and burn-in initialization

. xtbcfe n w wL1 k kL1 kL2 ys ysL1 ysL2, bciters(250) res(iid) ini(bi) lags(2)

Add time dummies to the model

. xtbcfe n w wL1 k kL1 kL2 ys ysL1 ysL2, bciters(250) res(iid) ini(bi) lags(2) te

Take temporal heteroscedasticity into account by adjusting the resampling scheme

. xtbcfe n w wL1 k kL1 kL2 ys ysL1 ysL2, bciters(250) res(thet) ini(bi) lags(2) te

Relax the convergence criterion from 0.005 to 0.01

. xtbcfe n w wL1 k kL1 kL2 ys ysL1 ysL2, bciters(250) res(iid) ini(bi) lags(2) te crit(0.01)

Perform inference on the model with confidence intervals based on the t-distribution

. xtbcfe n w wL1 k kL1 kL2 ys ysL1 ysL2, bciters(250) res(thet) ini(bi) lags(2) infer(inf_se) infit(50) te

Perform inference with percentile intervals

. xtbcfe n w wL1 k kL1 kL2 ys ysL1 ysL2, bciters(250) res(thet) ini(bi) lags(2) infer(inf_ci) infit(1000) te

Perform inference with percentile intervals and save the bootstrapped distribution of bcfe

. xtbcfe n w wL1 k kL1 kL2 ys ysL1 ysL2, bciters(250) res(thet) ini(bi) lags(2) infer(inf_ci) infit(1000) te dist(none)

Saved results

xtbcfe saves the following in e():

Scalars

e(N) number of observations

e(N_g) number of groups

e(k) number of exogenous regressors

e(t_min) smallest number of time periods

e(t_avg) average number of time periods

e(t_max) largest number of time periods

e(irr) number of cross-sections removed due to irregular spacing and/or lack of observations

e(conv) convergence of the correction algorithm

e(df_r) degrees of freedom

Macros

e(cmd) xtbcfe

e(predict) xtbcfe_p

e(depvar) name of dependent variable

e(ivar) group indicator

e(tvar) time indicator

Matrices

e(b) xtbcfe estimated coefficient vector

e(V) estimated variance-covariance matrix of the xtbcfe estimates

e(res_bcfe) observation-specific error terms

e(dist_bcfe) bootstrap distribution for bcfe (only if the distribution option is selected)

Functions

e(sample) marks estimation sample

References

Everaert, G. and Pozzi, L. (2007). Bootstrap-based bias correction for dynamic panels. Journal of Economic Dynamics & Control, 31, pp.1160-1184.

Millimet, D.L. & McDonough, I.K., (2013). Dynamic Panel Data Models with Irregular Spacing: With Applications to Early Childhood Development, IZA Discussion Papers 7359, Institute for the Study of Labor (IZA).

Nickell, S. (1981). Biases in dynamic models with fixed effects. Econometrica 49 (6), pp. 1417-1426.

Authors

Ignace De Vos
Ignace.DeVos@UGent.be
SHERPPA, Ghent University
Faculty of Economics and Business Administration
Department of Social Economics
Sint-Pietersplein 6, 9000 Ghent, Belgium

Ilse Ruyssen
Ilse.Ruyssen@UGent.be
SHERPPA, Ghent University
Faculty of Economics and Business Administration
Department of General Economics
Tweekerkenstraat 2, 9000 Ghent, Belgium