Skip to content

SPARRAfairness

0.1.0.0

Analysis of Differential Behaviour of SPARRA Score Across Demographic Groups

0packages depend
2.1Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by James LileyFirst published 2023-04-203 releasesCRAN page ↗

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

CRAN checks
13OK
Slowest check: 5.0 min · r-oldrel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
11
Dependencies · direct
Check history
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-03-30
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 35 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 33% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
92%
Return-value docs
100%
References docs
0%

Downloads

2.1K
CRAN downloads in the past year
Rank #18,337 · ~6/day · ~177/mo
Daily download trend is not available in this view yet.
20430 days
64590 days
2.1K1 year
Compare downloads with other packages →
Also on112 r2u27 autocran

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)
Depends (6)
R >= 3.5.0statsgraphicsgrDevicesmatrixStatsranger
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Code Composition
R 2,215 (53%)Rd 1,279 (31%)Vignettes 597 (14%)Other 55 (1%)
Code characteristics
Object systems
S33
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

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Datasets

Bundled datasets · 1
NameClassRows × ColsAlso ships in
decomposition_matrixdata.frame520 × 41

People & History

People (6)
Maintainer (1)
Maintainer, Author
Authors (2)
Maintainer, Author
Contributors (4)
Contributor
Contributor
Contributor
Contributor
Package Timeline

3 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.0.0Latest
    2025-04-09 · current release · diff ↗
  • 0.0.0.2
    2024-11-07 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.0.0.1
    2023-04-20
  • R
    R 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
Report a problem with this page →