Surrogate Residuals for Ordinal and General Regression Models

An implementation of the surrogate approach to residuals and diagnostics for ordinal and general regression models; for details, see Liu and Zhang (2017) . These residuals can be used to construct standard residual plots for model diagnostics (e.g., residual-vs-fitted value plots, residual-vs-covariate plots, Q-Q plots, etc.). The package also provides an 'autoplot' function for producing standard diagnostic plots using 'ggplot2' graphics. The package currently supports cumulative link models from packages 'MASS', 'ordinal', 'rms', and 'VGAM'. Support for binary regression models using the standard 'glm' function is also available.

CRAN_Status_Badge Build Status AppVeyor Build Status codecov

An R package for constructing SUrrogate-based REsiduals and diagnostics for ordinal and general regression models; based on the approach described in Dungang and Zhang (2017).


The sure package is currently listed on CRAN and can easily be installed:

# Install from CRAN (recommended)
# Alternatively, install the development version from GitHub
if (!requireNamespace("devtools")) install.packages("devtools")


Liu, Dungang and Zhang, Heping. Residuals and Diagnostics for Ordinal Regression Models: A Surrogate Approach. Journal of the American Statistical Association (accepted). URL


NEWS for sure package

Changes for version 0.2.0

  • New function surrogate for returning the surrogate response values used in calculating the surrogate-based residuals. The surrogate response values can be useful for checking the proportionality assumption of fitted cumulative link models, among other things.
  • Jittering (on both the probability scale and the response scale) is now available for fitted cumulative link models based on packages MASS, ordinal, rms, and VGAM (#18).
  • Added support for vector generalized additive models from the VGAM package (i.e., objects of class "vgam").
  • New data sets df4 and df5 for illustrating various uses of the surrogate residual for diagnostics an ordinal regression models.

Changes for version 0.1.2

  • Initial release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.0 by Brandon Greenwell, 4 years ago

Report a bug at

Browse source code at

Authors: Brandon Greenwell [aut, cre] , Andrew McCarthy [aut] , Brad Boehmke [aut] , Dungang Liu [ctb]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports ggplot2, goftest, gridExtra, stats

Suggests MASS, ordinal, rms, testthat, VGAM

See at CRAN