**[XT] xtprobit postestimation** -- Postestimation tools for xtprobit

__Postestimation commands__

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

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)
**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
**test** Wald tests of simple and composite linear hypotheses
**testnl** Wald tests of nonlinear hypotheses
-------------------------------------------------------------------------
* **estat ic** and **lrtest** are not appropriate after **xtprobit, pa**.
+ **forecast** is not appropriate with **mi** estimation results.

__Syntax for predict__

Random-effects model

**predict** [*type*] *newvar* [*if*] [*in*] [**,** *RE_statistic* __nooff__**set** ]

Population-averaged model

**predict** [*type*] *newvar* [*if*] [*in*] [**,** *PA_statistic* __nooff__**set** ]

*RE_statistic* Description
-------------------------------------------------------------------------
Main
**xb** linear prediction; the default
**pr** marginal probability of a positive outcome
**pu0** probability of a positive outcome
**stdp** standard error of the linear prediction
-------------------------------------------------------------------------

*PA_statistic* Description
-------------------------------------------------------------------------
Main
**mu** probability of *depvar*; considers the **offset()**; the
default
**rate** probability of *depvar*
**xb** linear prediction
**stdp** standard error of the linear prediction
__sc__**ore** first derivative of the log likelihood with respect to
xb
-------------------------------------------------------------------------

These statistics are available both in and out of sample; type **predict**
*...* **if e(sample)** *...* if wanted only for the estimation sample.

__Menu for predict__

**Statistics > Postestimation**

__Description for predict__

**predict** creates a new variable containing predictions such as linear
predictions, probabilities, standard errors, and equation-level scores.

__Options for predict__

+------+
----+ Main +-------------------------------------------------------------

**xb** calculates the linear prediction. This is the default for the
random-effects model.

**pr** calculates the probability of a positive outcome that is marginal with
respect to the random effect, which means that the probability is
calculated by integrating the prediction function with respect to the
random effect over its entire support.

**pu0** calculates the probability of a positive outcome, assuming that the
random effect for that observation's panel is zero. This probability
may not be similar to the proportion of observed outcomes in the
group.

**mu** and **rate** both calculate the predicted probability of *depvar*. **mu** takes
into account the **offset()**, and **rate** ignores those adjustments. **mu**
and **rate** are equivalent if you did not specify **offset()**. **mu** is the
default for the population-averaged model.

**stdp** calculates the standard error of the linear prediction.

**score** calculates the equation-level score.

**nooffset** is relevant only if you specified **offset(***varname***)** for **xtprobit**.
It modifies the calculations made by **predict** so that they ignore the
offset variable; the linear prediction is treated as xb rather than
xb + offset.

__Syntax for margins__

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

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

Random-effects model

*statistic* Description
-------------------------------------------------------------------------
**pr** marginal probability of a positive outcome; the
default
**pu0** probability of a positive outcome
**xb** linear prediction
**stdp** not allowed with **margins**
-------------------------------------------------------------------------

Population-averaged model

*statistic* Description
-------------------------------------------------------------------------
**mu** probability of *depvar*; considers the **offset()**; the
default
**rate** probability of *depvar*
**xb** linear prediction
**stdp** not allowed with **margins**
__sc__**ore** not allowed with **margins**
-------------------------------------------------------------------------

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**

__Descriptions for margins__

**margins** estimates margins of response for linear predictions and
probabilities.

__Examples__

Setup
**. webuse union**

Fit random-effects model
**. xtprobit union age grade south**

Calculate predicted probability of a positive outcome
**. predict prob, pu0**

Fit population-averaged model
**. xtprobit union age grade i.not_smsa south##c.year, pa**

Compute the average marginal effects from the fitted model on the
probability of being in a union
**. margins, dydx(*)**