Stata 我如何在回归方程';样本意味着什么?

Stata 我如何在回归方程';样本意味着什么?,stata,quantile-regression,Stata,Quantile Regression,我正在研究Stata中的几种回归(probit、logit、分位数回归,…),我想知道如何在回归者的样本均值下预测因变量。对于OLS来说,这很简单,但对于分位数回归,不知道如何得到它 使用margins命令可以: . sysuse auto (1978 Automobile Data) . qreg price weight length i.foreign, nolog Median regression Number o

我正在研究Stata中的几种回归(probit、logit、分位数回归,…),我想知道如何在回归者的样本均值下预测因变量。对于OLS来说,这很简单,但对于分位数回归,不知道如何得到它

使用
margins
命令可以:

. sysuse auto
(1978 Automobile Data)

. qreg price weight length i.foreign, nolog

Median regression                                   Number of obs =         74
  Raw sum of deviations  71102.5 (about 4934)
  Min sum of deviations 54411.29                    Pseudo R2     =     0.2347

------------------------------------------------------------------------------
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      weight |   3.933588   1.328718     2.96   0.004     1.283543    6.583632
      length |  -41.25191   45.46469    -0.91   0.367    -131.9284    49.42456
             |
     foreign |
    Foreign  |   3377.771   885.4198     3.81   0.000     1611.857    5143.685
       _cons |   344.6489   5182.394     0.07   0.947     -9991.31    10680.61
------------------------------------------------------------------------------

. margins, at((mean) _continuous (base) _factor)
Warning: cannot perform check for estimable functions.

Adjusted predictions                            Number of obs     =         74
Model VCE    : IID

Expression   : Linear prediction, predict()
at           : weight          =    3019.459 (mean)
               length          =    187.9324 (mean)
               foreign         =           0

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _cons |   4469.386   418.7774    10.67   0.000     3648.597    5290.175

这可以预测连续变量的协变量平均值的中位数和假人的基数(这样你就可以避免分数怀孕等无意义的数值)。

帮助qreg_postestimation
是你的朋友。如果你发现下面的答案很有帮助,请考虑点击复选标记接受它。