binreg.hlp
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 289 行
HLP
289 行
{smcl}
{* 08mar2005}{...}
{cmd:help binreg} {right:dialogs: {bf:{dialog binreg}} {space 14}}
{right:also see: {help binreg postestimation}}
{hline}
{title:Title}
{p2colset 5 19 21 2}{...}
{p2col :{hi:[R] binreg} {hline 2}}Generalized linear models: extensions to the binomial family{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 15 2}
{cmd:binreg}
{depvar}
[{indepvars}]
{ifin}
{weight}
[{cmd:,} {it:options}]
{synoptset 21 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Model}
{synopt :{opt nocon:stant}}suppress constant term{p_end}
{synopt :{opt or}}use logit link and report odds ratios{p_end}
{synopt :{opt rr}}use log link and report risk ratios{p_end}
{synopt :{opt hr}}use log-complement link and report health ratios{p_end}
{synopt :{opt rd}}use identity link and report risk differences{p_end}
{synopt :{cmd:n(}{it:#}|{it:{help varname}}{cmd:)}}use {it:#} or {it:varname} for number of
trials{p_end}
{synopt :{opth e:xposure(varname)}}include ln({it:varname}) in model with
coefficient constrained to 1{p_end}
{synopt :{opth off:set(varname)}}include {it:varname} in model with
coefficient constrained to 1{p_end}
{synopt :{opth mu(varname)}}use {it:varname} as the initial estimate for the
mean of {depvar}{p_end}
{synopt :{opth ini:t(varname)}}synonym for {opt mu(varname)}{p_end}
{syntab:SE/Robust}
{synopt :{cmd:vce(}{help binreg##vcetype:vcetype}{cmd:)}}{it:vcetype} may be
{opt oim}, {opt r:obust},
{opt opg}, {opt boot:strap}, {opt jack:knife}, {opt eim}, {opt hac},
{opt jackknife1}, or {opt unb:iased}{p_end}
{synopt :{opth t(varname)}}variable name corresponding to {opt t}{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}
{synopt :{opt vf:actor(#)}}multiply variance matrix by scalar {it:#}{p_end}
{synopt :{opt disp(#)}}quasi-likelihood multiplier{p_end}
{p2col :{cmdab:sca:le:(x2}|{cmd:dev}|{it:#}{cmd:)}}set the scale parameter; default is {cmd:scale(1)}{p_end}
{syntab:Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{cmdab:coef:ficients}}report nonexponentiated coefficients{p_end}
{syntab:Max options}
{synopt :{opt irls}}use iterated, reweighted least-squares optimization; the default{p_end}
{synopt :{opt ml}}use maximum likelihood optimization{p_end}
{synopt :{it:{help binreg##maximize_options:maximize_options}}}control the maximization process; seldom used{p_end}
{synopt :{opt fisher(#)}}Fisher scoring steps{p_end}
{synopt :{opt search}}search for good starting values{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
{it:depvar} and {it:indepvars} may contain time-series operators;
see {help tsvarlist}.{p_end}
{p 4 6 2}
{opt bootstrap}, {opt by}, {opt jackknife}, {opt rolling}, {opt statsby}, and
{opt xi} are allowed; see {help prefix}.{p_end}
{p 4 6 2}
{opt fweight}s, {opt aweight}s, {opt iweight}s, and {opt pweight}s are
allowed; see {help weight}.{p_end}
{p 4 6 2}
See {help binreg postestimation} for features available after estimation.{p_end}
{title:Description}
{pstd}
{opt binreg} fits generalized linear models for the binomial family. It
estimates odds ratios, risk ratios, health ratios, and risk differences. The
available links are
{center:Option Implied link Parameter}
{center:{hline 47}}
{center:{opt or} logit odds ratios = exp(b)}
{center:{opt rr} log risk ratios = exp(b)}
{center:{opt hr} log complement health ratios = exp(b)}
{center:{opt rd} identity risk differences = b}
{pstd}
Note that estimates of odds, risk, and health ratios are obtained by
exponentiating the appropriate coefficients. The option {opt or} produces
the same results as Stata's {helpb logistic} command, and
{opt or coefficients} yields the same results as the {helpb logit} command.
When no link is
specified or implied, {opt or} is assumed.
{title:Options}
{dlgtab:Model}
{phang}
{opt noconstant}; see {help estimation options}.
{phang}
{opt or} requests the logit link and results in odds ratios if
{opt coefficients} is not specified.
{phang}
{opt rr} requests the log link and results in risk ratios if {opt coefficients}
is not specified.
{phang}
{opt hr} requests the log-complement link and results in health ratios
if {opt coefficients} is not specified.
{phang}
{opt rd} requests the identity link and results in risk differences.
{phang}
{cmd:n(}{it:#}|{it:{help varname}}{cmd:)} specifies either a constant integer
to use as the denominator for the binomial family, or a variable that holds
the denominator for each observation.
{phang}
{opth exposure(varname)}, {opt offset(varname)};
see {help estimation options}.
{phang}
{opth mu(varname)} specifies {it:varname} containing an initial estimate for
the mean of {depvar}. This can be useful if you encounter convergence
difficulties. {opt init(varname)} is a synonym.
{marker vcetype}{...}
{dlgtab:SE/Robust}
{phang}
{opt vce(vcetype)}; see {it:{help vce_option}}. In addition to the standard
{it:vcetype}s, {opt binreg} allows the following alternatives.
{phang2}
{cmd:vce(eim)} specifies that the expected information matrix estimate of
variance be used.
{phang2}
{cmd:vce(hac} {it:kernel} [{it:#}]{cmd:)} specifies that a
heteroskedasticity- and autocorrelation-consistent (HAC) variance estimate be
used. HAC refers to the general form for combining weighted matrices
to form the variance estimate. There are three kernels built into
{opt binreg}. {it:kernel} is a user-written program or one of
{center:{opt nw:est} | {opt ga:llant} | {opt an:derson}}
{pmore2}
If {it:#} not specified, N - 2 is assumed.
{phang2}
{cmd:vce(jackknife1)} specifies that the one-step jackknife estimate of
variance be used.
{phang2}
{cmd:vce(unbiased)} specifies that the unbiased sandwich estimate of variance
be used. The {opt robust} option is implied when {opt unbiased} is used.
{phang}
{opt t(varname)} specifies the variable name corresponding to {opt t}; see
{helpb tsset}. {cmd:binreg} does not need to know {opt t()} in all cases,
though it does if {cmd:vec(hac} ... {cmd:)} is specified. In that case, you
can either specify the time variable with {opt t()}, or you can {cmd:tsset}
your data before calling {cmd:binreg}. When the time variable is required,
{cmd:binreg} assumes that the observations are spaced equally over time.
{phang}
{opt robust}, {opth cluster(varname)}; see {help estimation options}.
{phang}
{opt vfactor(#)} specifies a scalar by which to multiply the resulting
variance matrix. This option allows users to match output with other
packages, which may apply degrees of freedom or other small-sample corrections
to estimates of variance.
{phang}
{opt disp(#)} multiplies the variance of {depvar} by {it:#} and
divides the deviance by {it:#}. The resulting distributions are members of
the quasi-likelihood family.
{phang}
{cmd:scale(x2}|{cmd:dev}|{it:#}{cmd:)} overrides the default scale
parameter. This option is only allowed with Hessian (information matrix)
variance estimates.
{pmore}
By default, {cmd:scale(1)} is assumed for discrete distributions
(binomial, Poisson, and negative binomial), and {cmd:scale(x2)} is assumed
for continuous distributions (Gaussian, gamma, and inverse Gaussian).
{pmore}
{cmd:scale(x2)} specifies that the scale parameter be set to the Pearson
chi-squared (or generalized chi-squared) statistic divided by the residual
degrees of freedom, which was recommended by McCullagh and Nelder as a good
general choice for continuous distributions.
{pmore}
{cmd:scale(dev)} sets the scale parameter to the deviance divided by the
residual degrees of freedom. This provides an alternative to {cmd:scale(x2)}
for continuous distributions and overdispersed or underdispersed discrete
distributions.
{pmore}
{opt scale(#)} sets the scale parameter to {it:#}.
{dlgtab:Reporting}
{phang}
{opt level(#)}, {opt noconstant}; see {help estimation options}.
{phang}
{opt coefficients} displays the nonexponentiated coefficients and corresponding
standard errors and confidence intervals. This has no effect when the
{opt rd}
option is specified, as it always presents the nonexponentiated coefficients.
{marker maximize_options}{...}
{dlgtab:Max options}
{phang}
{opt irls} requests iterated, reweighted least-squares (IRLS) optimization of
the deviance instead of Newton-Raphson optimization of the
log likelihood. This is the default.
{phang}
{opt ml} requests that optimization be carried out using Stata's
{helpb ml} command.
{phang}
{it:maximize_options}:
{opt tech:nique(algorithm_spec)},
[{cmd:{ul:no}}]{opt lo:g},
{opt tr:ace},
{opt hess:ian},
{opt grad:ient},
{opt showstep},
{opt shownr:tolerance},
{opt dif:ficult},
{opt iter:ate(#)},
{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.
{phang}
{opt fisher(#)} specifies the number of Newton-Raphson steps that should use
the Fisher scoring Hessian or expected information matrix (EIM) before
switching to the observed information matrix (OIM). This option is available
only if {opt ml} is specified and is useful only for Newton-Raphson
optimization.
{phang}
{opt search} specifies that the command search for good starting values. This
option is only available if {opt ml} is specified and is only useful for
Newton-Raphson optimization.
{title:Examples}
{p 4 8 2}{cmd:. binreg low age lwt race2 race3 smoke ptl ht ui, or}
{p 4 8 2}{cmd:. binreg dead ln_dose, rr coefficients n(n)}
{p 4 8 2}{cmd:. binreg dead ln_dose, hr coefficients n(n) ml}
{title:Also see}
{psee}
Manual: {bf:[R] binreg}
{psee}
Online: {help binreg postestimation};{break}
{helpb glm}
{p_end}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?