help xtpmg postestimation version 2.1.1

Title

xtpmg postestimation -- Postestimation tools for xtpmg

Postestimation commands

The following postestimation commands are available after xtpmg (for the
pmg and mg estimators, which produce heterogeneous per-panel
coefficients):

Command Description

estat box box plot of the per-panel coefficient distribution

estat bar bar plot of each panel's coefficient(s)

estat rcap range (caterpillar) plot: per-panel point estimate and 95% CI

estat bootstrap bootstrap standard errors / confidence intervals

estat hausman Hausman test and long-run coefficient comparison graph

The estat graph subcommands mirror the interface of xtdcce2
(Ditzen). The per-panel estimates are those stored in e(b_i) and
e(se_i); the dashed reference line is the mean-group estimate.

Syntax

Per-panel coefficient graphs

estat graphtype [coeflist] [if] [in]
[, combine(string) individual(string)
nomg cleargraph dropzero]

graphtype Description

box box plot

bar bar plot

rcap range plot (per-panel point estimate + 95% CI)

coeflist is an optional list of coefficient names to plot (for example
ec, or a short-run variable such as x1). Names are matched by their
base variable name, so x1 matches D.x1. If omitted, all estimated
coefficients except the constant are plotted. ec denotes the
error-correction (speed-of-adjustment) term.

Bootstrap

estat bootstrap [, reps(#) seed(string)
percentile level(#) wild showindividual]

Hausman comparison graph

estat hausman estname1 estname2 [estname3 ...]
[, sigmamore nograph name(string)]

where estname1, estname2, ... are the names of estimates stored
xtpmg fits (for example mg, pmg, dfe). The Hausman test
is run on the first two (consistent vs efficient); all listed estimators are
shown in the graph.

Graph subcommands (box, bar, rcap)

These commands visualize the heterogeneity of the per-panel estimates that
xtpmg produces under the pmg and mg estimators. They are not
available after dfe (which has no per-panel coefficients).

estat box draws a box plot of the distribution of each selected
coefficient across panels.

estat bar draws, for each selected coefficient, a bar chart of the panel
point estimates. Multiple coefficients are combined into one figure.

estat rcap draws a range (caterpillar) plot: for each selected
coefficient the per-panel point estimate is shown with its 95% confidence
interval, together with the mean-group estimate (dashed line).

Bootstrap subcommand

estat bootstrap computes bootstrap standard errors and confidence
intervals for the reported coefficient vector e(b) by the
cross-section (panel) bootstrap: panels (cross-sectional units) are drawn
with replacement, and xtpmg is re-estimated on each resample using the
exact original command (including any automatic lag selection). See Westerlund,
Petrova and Norkute (2019) and Goncalves and Perron (2014).

By default the bootstrap standard error (the standard deviation of the
bootstrap replicates) is reported, and confidence intervals are formed by the
normal approximation b +/- z*se. With percentile the intervals are
the empirical percentiles of the bootstrap distribution.

The user's estimation results are protected during resampling and restored on
exit, so e(b), e(V) and the active estimates are unchanged
afterwards.

Note. The wild option is reserved for a future release. The wild
bootstrap of the error-correction equation requires re-cumulating the dependent
variable under the null so that the level term in the error-correction
component remains consistent; until that is implemented correctly, specifying
wild prints a note and falls back to the cross-section bootstrap.

Hausman comparison graph

estat hausman draws a forest-style plot of the long-run coefficients
from two or more stored xtpmg fits (each with its 95% confidence
interval), and runs the Hausman specification test on the first two. It prints
the test result (chi-squared, degrees of freedom, p-value) and annotates it on
the graph.

Order the estimators less-restrictive first: the first is treated as the
consistent estimator (b) and the second as the efficient-under-H0
estimator (B). For the standard PMG test use estat hausman mg pmg.
Overlapping intervals across estimators indicate that the estimates do not
differ systematically (consistent with a large p-value). The active estimation
results are restored on exit. See also the model-selection guide in
help xtpmg.

Options

Graph options

combine(string) passes string as options to the combined
graph combine (bar and rcap) or to graph box.

individual(string) passes string as options to each individual panel
graph (bar and rcap only).

nomg suppresses the mean-group reference line in the bar and rcap graphs.

cleargraph clears the default styling of the graph command, best used
together with combine() and individual() to supply your own look.

dropzero does not display coefficients that are identically zero across
panels.

Bootstrap options

reps(#) sets the number of bootstrap replications; the default is
reps(100).

seed(string) sets the random-number seed; see seed.

percentile reports percentile confidence intervals instead of the
normal-approximation intervals.

level(#) sets the confidence level; the default is level(95) (or as
set by set level).

wild requests the wild bootstrap (currently falls back to the
cross-section bootstrap; see the note above).

showindividual is reserved for displaying unit-specific bootstrap results.

Hausman options

sigmamore bases both covariance matrices on the same disturbance-variance
estimate; recommended for numerical stability (passed to hausman).

nograph reports the Hausman test only, without producing the graph.

name(string) sets the name of the graph; the default is
xtpmg_hausman.

Stored results

estat rcap, estat bar and estat box return in r():

Macros

r(graph_name) name of the (combined) graph created

estat bootstrap returns in r():

Scalars

r(reps) number of successful bootstrap replications

Macros

r(method) cross-section

Matrices

r(se_boot) bootstrap standard errors

r(ci_lo) lower percentile confidence limits

r(ci_hi) upper percentile confidence limits

estat hausman returns in r():

Scalars

r(chi2) Hausman chi-squared statistic

r(df) degrees of freedom

r(p) p-value

Macros

r(graph_name) name of the comparison graph

The per-panel matrices used by the graph subcommands are stored by xtpmg
itself in e(b_i), e(se_i) and e(coef_i); see
help xtpmg.

Examples

Setup

. webuse pig

. xtpmg d.weight d.week, lr(l.weight week) pmg replace

Caterpillar plot of the per-panel error-correction term

. estat rcap ec

Caterpillar plot of all coefficients

. estat rcap

Bar plot without the mean-group line

. estat bar, nomg

Box plot of the coefficient distributions

. estat box

Cross-section bootstrap, 500 replications

. estat bootstrap, reps(500) seed(12345)

Percentile bootstrap confidence intervals

. estat bootstrap, reps(500) seed(12345) percentile

Hausman comparison graph (MG vs PMG, plus DFE)

. xtpmg d.weight d.week, lr(l.weight week) pmg replace

. estimates store pmg

. xtpmg d.weight d.week, lr(l.weight week) mg replace

. estimates store mg

. xtpmg d.weight d.week, lr(l.weight week) dfe replace

. estimates store dfe

. estat hausman mg pmg dfe, sigmamore

References

Goncalves, S. and B. Perron. 2014. Bootstrapping factor-augmented regression
models. Journal of Econometrics 182: 156-173.

Pesaran, M.H. 2015. Testing weak cross-sectional dependence in large panels.
Econometric Reviews 34: 1089-1117.

Westerlund, J., Y. Petrova, and M. Norkute. 2019. CCE in fixed-T panels.
Journal of Applied Econometrics 34: 746-761.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane

Also see

Help: xtpmg, estat, xtdcce2