Title
[XT] xtlogit postestimation -- Postestimation tools for xtlogit
Description
The following postestimation commands are available after xtlogit:
Command Description
-----------------------------------------------------------------------------------------------------------
contrast contrasts and ANOVA-style joint tests of estimates
(1) estat AIC, BIC, VCE, and estimation sample summary
estimates cataloging estimation results
hausman Hausman's specification test
lincom point estimates, standard errors, testing, and inference for linear combinations of
coefficients
lrtest likelihood-ratio test
(2) 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
-----------------------------------------------------------------------------------------------------------
(1) estat ic is not appropriate after xtlogit, pa.
(2) The default prediction statistic for xtlogit, fe, pu1, cannot be correctly handled by margins; however,
margins can be used after xtlogit, fe with the predict(pu0) option or the predict(xb) option.
Syntax for predict
Random-effects model
predict [type] newvar [if] [in] [, RE_statistic nooffset]
Fixed-effects model
predict [type] newvar [if] [in] [, FE_statistic nooffset]
Population-averaged model
predict [type] newvar [if] [in] [, PA_statistic nooffset]
RE_statistic Description
-----------------------------------------------------------------------------------------------------------
Main
xb linear prediction; the default
pu0 probability of a positive outcome assuming the random effect is zero
stdp standard error of the linear prediction
-----------------------------------------------------------------------------------------------------------
FE_statistic Description
-----------------------------------------------------------------------------------------------------------
Main
pc1 probability of a positive outcome conditional on one positive outcome within group; the
default
pu0 probability of a positive outcome assuming the fixed effect is zero
xb linear prediction
stdp standard error of the linear prediction
-----------------------------------------------------------------------------------------------------------
PA_statistic Description
-----------------------------------------------------------------------------------------------------------
Main
mu probability of depvar; considers the offset()
rate probability of depvar
xb linear prediction
stdp standard error of the linear prediction
score 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.
The predicted probability for the fixed-effects model is conditional on there being only one outcome per
group. See [R] clogit for details.
Menu
Statistics > Postestimation > Predictions, residuals, etc.
Options for predict
+------+
----+ Main +-----------------------------------------------------------------------------------------------
xb calculates the linear prediction. This is the default for the random-effects model.
pc1 calculates the predicted probability of a positive outcome conditional on one positive outcome within
group. This is the default for the fixed-effects model.
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.
pu0 calculates the probability of a positive outcome, assuming that the fixed or random effect for that
observation's panel is zero. This may not be similar to the proportion of observed outcomes in the
group.
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 xtlogit. This option modifies the
calculations made by predict so that they ignore the offset variable; the linear prediction is treated
as xb rather than xb + offset.
Examples
Setup
. webuse union
Fit random-effects model
. xtlogit union age grade i.south
Compute probability of positive outcome, assuming random effect is zero
. predict prob, pu0
Fit population-averaged model
. xtlogit union age grade i.south, pa
Compute predicted probability of union
. predict unionpr, mu
Compute average marginal effect of age on probability of union
. margins, dydx(age)
|