Skip to content
This package has an overdue CRAN deadline (Oct 12) to fix its check problems; archival is imminent. See the check details

Surrogate Residuals for Ordinal and General Regression Models

1packages depend
7.9Kdownloads / year
55.6%test coverage
0/13flavors OK

Overview

About

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.

Changes in 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.

From NEWS.md in the release

Install

Health

CRAN checks
13NOTE
Check messages
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) {
       |                                     ^

CRAN check page ↗

Slowest check: 1.6 min · r-oldrel-windows-x86_64
Status changes
  • NOTE13 NOTENow
  • NOTE14 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.2.0
READMEYes · 74 wordsVignettesNoNEWSYes · 100% structured · mentions 0.2.0Citation fileNo
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

7.9K
CRAN downloads in the past year
Rank #6,257 · ~22/day · ~657/mo
Daily download trend is not available in this view yet.
57530 days
1.3K90 days
7.9K1 year
Compare downloads with other packages →
Also on90 r2u8 autocran

Repository

Moved from afit-r/sure.

8Stars
4Forks
1Open issues
0Open PRs
1Releases
158Commits
5Commit identities
residualsdiagnosticscategorical-dataordinal-regression
158 commits · Last activity 2026-07-07 · 0% stars, 30d · Default branch at 0.3.0.9000, ahead of CRAN 0.2.0 (checked 2026-10-11)
Responsiveness
How these are sampled
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

2021-08-10 · 82026-07-07 · 8
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-07-07 · The repository has a site deploy workflow

Coverage (1)
Coverage reporting (Codecov)
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-06-29
    Seen in the repository: CLAUDE.md
    Named in .Rbuildignore: CLAUDE.md
Shared conventions any agent may read, so they name no particular tool.
Seen in the repository: AGENTS.md
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
7 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 3.1
Imports (4)
LinkingTo (0)
none
Suggests (5)
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Depends 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (4)
Author, Maintainer since 0.1.2 (2017)
Contributor
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 0.2.0Latest
    record
    2017-09-19 · current release · diff ↗ ·
    added 2 exports
    autoplot.vgam, surrogate
  • 0.1.2
    record
    2017-08-21
  • R
    R 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")
Greenwell, B., Boehmke, B., Liu, D., & McCarthy, A. (2017). sure: Surrogate Residuals for Ordinal and General Regression Models (Version 0.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for sure version 0.2.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy