SPARRAfairness
0.1.0.0Analysis of Differential Behaviour of SPARRA Score Across Demographic Groups
Overview
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.
Install
Health
- OK2026-04-2512 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-03-3013 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- OK2026-03-1014 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 92%
- Return-value docs
- 100%
- References docs
- 0%
Downloads
Dependencies
Nothing depends on this yet.
Code & Tests
- Cyclomatic complexity
- 4.0 median / 16 max
Test coverage
Line coverage
–
Expression
–
Tests / Examples
–
Functions
28 23 exported
Complexity
5.3 avg / 16 max
Call network
28 nodes / 15 edges
Call graph
Open call graph →Lowest coverage
Per-function coverage is not measured for this package yet.
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| decomposition_matrix | data.frame | 520 × 41 | – |
People & History
3 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.1.0.0Latest
- 0.0.0.22024-11-07 · diff ↗
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.0.0.12023-04-20
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2023-04-20
- Total releases
- 3 / 3 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 606 KB / 2 files
- Download size
- 1.0 MB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet