Transcription of https://www.stata.com/manuals13/rnbregpostestimation.pdf
1 Postestimation Postestimation tools for nbreg and gnbregDescriptionSyntax for predictMenu for predictOptions for predictRemarks and examplesMethods and formulasAlso seeDescriptionThe following postestimation commands are available afternbregandgnbreg:CommandDescriptionco ntrastcontrasts andANOVA-style joint tests of estimatesestat icAkaike s and Schwarz s Bayesian information criteria (AICandBIC)estat summarizesummary statistics for the estimation sampleestat vcevariance covariance matrix of the estimators (VCE)estat(svy)postestimation statistics for survey dataestimatescataloging estimation resultsforecast1dynamic forecasts and simulationslincompoint estimates, standard errors, testing, and inference for linear combinationsof coefficientslinktestlink test for model specificationlrtest2likelihood-ratio testmarginsmarginal means, predictive margins, marginal effects, and average marginaleffectsmarginsplotgraph the results from margins (profile plots, interaction plots, etc.)
2 Nlcompoint estimates, standard errors, testing, and inference for nonlinear combinationsof coefficientspredictpredictions, residuals, influence statistics, and other diagnostic measurespredictnlpoint estimates, standard errors, testing, and inference for generalized predictionspwcomparepairwise comparisons of estimatessuestseemingly unrelated estimationtestWald tests of simple and composite linear hypothesestestnlWald tests of nonlinear hypotheses1forecastis not appropriate withmiorsvyestimation not appropriate withsvyestimation nbreg postestimation Postestimation tools for nbreg and gnbregSyntax for predictpredict[type]newvar[if][in][,stat isticnooffset]predict[type]{stub*|newvar regnewvardisp}[if][in], scoresstatisticDescriptionMainnnumber of events; the defaultirincidence rate (equivalent , n nooffset)pr(n)probabilityPr(yj=n)pr(a,b) probabilityPr(a yj b)xblinear predictionstdpstandard error of the linear predictionIn addition, relevant only aftergnbregare the following:statisticDescriptionMainalphap redicted values of jlnalphapredicted values of ln jstdplnastandard error of predicted ln jThese statistics are available both in and out of sample; e(sample).
3 If wantedonly for the estimation for predictStatistics>Postestimation>Predict ions, residuals, for predict Main n, the default, calculates the predicted number of events, which isexp(xj )if neitheroff-set(varnameo)norexposure(varn amee)was specified when the model was fit;exp(xj +offsetj)ifoffset()was specified; orexp(xj ) exposurejifexposure()was the incidence rateexp(xj ), which is the predicted number of events when exposureis 1. This is equivalent to specifying both thenand (n)calculates the probabilityPr(yj=n), wherenis a nonnegative integer that may be specifiedas a number or a (a,b)calculates the probabilityPr(a yj b), whereaandbare nonnegative integers that maybe specified as numbers or variables;bmissing (b.)
4 Means+ ;pr(20,.)calculatesPr(yj 20);pr(20,b)calculatesPr(yj 20)in observations for whichb .and calculatesPr(20 yj b) postestimation Postestimation tools for nbreg and gnbreg 3pr(.,b)produces a syntax error. A missing value in an observation of the variableacauses amissing value in that observation forpr(a,b).xbcalculates the linear prediction, which isxj if neitheroffset()norexposure()was specified;xj +offsetjifoffset()was specified; orxj +ln(exposurej)ifexposure()was specified; the standard error of the linear ,lnalpha, andstdplnaare relevant aftergnbregestimation only; they produce the predictedvalues of j, ln j, and the standard error of the predicted ln j, relevant only if you specifiedoffset()orexposure()when you fit the model.
5 Itmodifies the calculations made bypredictso that they ignore the offset or exposure variable; thelinear prediction is treated asxj rather than asxj +offsetjorxj +ln(exposurej). , nooffsetis equivalent to , equation-level score first new variable will contain lnL/ (xj ).The second new variable will contain lnL/ (ln j)fordispersion(mean) second new variable will contain lnL/ (ln )fordispersion(constant).Remarks and ,predictreturns the expected number of deaths per cohort and theprobability of observing the number of deaths recorded or use nbreg deaths , nologNegative binomial regression Number of obs = 21LR chi2(2) = = mean Prob > chi2 = likelihood = Pseudo R2 = Std.
6 Err. z P>|z| [95% Conf. Interval] .2978419 ..2981621 ..2107213 .3108622 .0929416 .1625683 .5498555 Likelihood-ratio test of alpha=0: chibar2(01) = Prob>=chibar2 = predict count(option n assumed; predicted number of events). predict p, pr(0, deaths). summarize deaths count pVariableObs Mean Std. Dev. Min Maxdeaths21 10 197count21 80 .4991542 .2743702 .0070255 .98012854 nbreg postestimation Postestimation tools for nbreg and gnbregThe expected number of deaths ranges from 80 to 90. The probabilityPr(yi deaths)rangesfrom to and formulasIn the following, we use the same notation as in [R] and formulas are presented under the following headings:Mean-dispersion modelConstant-dispersion modelMean-dispersion modelThe equation-level scores are given byscore(x )j=pj(yj j)score( )j= m{ j( j yj)1 + j j ln(1 + j j) + (yj+m) (m)}where j=ln jand (z)is the digamma modelThe equation-level scores are given byscore(x )j=mj{ (yj+mj) (mj) +ln(p)}score( )j=yj (yj+mj)(1 p) score(x )jwhere j=ln see[R]nbreg Negative binomial regression[U] 20 Estimation and postestimation commands