Skip to content

REF: Quantile Regression: handling of zero residuals is asymmetric #2485

Open

Description

@josef-pkt

currently we treat zero residuals as positive

after fixing #2377 zeros are moved to the positive part, then they are multiplied by (1-q) in the where, which already had a weak inequality.

mask = np.abs(resid) < .000001
resid[mask] = ((resid[mask] >= 0) * 2 - 1) * .000001
resid = np.where(resid < 0, q * resid, (1-q) * resid)

Given that we don't use linear programming in Quantile Regression, this will be only for the corner case when we have many exactly fitting observations because of the underlying data. (AFAICS)

In #2377 I suggested to use penalization instead, but this won't be in that fix, because I would have to write more unit tests to think about it. or verify it.

(Related: similar to the smoothed L1 penalization, I would like to get a smoothed version of Quantile Regression into RLM.)

Activity

  1. added this to the 0.8 milestone on Jun 29, 2015
  2. changed the title [-]REF: Quantile Regression: handling of zero residuals is assymmetric[/-] [+]REF: Quantile Regression: handling of zero residuals is asymmetric[/+] on Jun 29, 2015
  3. josef-pkt commented on Sep 16, 2016

    @josef-pkt
    MemberAuthor

    Yoshida, Takuma. 2013. “Asymptotics for Penalized Spline Estimators in Quantile Regression.” Communications in Statistics - Theory and Methods 0 (ja): null. doi:10.1080/03610926.2013.765477.

    on page 4 uses a different weight calculation in the neighborhood of zero, which puts zero weight on observations with residual=0. The references that he refers to don't do that.
    Removing observations with zero weights from the WLS calculation might remove the discontinuity and convergence cycles, maybe.
    note: quantile regression doesn't calculate weight directly, it just calculates adjusted residuals for inverse weights.

    Another aside: @vincentarelbundock's julia version has also Koenker's interior point algorithm as enhancement, and they got permission to use it under MIT or BSD license. It's supposed to be faster than IRLS in their timings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions