📄 rreg.hlp
字号:
{smcl}
{* 21mar2005}{...}
{cmd: help rreg}{right:dialog: {bf:{dialog rreg}} {space 14}}
{right: also see: {help rreg postestimation}}
{hline}
{title:Title}
{p2colset 5 17 19 2}{...}
{p2col :{hi:[R] rreg} {hline 2}}Robust regression{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 14 2}
{cmd:rreg} {depvar} [{indepvars}] {ifin}
[{cmd:,} {it:options}]
{synoptset 22 tabbed}{...}
{synopthdr:options}
{synoptline}
{syntab:Model}
{synopt :{opt tu:ne(#)}}use {it:#} as the biweight tuning constant; default is
{cmd:tune(7)}{p_end}
{syntab:Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}
{p_end}
{synopt :{opth g:enwt(newvar)}}create {newvar} containing the weights assigned
to each observation{p_end}
{syntab:Opt options}
{synopt :{it:{help rreg##optimize_options:optimization_options}}}control the optimization process; seldom used{p_end}
{synopt :{opt g:raph}}graph weights during convergence{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}{cmd:by}, {cmd:rolling}, {cmd:statsby}, and {cmd:xi} are allowed; see
{help prefix}.{p_end}
{p 4 6 2}See {help rreg postestimation} for additional capabilities of estimation commands.
{title:Description}
{pstd}
{opt rreg} performs one version of robust regression of {depvar} on
{indepvars}.
{pstd}
Also see {bf:[R] regress} for standard regression with robust variance
estimates and {bf:[R] qreg} for quantile (including median or
least-absolute-residual) regression.
{title:Options}
{dlgtab:Model}
{phang}
{opt tune(#)} is the biweight tuning constant. The default is 7, meaning
7 times the median absolute deviation from the median residual (MAD). Lower
tuning constants downweight outliers rapidly but may lead to unstable
estimates (below 6 is not recommended). Higher tuning constants produce
milder downweighting.
{dlgtab:Reporting}
{phang}
{opt level(#)}; see {help estimation options##level():estimation options}.
{phang}
{opth genwt(newvar)} creates the new variable {it:newvar} containing the
weights assigned to each observation.
{marker optimize_options}{...}
{dlgtab:Opt options}
{phang}
{it:optimization_options}:
{opt iter:ate(#)}, {opt tol:erance(#)}, [{cmd:{ul:no}}]{cmd:{ul:lo}}{cmd:g}.
{opt iterate()} specifies the maximum number of iterations; iterations stop
when the maximum change in weights drops below {opt tolerance()}; and
{opt log}/{opt nolog} specifies whether or not to show the iteration log.
These options are seldom used.
{phang}
{opt graph} allows you to graphically watch the convergence of the
iterative technique. The weights obtained from the most recent round of
estimation are graphed against weights obtained from the previous round.
{title:Examples}
{cmd:. rreg mpg weightd weightf foreign}{right:(fit model) }
{cmd:. test weightd==weightf}{right:(test hypothesis) }
{cmd:. predict predmpg}{right:(obtain predicted values) }
{cmd:. predict r, resid}{right:(obtain residuals) }
{cmd:. rreg}{right:(redisplay results) }
{cmd:. rreg mpg weightd weightf foreign, gen(wt)}{right:(fit model) }
{cmd:. predict hat, hat}{right:(obtain corrected hat) }
{title:Also see}
{psee}
Manual: {bf:[R] rreg}
{psee}
Online: {help rreg postestimation};{break}
{helpb qreg}, {helpb regress}, {help regress postestimation}{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -