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

📄 qreg.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 15mar2005}{...}
{cmd:help qreg}, {cmd:help iqreg}, {cmd:help sqreg}, {right:dialogs:  {bf:{dialog qreg}}  {bf:{dialog iqreg}}{space 8}}
{cmd:help bsqreg}, {cmd:help _qreg} {right: {bf:{dialog sqreg}}  {bf:{dialog bsqreg}}{space 6}}
{right:also see:  {help qreg postestimation}}
{hline}

{title:Title}

{p2colset 5 17 19 2}{...}
{p2col :{hi:[R] qreg} {hline 2}}Quantile (including median) regression{p_end}
{p2colreset}{...}


{title:Syntax}

{phang}
Quantile regression

{p 8 13 2}
{cmd:qreg} {depvar} [{indepvars}] {ifin} {weight}
	[{cmd:,} {it:{help qreg##qreg_options:qreg_options}}]

{phang}
Interquantile range regressions

{p 8 14 2}
{cmd:iqreg} {depvar} [{indepvars}] {ifin}
	[{cmd:,} {it:{help qreg##iqreg_options:iqreg_options}}]

{phang}
Simultaneous-quantile regression

{p 8 14 2}
{cmd:sqreg} {depvar} [{indepvars}] {ifin}
	[{cmd:,} {it:{help qreg##sqreg_options:sqreg_options}}]

{phang}
Quantile regression with bootstrap standard errors

{p 8 15 2}
{cmd:bsqreg} {depvar} [{indepvars}] {ifin}
	[{cmd:,} {it:{help qreg##bsqreg_options:bsqreg_options}}]

{phang}
Internal estimation command for quantile regression

{p 8 14 2}{cmd:_qreg} [{depvar} [{indepvars}] {ifin} {weight}]
	[{cmd:,} {it:{help qreg##_qreg_options:_qreg_options}}]

{synoptset 25 tabbed}{...}
{marker qreg_options}{...}
{synopthdr :qreg_options}
{synoptline}
{syntab :Model}
{synopt :{opt q:uantile(#)}}estimate {it:#} quantile; default is {cmd:quantile(.5)}{p_end}

{syntab :Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}

{syntab :Max options}
{synopt :{it:{help qreg##qreg_maximize:maximize options}}}control the maximization process; seldom used{p_end}
{synopt :{opt wls:iter(#)}}attempt {it:#} weighted least-squares iterations before doing linear programming iterations{p_end}
{synoptline}
{p2colreset}{...}

{synoptset 25 tabbed}{...}
{marker iqreg_options}{...}
{synopthdr :iqreg_options}
{synoptline}
{syntab :Model}
{synopt :{opt q:uantiles(# #)}}interquantile range; default is {bind:{cmd:quantiles(.25 .75)}}{p_end}
{synopt :{opt r:eps(#)}}perform {it:#} bootstrap replications; default is {cmd:reps(20)}{p_end}

{syntab :Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{opt nod:ots}}suppress display of the replication dots{p_end}
{synoptline}
{p2colreset}{...}

{synoptset 25 tabbed}{...}
{marker sqreg_options}{...}
{synopthdr :sqreg_options}
{synoptline}
{syntab :Model}
{synopt :{cmdab:q:uantiles(}{it:#}[{it:#}[{it:# ...}]]{cmd:)}}estimate {it:#} quantiles; default is {cmd:quantiles(.5)}{p_end}
{synopt :{opt r:eps(#)}}perform {it:#} bootstrap replications; default is {cmd:reps(20)}{p_end}

{syntab :Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{opt nod:ots}}suppress display of the replication dots{p_end}
{synoptline}
{p2colreset}{...}

{synoptset 25 tabbed}{...}
{marker bsqreg_options}{...}
{synopthdr :bsqreg_options}
{synoptline}
{syntab :Model}
{synopt :{opt q:uantile(#)}}estimate {it:#} quantile; default is {cmd:quantile(.5)}{p_end}
{synopt :{opt r:eps(#)}}perform {it:#} bootstrap replications; default is {cmd:reps(20){p_end}

{syntab :Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synoptline}
{p2colreset}{...}

{synoptset 25}{...}
{marker _qreg_options}{...}
{synopthdr :_qreg_options}
{synoptline}
{synopt :{opt q:uantile(#)}}estimate {it:#} quantile; default is {cmd:quantile(.5)}{p_end}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{opt ac:curacy(#)}}relative accuracy required for linear programming algorithm; should not be specified{p_end}
{synopt :{it:{help qreg##_qreg_maximize:maximize options}}}control the maximization process; seldom used{p_end}
{synopt :{opt wls:iter(#)}}attempt {it:#} weighted least-squares iterations before doing linear programming iterations{p_end}
{synoptline}
{p2colreset}{...}

{phang}{cmd:by}, {cmd:rolling}, {cmd:statsby}, and {cmd:xi} are allowed by
{cmd:qreg}, {cmd:iqreg}, {cmd:sqreg}, and {cmd:bsqreg};
{cmd:stepwise} is allowed with {cmd:qreg}; see {help prefix}.{p_end}
{phang}{cmd:qreg} and {cmd:_qreg} allow {cmd:aweight}s and {cmd:fweight}s; see {help weight}.{p_end}
{phang}See {help qreg postestimation} for features available after estimation.


{title:Description}

{pstd}
{cmd:qreg} fits quantile (including median) regression models, also known as
least-absolute value models (LAV or MAD) and minimum L1-norm models.

{pstd}
{cmd:iqreg} estimates interquantile range regressions, regressions of the
difference in quantiles.  The estimated variance-covariance matrix of the
estimators (VCE) is obtained via bootstrapping.  {cmd:iqreg} has a limit of
336 {it:indepvars}.

{pstd}
{cmd:sqreg} estimates simultaneous-quantile regression.  It produces the same
coefficients as {cmd:qreg} for each quantile.  Reported standard errors will
be similar, but {cmd:sqreg} obtains an estimate of the VCE via bootstrapping,
and the VCE includes between-quantiles blocks.  Thus you can test and construct
confidence intervals comparing coefficients describing different quantiles.
{cmd:sqreg} has a limit of 336/q {it:indepvars}, where q is the
number of quantiles specified.

{pstd}
{cmd:bsqreg} is equivalent to {cmd:sqreg} with one quantile.  {cmd:sqreg} is
faster than {cmd:bsqreg}, but {cmd:bsqreg} is not limited to 336 coefficients.

{pstd}
{cmd:_qreg} is the internal estimation command for quantile regression.
{cmd:_qreg} is not intended to be used directly; if interested, see
{bind:{bf:[R] qreg}}.


{title:Options for qreg}

{dlgtab:Model}

{phang}{opt quantile(#)} specifies the quantile to be estimated and should be
a number between 0 and 1, exclusive.  Numbers larger than 1 are interpreted as
percentages.  The default value of 0.5 corresponds to the median.

{dlgtab:Reporting}

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

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

{phang}{it:maximize_options}: {opt iter:ate(#)}, [{cmdab:no:}]{opt lo:g}, 
{opt tr:ace}; see {help maximize}.  These options are seldom used.

{phang}{opt wlsiter(#)} specifies the number of weighted least-squares
iterations that will be attempted before the linear programming iterations are
started.  The default value is 1.  If there are convergence 
problems{hline 2}something we have never observed{hline 2}increasing this 
number should help.


{title:Options for iqreg}

{dlgtab:Model}

{phang}{opt quantiles(# #)} specifies the quantiles to be compared.  The first
number must be less than the second, and both should be between 0 and 1,
exclusive.  Numbers larger than 1 are interpreted as percentages.  Not
specifying this option is equivalent to specifying 
{bind:{cmd:quantiles(.25 .75)}}, meaning the interquartile range.

{phang}{opt reps(#)} specifies the number of bootstrap replications to be used
to obtain an estimate of the variance-covariance matrix of the estimators
(standard errors).  {cmd:reps(20)} is the default and is arguably too small.
{cmd:reps(100)} would perform 100 bootstrap replications.  {cmd:reps(1000)}
would perform 1,000 replications.

{dlgtab:Reporting}

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

{phang}{opt nodots} suppresses display of the replication dots.


{title:Options for sqreg}

{dlgtab:Model}

{phang}{cmd:quantiles(}{it:#} [{it:#} [{it:#} {it:...}]]{cmd:)} specifies the
quantiles to be estimated and should contain numbers between 0 and 1,
exclusive.  Numbers larger than 1 are interpreted as percentages.  The default
value of 0.5 corresponds to the median.

{phang}{opt reps(#)} specifies the number of bootstrap replications to be used
to obtain an estimate of the variance-covariance matrix of the estimators
(standard errors).  {cmd:reps(20)} is the default and is arguably too small.
{cmd:reps(100)} would perform 100 bootstrap replications.  {cmd:reps(1000)}
would perform 1,000 replications.

{dlgtab:Reporting}

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

{phang}{opt nodots} suppresses display of the replication dots.


{title:Options for bsqreg}

{dlgtab:Model}

{phang}{opt quantile(#)} specifies the quantile to be estimated and should be
a number between 0 and 1, exclusive.  Numbers larger than 1 are interpreted as
percentages.  The default value of 0.5 corresponds to the median.

{phang}{opt reps(#)} specifies the number of bootstrap replications to be used
to obtain an estimate of the variance-covariance matrix of the estimators
(standard errors).  {cmd:reps(20)} is the default and is arguably too small.
{cmd:reps(100)} would perform 100 bootstrap replications.  {cmd:reps(1000)}
would perform 1,000 replications.

{dlgtab:Reporting}

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


{marker _qreg_maximize}{...}
{title:Options for _qreg}

{phang}{opt quantile(#)} specifies the quantile to be estimated and should be
a number between 0 and 1, exclusive.
The default value of 0.5 corresponds to the median.

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

{phang}{opt accuracy(#)} should not be specified; it specifies the relative
accuracy required for the linear programming algorithm.  If the potential for
improving the sum of weighted deviations by deleting an observations from the
basis is less than this on a percentage basis, the algorithm will be said to
have converged.  The default value is 10^-10.

{phang}{it:maximize_options}: {opt iter:ate(#)}, [{cmdab:no:}]{opt lo:g}, 
{opt trace}; see {help maximize}.  These options are seldom used.

{phang}{opt wlsiter(#)} specifies the number of weighted least-squares
iterations that will be attempted before the linear programming iterations are
started.  The default value is 1.  If there are convergence 
problems{hline 2}something we have never observed{hline 2}increasing this 
number should help.


{title:Examples}

{phang}{cmd:. qreg y x}

{phang}{cmd:. qreg price weight length foreign}{p_end}
{phang}{cmd:. qreg} {space 14} (to redisplay results){p_end}
{phang}{cmd:. predict hat} {space 7} (to obtain predicted values){p_end}
{phang}{cmd:. predict r, resid} {space 2} (to obtain residuals)

{phang}{cmd:. qreg y x, quantile(.75)}

{phang}{cmd:. qreg price weight length foreign, quantile(.25)}{p_end}
{phang}{cmd:. qreg price weight length foreign, quantile(.75)}

{phang}{cmd:. iqreg price weight length foreign, quant(.25 .75) reps(100)}

{phang}{cmd:. sqreg price weight length foreign, quant(.25 .5 .75) reps(100)}

{phang}{cmd:. bsqreg price weight length foreign}{p_end}
{phang}{cmd:. bsqreg price weight length foreign, quantile(.75)}


{title:Also see}

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

{psee}
Online:  {help qreg postestimation};{break}
{helpb bootstrap}, {helpb regress}, {helpb rreg}
{p_end}

⌨️ 快捷键说明

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