Stata 11 help for ztp_postestimation

help ztp postestimation dialog: predict also see: ztp -------------------------------------------------------------------------------

Title

[R] ztp postestimation -- Postestimation tools for ztp

Description

The following postestimation commands are available for ztp:

command description ------------------------------------------------------------------------- estat AIC, BIC, VCE, and estimation sample summary estat (svy) postestimation statistics for survey data estimates cataloging estimation results lincom point estimates, standard errors, testing, and inference for linear combinations of coefficients (1) lrtest likelihood-ratio test margins marginal means, predictive margins, marginal effects, and average marginal effects 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 suest seemingly unrelated estimation test Wald tests of simple and composite linear hypotheses testnl Wald tests of nonlinear hypotheses ------------------------------------------------------------------------- (1) lrtest is not appropriate with svy estimation results.

Syntax for predict

predict [type] newvar [if] [in] [, statistic nooffset]

statistic description ------------------------------------------------------------------------- Main n number of events; the default ir incidence rate cm estimate of conditional mean, E(y_j|y_j > 0) 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.

Menu

Statistics > Postestimation > Predictions, residuals, etc.

Options for predict

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

n, the default, calculates the predicted number of events, which is exp(xb) if neither offset() nor exposure() was specified when the model was fit; exp(xb + offset) if offset() was specified; or exp(xb) x exposure if exposure() was specified.

ir calculates the incidence rate exp(xb), which is the predicted number of events when exposure is 1. This is equivalent to specifying both n and nooffset options.

cm calculates the estimate of conditional mean of n, given n>0, i.e., E(n|n>0,x), which is exp(xb)/P(n > 0|x) if neither offset() nor exposure() was specified when the zero-truncated negative binomial model was fit, or exp(xb + offset)/P(n > 0|x) if offset() was specified, or exp(xb)/P(n > 0|x)*exposure if exposure() was specified.

xb calculates the linear prediction, which is xb if neither offset() nor exposure() was specified; xb + offset if offset() was specified; or xb + ln(exposure) if exposure() was specified; see nooffset below.

stdp calculates the standard error of the linear prediction.

score calculates the equation-level score, the derivative of the log likelihood with respect to the linear prediction.

nooffset is relevant only if you specified offset() or exposure() when you fit the model. It modifies the calculations made by predict so that they ignore the offset or exposure variable; the linear prediction is treated as xb rather than as xb + offset or xb + ln(exposure). Specifying predict ..., nooffset is equivalent to specifying predict ..., ir.

Examples

Setup . webuse runshoes

Fit zero-truncated Poisson regression . ztp shoes distance male age

Predict the number of shoes purchased . predict shoehat, n

Predict the number of shoes purchased conditional on each person having bought shoes . predict shoecondhat, cm

Also see

Manual: [R] ztp postestimation

Help: [R] ztp


© Copyright 1996–2009 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index