**[ERM] eintreg postestimation** -- Postestimation tools for eintreg

__Postestimation commands__

The following postestimation command is of special interest after
**eintreg**:

Command Description
-------------------------------------------------------------------------
**estat teffects** treatment effects and potential-outcome means
-------------------------------------------------------------------------

The following postestimation commands are available after **eintreg**:

Command Description
-------------------------------------------------------------------------
**contrast** contrasts and ANOVA-style joint tests of estimates
**estat ic** Akaike's and Schwarz's Bayesian information criteria
(AIC and BIC)
**estat summarize** summary statistics for the estimation sample
**estat vce** variance-covariance matrix of the estimators (VCE)
**estat** (svy) postestimation statistics for survey data
**estimates** cataloging estimation results
* **forecast** dynamic forecasts and simulations
* **hausman** Hausman's specification test
**lincom** point estimates, standard errors, testing, and
inference for linear combinations of coefficients
* **lrtest** likelihood-ratio test
**margins** marginal means, predictive margins, marginal effects,
and average marginal effects
**marginsplot** graph the results from margins (profile plots,
interaction plots, etc.)
**nlcom** point estimates, standard errors, testing, and
inference for nonlinear combinations of coefficients
**predict** predictions, residuals, influence statistics, and
other diagnostic measures
**predictnl** point estimates, standard errors, testing, and
inference for generalized predictions
**pwcompare** pairwise comparisons of estimates
**suest** seemingly unrelated estimation
**test** Wald tests of simple and composite linear hypotheses
**testnl** Wald tests of nonlinear hypotheses
-------------------------------------------------------------------------
* **forecast**, **hausman**, and **lrtest** are not appropriate with **svy** estimation
results.

__predict__

Predictions after **eintreg** are described in

**[ERM] eintreg predict** predict after eintreg
**[ERM] predict treatment** predict for treatment statistics
**[ERM] predict advanced** predictâ€™s advanced features

**[ERM] eintreg predict** describes the most commonly used predictions. If
you fit a model with treatment effects, predictions specifically related
to these models are detailed in **[ERM] predict treatment**. **[ERM] predict**
**advanced** describes less commonly used predictions, such as predictions of
outcomes in auxiliary equations.

__Syntax for margins__

**margins** [*marginlist*] [**,** *options*]

**margins** [*marginlist*] **,** __pr__**edict(***statistic *...**)** [__pr__**edict(***statistic *...**)**
...] [*options*]

*statistic* Description
-------------------------------------------------------------------------
Main
__m__**ean** mean; the default
__p__**r** probability of binary or ordinal y
__pom__**ean** potential-outcome mean
**te** treatment effect
**tet** treatment effect on the treated
**xb** linear prediction
__p__**r(***a***,***b***)** Pr(*a* < y < *b*) for continuous y
**e(***a***,***b***)** *E*(y | *a* < y < *b*) for continuous y
__ys__**tar(***a***,***b***)** *E*(y*), y* = max{*a*,min(y,*b*)} for continuous y
-------------------------------------------------------------------------

Statistics not allowed with **margins** are functions of stochastic
quantities other than **e(b)**.

For the full syntax, see **[R] margins**.

__Menu for margins__

**Statistics > Postestimation**

__Description for margins__

**margins** estimates margins of response for means, probabilities,
potential-outcome means, treatment effects, and linear predictions.

__Examples__

Setup
**. webuse class10**
**. eintreg gpal gpau income, endogenous(hsgpa = income i.hscomp)**
**. generate str name = "Billy" in 537**

Expected values for college GPA if we fix Billy's **hsgpa** at 2.00 and at
3.00 and only consider his value of **income**
**. margins if name=="Billy", at(hsgpa=(2 3)) predict(fix(hsgpa))**

Expected values for college GPA if we fix Billy's **hsgpa** at 2.00 and at
3.00 and if we also account for his values of **hsgpa**, **hscomp**, and
unobservable factors that lead to correlation between **hsgpa** and college
GPA
**. generate hsgpaT = hsgpa**
**. margins if name=="Billy", at(hsgpa=(2 3))**
**predict(base(hsgpa=hsgpaT))**