Stata 11 help for ztnb_postestimation

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

Title

[R] ztnb postestimation -- Postestimation tools for ztnb

Description

The following postestimation commands are available for ztnb:

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]

predict [type] {stub*|newvar_reg newvar_disp} [if] [in] , scores

statistic description ------------------------------------------------------------------------- Main n number of events; the default ir incidence rate cm estimate of the conditional mean, E(y_j|y_j > 0) xb linear prediction stdp standard error of the linear prediction ------------------------------------------------------------------------- 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)*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 the conditional mean of n, given n>0, i.e., E(n|n > 0), 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.

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.

scores calculates equation-level score variables.

The first new variable will contain the derivative of the log likelihood with respect to the regression equation.

The second new variable will contain the derivative of the log likelihood with respect to the dispersion equation.

Examples

Setup . webuse rod93

Fit zero-truncated negative binomial regression model . ztnb deaths i.cohort, exposure(exposure)

Predict incidence rate of death . predict incidence, ir

Predict the number of events . predict nevents, n

Predict the number of events, conditional on the number being positive . predict condmean, cm

Also see

Manual: [R] ztnb postestimation

Help: [R] ztnb


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