Skip to content

ENH: quantile residuals, normal scores, uniform scores for GLM and generic #7153

Open

Description

@josef-pkt

quantile residual seems to be a "newer" alias for normal scores, i.e. use ppf to transform to normal distribution

related: uniform scores for count distributions, see #1537 #2027 and maybe others (several articles by Czado et al)

The advantage of normal scores or quantile residuals is that we can use tools for specification test developed for normal distribution.

related
#3224 tools for transforming to normal distribution
#7142 predictive distribution as target

some recent articles but there are also older ones

Feng, Cindy, Longhai Li, and Alireza Sadeghpour. 2020. “A Comparison of Residual Diagnosis Tools for Diagnosing Regression Models for Count Data.” BMC Medical Research Methodology 20 (1): 175. https://doi.org/10.1186/s12874-020-01055-2.

Pereira, Gustavo H. A. 2017. “On Quantile Residuals in Beta Regression.” Communications in Statistics - Simulation and Computation, November. https://www.tandfonline.com/doi/abs/10.1080/03610918.2017.1381740.

Pereira, Gustavo H. A., Juliana Scudilio, Manoel Santos-Neto, Denise A. Botter, and Mônica C. Sandoval. 2020. “A Class of Residuals for Outlier Identification in Zero Adjusted Regression Models.” Journal of Applied Statistics 47 (10): 1833–47. https://doi.org/10.1080/02664763.2019.1696759.

Scudilio, Juliana, and Gustavo H. A. Pereira. 2020. “Adjusted Quantile Residual for Generalized Linear Models.” Computational Statistics 35 (1): 399–421. https://doi.org/10.1007/s00180-019-00896-w.

Activity

  1. added this to the 0.14 milestone on Nov 30, 2021
  2. josef-pkt commented on Nov 30, 2021

    @josef-pkt
    MemberAuthor

    bump,
    I just looked at quantile residuals for beta regression article again

    should be next on my roadmap in diagnostic
    BetaModel is continuous and has get_distribution. So, adding PIT gof plot and quantile residuals should be easy.
    Note, Pereira 2017 defines quantile residuals as "normal scores", not uniform.

  3. josef-pkt commented on Sep 16, 2022

    @josef-pkt
    MemberAuthor

    https://stackoverflow.com/questions/73747819/how-to-generate-rqr-for-count-regression-in-python
    asking for randomized quantile residuals for Poisson, count models

    maybe I should add them after all for discrete distributions
    I was reading a bit more of the following article and it sounds better than I thought before

    Feng, Cindy, Longhai Li, and Alireza Sadeghpour. 2020. “A Comparison of Residual Diagnosis Tools for Diagnosing Regression Models for Count Data.” BMC Medical Research Methodology 20 (1): 175. https://doi.org/10.1186/s12874-020-01055-2.

    Using shapiro wilk normality test seems to work quite well, at least if sample size or deviation from assumed model is large enough.
    We have more specific tests, e.g. ZI or excess dispersion or reset tests, and plots for predictive frequencies.
    However the RQR plots might look good for getting a quick overview for possible deviations from the model, by (sorted) observations (given that many users will be more familiar with diagnostics and plots for the linear regression, normal case)

    related:
    Do we have a plot for (pearson or ...) residuals as function of linpred or some x that includes lowess or spline smoothed residuals?
    AFAIR, I only looked a Logit or binary endog data cases, and we have the plots for OLS.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions