Skip to content

SPARRAfairness

Analysis of Differential Behaviour of SPARRA Score Across Demographic Groups

v0.1.0.0 · Apr 9, 2025 · GPL (>= 3)

Description

The SPARRA risk score (Scottish Patients At Risk of admission and Re-Admission) estimates yearly risk of emergency hospital admission using electronic health records on a monthly basis for most of the Scottish population. This package implements a suite of functions used to analyse the behaviour and performance of the score, focusing particularly on differential performance over demographically-defined groups. It includes useful utility functions to plot receiver-operator-characteristic, precision-recall and calibration curves, draw stock human figures, estimate counterfactual quantities without the need to re-compute risk scores, to simulate a semi-realistic dataset. Our manuscript can be found at: <doi:10.1371/journal.pdig.0000675>.

Downloads

215

Last 30 days

21290th

526

Last 90 days

2.2K

Last year

Trend: +25% (30d vs prior 30d)

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 ERROR
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (1 non-OK)
ERROR r-oldrel-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'SPARRAfairness_example.Rmd' using rmarkdown
[WARNING] Citeproc: citation sparrav4 not found
! Package pdftex.def Error: File `4147f656dc13060a1f8cb4b2c073071902167221.pdf'
 not found: using draft setting.

Error: processing vignette 'SPARRAfairness_example.Rmd' failed with diagnostics:
LaTeX failed to compile D:/RCompile/CRANpkg/local/4.4/SPARRAfairness.Rcheck/vign_test/SPARRAfairness/vignettes/SPARRAfairness_example.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See SPARRAfairness_example.log for more info.
--- failed re-building 'SPARRAfairness_example.Rmd'

SUMMARY: processing the following file failed:
  'SPARRAfairness_example.Rmd'

Error: Vignette re-building failed.
Execution halted

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 30, 2026
ERROR r-oldrel-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'SPARRAfairness_example.Rmd' using rmarkdown
[WARNING] Citeproc: citation sparrav4 not found
! Package pdftex.def Error: File `4147f656dc13060a1f8cb4b2c073071902167221.pdf'
 not found: using draft se
...[truncated]...
for debugging tips. See SPARRAfairness_example.log for more info.
--- failed re-building 'SPARRAfairness_example.Rmd'

SUMMARY: processing the following file failed:
  'SPARRAfairness_example.Rmd'

Error: Vignette re-building failed.
Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies matrixStats ranger mvtnorm cvAUC ggplot2 ggrepel patchwork scales SPARRAfairness

Version History

new 0.1.0.0 Mar 10, 2026
updated 0.1.0.0 ← 0.0.0.2 diff Apr 8, 2025
updated 0.0.0.2 ← 0.0.0.1 diff Nov 6, 2024
new 0.0.0.1 Apr 19, 2023