Example: bachelor of science

Syntax - Stata

Negative binomial regressionSyntaxMenuDescriptionOptions for nbregOptions for gnbregRemarks and examplesStored resultsMethods and formulasReferencesAlso seeSyntaxNegative binomial regression modelnbregdepvar[indepvars] [if] [in] [weight] [,nbregoptions]Generalized negative binomial modelgnbregdepvar[indepvars] [if] [in] [weight] [,gnbregoptions]nbregoptionsDescriptionM odelnoconstantsuppress constant termdispersion(mean)parameterization of dispersion; the defaultdispersion(constant)constant dispersion for all observationsexposure(varnamee)include ln(varnamee) in model with coefficient constrained to 1offset(varnameo)includevarnameoin model with coefficient constrained to 1constraints(constraints)apply specified linear constraintscollinearkeep collinear variablesSE/Robustvce(vcetype)vcetypemay beoim,robust,clus

nbreg— Negative binomial regression 5 Introduction to negative binomial regression Negative binomial regression models the number of occurrences (counts) of an event when the event has extra-Poisson variation, that is, when it has overdispersion. The Poisson regression model is y j˘Poisson( j) where j= exp(x j + offset j) for observed counts y

Tags:

  Introduction, Regression, Poisson, Poisson regression

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Syntax - Stata

1 Negative binomial regressionSyntaxMenuDescriptionOptions for nbregOptions for gnbregRemarks and examplesStored resultsMethods and formulasReferencesAlso seeSyntaxNegative binomial regression modelnbregdepvar[indepvars] [if] [in] [weight] [,nbregoptions]Generalized negative binomial modelgnbregdepvar[indepvars] [if] [in] [weight] [,gnbregoptions]nbregoptionsDescriptionM odelnoconstantsuppress constant termdispersion(mean)parameterization of dispersion; the defaultdispersion(constant)constant dispersion for all observationsexposure(varnamee)include ln(varnamee) in model with coefficient constrained to 1offset(varnameo)includevarnameoin model with coefficient constrained to 1constraints(constraints)apply specified linear constraintscollinearkeep collinear variablesSE/Robustvce(vcetype)vcetypemay beoim,robust,clusterclustvar,opg,bootstr ap,orjackknifeReportinglevel(#)set confidence level.

2 Default islevel(95)nolrtestsuppress likelihood-ratio testirrreport incidence-rate ratiosnocnsreportdo not display constraintsdisplayoptionscontrol column formats, row spacing, line width, display of omittedvariables and base and empty cells, and factor-variable labelingMaximizationmaximizeoptionscontr ol the maximization process; seldom usedcoeflegenddisplay legend instead of statistics12 nbreg Negative binomial regressiongnbregoptionsDescriptionModeln oconstantsuppress constant termlnalpha(varlist)dispersion model variablesexposure(varnamee)include ln(varnamee) in model with coefficient constrained to 1offset(varnameo)includevarnameoin model with coefficient constrained to 1constraints(constraints)apply specified linear constraintscollinearkeep collinear variablesSE/Robustvce(vcetype)vcetypemay beoim,robust,clusterclustvar,opg,bootstr ap,orjackknifeReportinglevel(#)

3 Set confidence level; default islevel(95)irrreport incidence-rate ratiosnocnsreportdo not display constraintsdisplayoptionscontrol column formats, row spacing, line width, display of omittedvariables and base and empty cells, and factor-variable labelingMaximizationmaximizeoptionscontr ol the maximization process; seldom usedcoeflegenddisplay legend instead of statisticsindepvarsandvarlistmay contain factor variables; see[U] Factor ,indepvars,varnamee, andvarnameomay contain time-series operators (nbregonly); see[U] ,by(nbregonly),fp(nbregonly),jackknife,m fp(nbregonly),mi estimate,nestreg(nbregonly),rolling,stat sby,stepwise, andsvyare allowed; see[U] Prefix (bootstrap)andvce(jackknife)are not allowed with themi estimateprefix; see [MI]mi are not allowed with thebootstrapprefix; see [R] ()and weights are not allowed with thesvyprefix; see [SVY] ,iweights, andpweights are allowed.

4 See[U] not appear in the dialog [U] 20 Estimation and postestimation commandsfor more capabilities of estimation >Count outcomes>Negative binomial regressiongnbregStatistics>Count outcomes>Generalized negative binomial regressionDescriptionnbregfits a negative binomial regression model ofdepvaronindepvars, wheredepvaris anonnegative count variable. In this model, the count variable is believed to be generated by a poisson -like process, except that the variation is greater than that of a true poisson .

5 This extra variation isreferred to as overdispersion. See [R]poissonbefore reading this Negative binomial regression 3gnbregfits a generalization of the negative binomial mean-dispersion model; the shape parameter may also be you have panel data, see [XT]xtnbregand [ME] for nbreg Model noconstant; see [R]estimation (mean|constant)specifies the parameterization of the (mean),the default, yields a model with dispersion equal to 1+ exp(xj +offsetj); that is, the dispersionis a function of the expected mean:exp(xj +offsetj).dispersion(constant)has dispersionequal to 1+ ; that is, it is a constant for all (varnamee),offset(varnameo),constraints( constraints),collinear; see [R]esti-mation options.

6 SE/Robust vce(vcetype)specifies the type of standard error reported, which includes types that are derived fromasymptotic theory (oim,opg), that are robust to some kinds of misspecification (robust), thatallow for intragroup correlation (clusterclustvar), and that use bootstrap or jackknife methods(bootstrap,jackknife); see [R]vceoption. Reporting level(#); see [R]estimation fitting the poisson model. Without this option, a comparison poisson model isfit, and the likelihood is used in a likelihood-ratio test of the null hypothesis that the dispersionparameter is estimated coefficients transformed to incidence-rate ratios, that is,e irather than errors and confidence intervals are similarly transformed.

7 This option affects how resultsare displayed, not how they are estimated or be specified at estimation or whenreplaying previously estimated ; see [R]estimation :noomitted,vsquish,noemptycells,baseleve ls,allbaselevels,nofvla-bel,fvwrap(#),fv wrapon(style),cformat(%fmt),pformat(%fmt ),sformat(%fmt), andnolstretch; see [R]estimation options. Maximization maximizeoptions:difficult,technique(algo rithmspec),iterate(#),[no]log,trace,grad ient,showstep,hessian,showtolerance,tole rance(#),ltolerance(#),nrtolerance(#),no nrtolerance, andfrom(initspecs); see [R]maximize.

8 These options areseldom the optimization type totechnique(bhhh)resets the defaultvcetypetovce(opg).The following option is available withnbregbut is not shown in the dialog box:coeflegend; see [R]estimation nbreg Negative binomial regressionOptions for gnbreg Model noconstant; see [R]estimation (varlist)allows you to specify a linear equation for ln . Specifyinglnalpha(male old)means that ln = 0+ 1male+ 2old, where 0, 1, and 2are parameters to be estimatedalong with the other model coefficients. If this option is not specified,gnbregandnbregwillproduce the same results because the shape parameter will be parameterized as a (varnamee),offset(varnameo),constraints( constraints),collinear; see [R]esti-mation options.

9 SE/Robust vce(vcetype)specifies the type of standard error reported, which includes types that are derived fromasymptotic theory (oim,opg), that are robust to some kinds of misspecification (robust), thatallow for intragroup correlation (clusterclustvar), and that use bootstrap or jackknife methods(bootstrap,jackknife); see [R]vceoption. Reporting level(#); see [R]estimation estimated coefficients transformed to incidence-rate ratios, that is,e irather than errors and confidence intervals are similarly transformed.

10 This option affects how resultsare displayed, not how they are estimated or be specified at estimation or whenreplaying previously estimated ; see [R]estimation :noomitted,vsquish,noemptycells,baseleve ls,allbaselevels,nofvla-bel,fvwrap(#),fv wrapon(style),cformat(%fmt),pformat(%fmt ),sformat(%fmt), andnolstretch; see [R]estimation options. Maximization maximizeoptions:difficult,technique(algo rithmspec),iterate(#),[no]log,trace,grad ient,showstep,hessian,showtolerance,tole rance(#),ltolerance(#),nrtolerance(#),no nrtolerance, andfrom(initspecs); see [R]maximize.


Related search queries