简体   繁体   English

如何在 R 中进行无条件分位数回归?

[英]How to conduct unconditional quantile regression in R?

The only package I know that does unconditional quantile regression in R is uqr.我知道在 R 中进行无条件分位数回归的唯一 package 是 uqr。 Unfortunately, it's been removed from CRAN.不幸的是,它已从 CRAN 中删除。 Even though I can still use it, its functionality is limited (eg, does not conduct significance tests or allow to compare effects across quantiles).尽管我仍然可以使用它,但它的功能是有限的(例如,不进行显着性检验或允许跨分位数比较效果)。 I'm wondering if anyone knows how to conduct UQR in R, with either functions they wrote or some other means.我想知道是否有人知道如何使用他们编写的函数或其他方式在 R 中进行 UQR。

there are many limitations in terms of test and asymptotic theory regarding unconditional quantile regressions, especially if you are thinking on the version proposed in Firpo, Fortin, and Limeaux (2009) "Unconditional quantile regressions".关于无条件分位数回归的检验和渐近理论存在许多限制,特别是如果您正在考虑 Firpo、Fortin 和 Limeaux (2009)“无条件分位数回归”中提出的版本。

The application, however, is straightforward.但是,该应用程序很简单。 you need only 2 elements:你只需要2个元素:

  1. the unconditional quantile (estimated with any of your favorite packages).无条件分位数(使用您喜欢的任何包估计)。
  2. the density of the outcome at the quantile you got in (1)您在 (1) 中获得的分位数处的结果密度

After that, you apply the RIF function:之后,您应用 RIF function:

$$RIF(q) = q(t)+\frac{t-1(y<=q(t)}{f(q(t))}$$ $$RIF(q) = q(t)+\frac{t-1(y<=q(t)}{f(q(t))}$$

Once you have this, you just use that instead of your dep variable, when you write your "lm()" function.一旦你有了这个,当你写你的“lm()”function时,你只需使用它而不是你的dep变量。 And that is it.就是这样。 HTH高温高压

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM