Surrogate Residuals for Ordinal and General Regression Models
Overview
An implementation of the surrogate approach to residuals and diagnostics for ordinal and general regression models; for details, see Liu and Zhang (2017) doi:10.1080/01621459.2017.1292915. 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.
- New function
surrogatefor 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, andVGAM(#18). - Added support for vector generalized additive models from the
VGAMpackage (i.e., objects of class"vgam"). - New data sets
df4anddf5for illustrating various uses of the surrogate residual for diagnostics an ordinal regression models.
From NEWS.md in the release
Install
Health
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) getFittedProbs.Rd:6-8: Lost braces
6 | getFittedValues <- function(object) {
| ^
checkRd: (-1) getFittedProbs.Rd:14-16: Lost braces
14 | getFittedValues <- function(object) {
| ^- NOTE13 NOTENow
- NOTE14 NOTE2026-03-10
Documentation
- Help pages
- 12 (2 internal)includes a package overview page
- Examples that run
- 100%8 run in a plain check
- Exported functions with examples
- 60%
- Documented parameters
- 80%
- Return-value docs
- 80%
- Help pages citing references
- 58%
Downloads
Repository
Moved from afit-r/sure.
- PRs merged (all time)
- 75%
- Median days to close, 50 most recently updated closed issues
- 90
- Median days to close, 50 most recently updated closed PRs
- 6
Stars over time
Forks over time
Issues over time
PRs over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/afit-r/sure on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-07-07 · The repository has a site deploy workflow
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-06-29Seen in the repository: CLAUDE.mdNamed in .Rbuildignore: CLAUDE.md
Dependencies
Installing sure adds 19 packages (8 with compiled code, 14 MB of source tarballs). Heaviest: ggplot2 6.0 MB, isoband 1.5 MB, farver 1.2 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- 0.2.0Latest
- 0.1.22017-08-21
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2017-08-21
- Total releases
- 2 / 9 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.1
- Bundled data
- 62 KB / 5 files
- Download size
- 176 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("sure")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.