⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nbreg.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 08mar2005}{...}
{cmd:help nbreg}, {cmd:help gnbreg} {right:dialogs:  {bf:{dialog nbreg}}  {bf:{dialog gnbreg}}{space 7}}
{right:also see:  {help nbreg postestimation}}
{hline}

{title:Title}

{p2colset 5 18 20 2}{...}
{p2col :{hi:[R] nbreg} {hline 2}}Negative binomial regression{p_end}
{p2colreset}{...}


{title:Syntax}

{phang}
Negative binomial regression model

{p 8 14 2}
{cmd:nbreg} {depvar} [{indepvars}] {ifin} {weight} [{cmd:,} {it:{help nbreg##nbreg_options:nbreg_options}}]


{phang}
Generalized negative binomial model

{p 8 15 2}
{cmd:gnbreg} {depvar} [{indepvars}] {ifin} {weight} [{cmd:,} {it:{help nbreg##gnbreg_options:gnbreg_options}}]

{synoptset 28 tabbed}{...}
{marker nbreg_options}{...}
{synopthdr :nbreg_options}
{synoptline}
{syntab :Model}
{synopt :{opt nocon:stant}}suppress constant term{p_end}
{synopt :{cmdab:d:ispersion(}{opt m:ean}{cmd:)}}parameterization of dispersion; the default{p_end}
{synopt :{cmdab:d:ispersion(}{opt c:onstant}{cmd:)}}constant dispersion for all observations{p_end}
{synopt :{opth e:xposure(varname:varname_e)}}include ln({it:varname_e}) in model with coefficient constrained to 1{p_end}
{synopt :{opth off:set(varname:varname_o)}}include {it:varname_o} in model with coefficient constrained to 1{p_end}
{synopt :{cmdab:const:raints(}{it:{help estimation options##constraints():constraints}}{cmd:)}}apply specified linear constraints{p_end}

{syntab :SE/Robust}
{synopt :{opth vce(vcetype)}}{it:vcetype} may be {opt oim}, {opt r:obust}, {opt opg}, {opt boot:strap}, or {opt jack:knife}{p_end}
{synopt :{opt r:obust}}synonym for {cmd:vce(robust)}{p_end}
{synopt :{opth cl:uster(varname)}}adjust standard errors for intragroup correlation{p_end}

{syntab :Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{opt nolr:test}}suppress likelihood-ratio test{p_end}
{synopt :{opt ir:r}}report incidence-rate ratios{p_end}

{syntab :Max options}
{synopt :{it:{help nbreg##nbreg_maximize:maximize_options}}}control the maximization process; seldom used{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2} {it:depvar}, {it:indepvars}, {it:varname_e}, and {it:varname_o} may
contain time-series operators; see {help tsvarlist}.{p_end}

{synoptset 28 tabbed}{...}
{marker gnbreg_options}{...}
{synopthdr :gnbreg_options}
{synoptline}
{syntab :Model}
{synopt :{opt nocon:stant}}suppress constant term{p_end}
{synopt :{opth lna:lpha(varlist)}}dispersion model variables{p_end}
{synopt :{opth e:xposure(varname:varname_e)}}include ln({it:varname_e}) in model with coefficient constrained to 1{p_end}
{synopt :{opth off:set(varname:varname_o)}}include {it:varname_o} in model with coefficient constrained to 1{p_end}
{synopt :{cmdab:const:raints(}{it:{help estimation options##constraints():constraints}}{cmd:)}}apply specified linear constraints{p_end}

{syntab :SE/Robust}
{synopt :{opth vce(vcetype)}}{it:vcetype} may be {opt oim}, {opt r:obust}, {opt opg}, {opt boot:strap}, or {opt jack:knife}{p_end}
{synopt :{opt r:obust}}synonym for {cmd:vce(robust)}{p_end}
{synopt :{opth cl:uster(varname)}}adjust standard errors for intragroup correlation{p_end}

{syntab :Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{opt ir:r}}report incidence-rate ratios{p_end}
        
{syntab :Max options}
{synopt :{it:{help nbreg##gnbreg_maximize:maximize_options}}}control the maximization process; seldom used{p_end}
{synoptline}
{p2colreset}{...}

{p 4 6 2} {opt bootstrap}, {opt by}, {opt jackknife}, {opt rolling},
{opt statsby}, {opt stepwise}, {opt svy}, and {opt xi} are allowed; see
{help prefix}.{p_end}
{p 4 6 2} {cmd:fweight}s, {cmd:iweight}s, and {cmd:pweight}s are allowed; see
{help weight}.{p_end}
{p 4 6 2} See {help nbreg postestimation} for features available after estimation.


{title:Description}

{pstd}
{cmd:nbreg} fits a negative binomial maximum-likelihood regression model of
{depvar} on {indepvars}, where {it:depvar} is a non-negative 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.  This extra variation is referred to as overdispersion.  See 
{help poisson}.

{pstd}
{cmd:gnbreg} fits a generalization of the negative binomial mean-dispersion
model; the shape parameter alpha may also be parameterized.

{pstd}
If you have panel data, see {helpb xtnbreg}.


{title:Options for nbreg}

{dlgtab:Model}

{phang}
{opt noconstant}; see {help estimation options}.

{phang}
{cmd:dispersion(mean}{c |}{cmd:constant)} specifies the parameterization of
the model.  {cmd:dispersion(mean)}, the default, yields a model with
dispersion equal to 1 + alpha*exp(xb + offset); that is, the dispersion
is a function of the expected mean: exp(xb + offset).
{cmd:dispersion(constant)} has dispersion equal to 1 + delta; that is, it is a
constant for all observations.

{phang}
{opth "exposure(varname:varname_e)"}, {opt offset(varname_o)}, and 
{opt constraints(constraints)}; see {help estimation options}.

{dlgtab:SE/Robust}

{phang}
{opt vce(vcetype)}; see {it:{help vce_option}}.

{phang}
{opt robust}, {opt cluster(varname)}; see {help estimation options}.
{opt cluster()} can be used with {help pweight}s to produce estimates for
unstratified cluster-sampled data, but see {helpb "svy:nbreg"} for a command
especially designed for survey data.

{dlgtab:Reporting}

{phang}
{opt level(#)}; see {help estimation options}.

{phang}
{opt nolrtest} suppresses fitting the Poisson model.  Without this option, a
comparison Poisson model is fitted, and the likelihood is used in a
likelihood-ratio test of the null hypothesis that the dispersion parameter is
zero.

{phang}
{opt irr} reports estimated coefficients transformed to incidence-rate
ratios, that is, exp(b) rather than b.  Standard errors and confidence
intervals are similarly transformed.  This option affects how results are
displayed, not how they are estimated or stored.  {opt irr} may be specified
at estimation or when replaying previously estimated results.

{marker nbreg_maximize}{...}
{dlgtab:Max options}

{phang}
{it:maximize_options}: {opt dif:ficult}, {opt tech:nique(algorithm_spec)},
{opt iter:ate(#)}, [{cmdab:no:}]{opt lo:g}, {opt tr:ace},
{opt grad:ient}, {opt showstep}, {opt hess:ian},
{opt shownr:tolerance}, {opt tol:erance(#)}, {opt ltol:erance(#)},
{opt gtol:erance(#)}, {opt nrtol:erance(#)}, {opt nonrtol:erance},
{opt from(init_specs)}; see {help maximize}.  These options are seldom used.


{title:Options for gnbreg}

{dlgtab: Model}

{phang}
{opt noconstant}; see {help estimation options}.

{phang}
{opt lnalpha(varlist)} allows you to specify a linear equation for ln(alpha).
Specifying {cmd:lnalpha(male old)} means that ln(alpha)=a_0 + a_1{cmd:male} +
a_2{cmd:old}, where a_0, a_1, and a_2 are parameters to be estimated along
with the other model coefficients.  If this option is not specified,
{cmd:gnbreg} and {cmd:nbreg} will produce the same results because the shape
parameter will be parameterized as a constant.

{phang}
{opth "exposure(varname:varname_e)"}, {opt offset(varname_o)}, and
{opt constraints(constraints)}; see {help estimation options}.

{dlgtab:SE/Robust}

{phang}
{opt vce(vcetype)}; see {it:{help vce_option}}.

{phang}
{opt robust}, {opt cluster(varname)}; see {help estimation options}.
{opt cluster()} can be used with {help pweight}s to produce estimates for
unstratified cluster-sampled data, but see {helpb "svy:gnbreg"} for a command
especially designed for survey data.

{dlgtab:Reporting}

{phang}
{opt level(#)}; see {help estimation options}.

{phang}
{opt irr} reports estimated coefficients transformed to incidence-rate
ratios.  Standard errors and confidence
intervals are similarly transformed.  This option affects how results are
displayed, not how they are estimated or stored.  {opt irr} may be specified
at estimation or when replaying previously estimated results.

{marker gnbreg_maximize}{...}
{dlgtab:Max options}

{phang}
{it:maximize_options}: {opt dif:ficult}, {opt tech:nique(algorithm_spec)},
{opt iter:ate(#)}, [{cmdab:no:}]{opt lo:g}, {opt tr:ace},
{opt grad:ient}, {opt showstep}, {opt hess:ian},
{opt shownr:tolerance}, {opt tol:erance(#)}, {opt ltol:erance(#)},
{opt gtol:erance(#)}, {opt nrtol:erance(#)}, {opt nonrtol:erance},
{opt from(init_specs)}; see {help maximize}.  These options are seldom used.


{title:Remarks}

{pstd}
{cmd:nbreg} will fit two different parameterizations of the negative
binomial model.  The default, also given by the option {cmd:dispersion(mean)},
has dispersion for the i-th observation equal to 1 + alpha*exp(xb +
offset); i.e., the dispersion is a function of the expected mean of the counts
for the jth observation: exp(xb + offset).  The alternative
parameterization, given by the option {cmd:dispersion(constant)}, has
dispersion equal to 1 + delta; i.e., it is a constant for all observations.

{pstd}
For the default model, alpha = 0 (or ln(alpha) = -infinity) corresponds to
dispersion = 1, and, thus, it is simply a Poisson model.  Likewise, for the
alternative parameterization, delta = 0 (or ln(delta) = -infinity) corresponds
to dispersion = 1, and it is simply a Poisson model.

{pstd}
Users may want to fit both parameterizations and choose the one with the
larger (least negative) log likelihood.  In most cases, both parameterizations
will yield similar results, and the parameterizations will not significantly
differ from each other.  Hence, in most cases, the choice of parameterization
is not important.

{pstd}
See {helpb xtpoisson} and {helpb xtnbreg} for closely related panel estimators.


{title:Examples}

{phang}{cmd:. nbreg deaths coh2 coh3, exposure(obstime)}

{phang}{cmd:. nbreg deaths coh2 coh3, exposure(obstime) dispersion(constant)}


{title:Also see}

{psee}
Manual: {bf:[R] nbreg}

{psee}
Online:  {help nbreg postestimation};{break}
{helpb constraint},
{helpb glm}, {helpb poisson}, {helpb "svy:nbreg"}, {helpb xtnbreg}, 
{helpb zinb}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -