{
  "_id": "6a185dfdacfb0bcc41dbd1b9",
  "Package": "SPARRAfairness",
  "Title": "Analysis of Differential Behaviour of SPARRA Score Across\nDemographic Groups",
  "Version": "0.1.0.0",
  "Authors@R": "c(person(given = \"Ioanna\",\nfamily = \"Thoma\",\nrole = c(\"aut\"),\nemail = \"ithoma@ed.ac.uk\",\ncomment = c(ORCID = \"0000-0001-6928-2198\")),\nperson(given = \"Catalina\",\nfamily = \"Vallejos\",\nrole = c(\"ctb\"),\nemail = \"catalina.vallejos@ed.ac.uk\",\ncomment = c(ORCID = \"0000-0003-3638-1960\")),\nperson(given = \"Louis\",\nfamily = \"Aslett\",\nrole = c(\"ctb\"),\nemail = \"louis.aslett@durham.ac.uk\",\ncomment = c(ORCID = \"0000-0003-2211-233X\")),\nperson(given = \"Jill\",\nfamily = \"Ireland\",\nrole = c(\"ctb\"),\nemail = \"jill.ireland@phs.scot\",\ncomment = c(ORCID = \"0009-0009-5324-6630\")),\nperson(given = \"Simon\",\nfamily = \"Rogers\",\nrole = c(\"ctb\"),\nemail = \"simon.rogers@nhs.scot\",\ncomment = c(ORCID = \"0000-0003-3578-4477\")),\nperson(given = \"James\",\nfamily = \"Liley\",\nrole = c(\"cre\",\"aut\"),\nemail = \"james.liley@durham.ac.uk\",\ncomment = c(ORCID = \"0000-0002-0049-8238\")))",
  "Maintainer": "James Liley <james.liley@durham.ac.uk>",
  "Description": "The SPARRA risk score (Scottish Patients At Risk of\nadmission and Re-Admission) estimates yearly risk of emergency\nhospital admission using electronic health records on a monthly\nbasis for most of the Scottish population. This package\nimplements a suite of functions used to analyse the behaviour\nand performance of the score, focusing particularly on\ndifferential performance over demographically-defined groups.\nIt includes useful utility functions to plot\nreceiver-operator-characteristic, precision-recall and\ncalibration curves, draw stock human figures, estimate\ncounterfactual quantities without the need to re-compute risk\nscores, to simulate a semi-realistic dataset. Our manuscript\ncan be found at: <doi:10.1371/journal.pdig.0000675>.",
  "License": "GPL (>= 3)",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "RoxygenNote": "7.3.2",
  "VignetteBuilder": "knitr",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-28 14:54:17 UTC",
    "User": "root"
  },
  "Author": "Ioanna Thoma [aut] (<https://orcid.org/0000-0001-6928-2198>),\nCatalina Vallejos [ctb]\n(<https://orcid.org/0000-0003-3638-1960>), Louis Aslett [ctb]\n(<https://orcid.org/0000-0003-2211-233X>), Jill Ireland [ctb]\n(<https://orcid.org/0009-0009-5324-6630>), Simon Rogers [ctb]\n(<https://orcid.org/0000-0003-3578-4477>), James Liley [cre,\naut] (<https://orcid.org/0000-0002-0049-8238>)",
  "Repository": "https://jamesliley.r-universe.dev",
  "Date/Publication": "2025-04-09 12:40:02 UTC",
  "RemoteUrl": "https://github.com/cran/SPARRAfairness",
  "RemoteRef": "HEAD",
  "RemoteSha": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
  "MD5sum": "b9e0b196bad08aeb346b5eb28ef8df5d",
  "_user": "jamesliley",
  "_type": "src",
  "_file": "SPARRAfairness_0.1.0.0.tar.gz",
  "_fileid": "ae84d3d287720f8910887913b4013dc6224cee3c4d541ffc3c941694d8bf5007",
  "_filesize": 3168448,
  "_sha256": "ae84d3d287720f8910887913b4013dc6224cee3c4d541ffc3c941694d8bf5007",
  "_created": "2026-05-28T14:54:17.000Z",
  "_published": "2026-05-28T15:23:41.767Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78319310401,
      "time": 172,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "7269318463"
    },
    {
      "job": 78319310611,
      "time": 154,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7269308091"
    },
    {
      "job": 78319310440,
      "time": 138,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "7269941951"
    },
    {
      "job": 78319310381,
      "time": 126,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7269929966"
    },
    {
      "job": 78318145738,
      "time": 223,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7269203885"
    },
    {
      "job": 78319310261,
      "time": 113,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7269292948"
    },
    {
      "job": 78319310522,
      "time": 131,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "7269302057"
    },
    {
      "job": 78319310383,
      "time": 98,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "WARNING",
      "artifact": "7269279638"
    },
    {
      "job": 78319310479,
      "time": 113,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "WARNING",
      "artifact": "7269291234"
    }
  ],
  "_buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cran/SPARRAfairness",
  "_commit": {
    "id": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
    "author": "James Liley <james.liley@durham.ac.uk>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 0.1.0.0\n",
    "time": 1744202402
  },
  "_maintainer": {
    "name": "James Liley",
    "email": "james.liley@durham.ac.uk",
    "login": "jamesliley",
    "description": "",
    "uuid": 7887561,
    "orcid": "0000-0002-0049-8238"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "stats",
      "role": "Depends"
    },
    {
      "package": "graphics",
      "role": "Depends"
    },
    {
      "package": "grDevices",
      "role": "Depends"
    },
    {
      "package": "matrixStats",
      "role": "Depends"
    },
    {
      "package": "ranger",
      "role": "Depends"
    },
    {
      "package": "mvtnorm",
      "role": "Imports"
    },
    {
      "package": "cvAUC",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "ggrepel",
      "role": "Imports"
    },
    {
      "package": "patchwork",
      "role": "Imports"
    },
    {
      "package": "scales",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "jamesliley",
      "count": 3,
      "uuid": 7887561
    }
  ],
  "_userbio": {
    "uuid": 7887561,
    "type": "user",
    "name": "jamesliley"
  },
  "_downloads": {
    "count": 151,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/SPARRAfairness"
  },
  "_searchresults": 4,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/SPARRAfairness.html",
    "manual.pdf"
  ],
  "_realowner": "jamesliley",
  "_cranurl": false,
  "_releases": [
    {
      "version": "0.0.0.1",
      "date": "2023-04-20"
    },
    {
      "version": "0.0.0.2",
      "date": "2024-11-07"
    },
    {
      "version": "0.1.0.0",
      "date": "2025-04-09"
    }
  ],
  "_exports": [
    "ab",
    "adjusted_fdr",
    "adjusted_for",
    "cal_2panel",
    "counterfactual_yhat",
    "dat2mat",
    "demographic_parity",
    "drawperson",
    "drawprop",
    "for_breakdown",
    "getcal",
    "getprc",
    "getroc",
    "group_fairness",
    "groupmetric_2panel",
    "integral",
    "logistic",
    "logit",
    "phs_colours",
    "plot_decomp",
    "prc_2panel",
    "roc_2panel",
    "sim_pop_data"
  ],
  "_datasets": [
    {
      "name": "all_data",
      "title": "All data for fairness measures",
      "object": "all_data",
      "class": [
        "list"
      ],
      "fields": [],
      "table": false,
      "tojson": false
    },
    {
      "name": "decomposition_matrix",
      "title": "Decomposition matrix",
      "object": "decomposition_matrix",
      "class": [
        "data.frame"
      ],
      "fields": [
        "Abnormality.NEC",
        "Blood",
        "Circulatory",
        "Congenital",
        "Digestive",
        "Ear",
        "Endocrine.metabolic",
        "External",
        "Eye",
        "Genitourinary",
        "Infectious.disease",
        "Mental.behavioural",
        "Musculoskeletal",
        "Neoplasm",
        "Nervous.system",
        "Not.recorded",
        "Obstetric.puerperium",
        "Other",
        "Perinatal",
        "Respiratory",
        "Skin",
        "Died.of.Abnormality.NEC",
        "Died.of.Blood",
        "Died.of.Circulatory",
        "Died.of.Congenital",
        "Died.of.Digestive",
        "Died.of.Ear",
        "Died.of.Endocrine.metabolic",
        "Died.of.External",
        "Died.of.Eye",
        "Died.of.Genitourinary",
        "Died.of.Infectious.disease",
        "Died.of.Mental.behavioural",
        "Died.of.Musculoskeletal",
        "Died.of.Neoplasm",
        "Died.of.Nervous.system",
        "Died.of.Obstetric.puerperium",
        "Died.of.Perinatal",
        "Died.of.Respiratory",
        "Died.of.Skin",
        "Died.of.unrecorded"
      ],
      "rows": 520,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "ab",
      "title": "ab() Shorthand to draw a red x-y line",
      "topics": [
        "ab"
      ]
    },
    {
      "page": "adjusted_fdr",
      "title": "adjusted_fdr",
      "topics": [
        "adjusted_fdr"
      ]
    },
    {
      "page": "adjusted_for",
      "title": "adjusted_for",
      "topics": [
        "adjusted_for"
      ]
    },
    {
      "page": "all_data",
      "title": "All data for fairness measures",
      "topics": [
        "all_data"
      ]
    },
    {
      "page": "build_diff",
      "title": "build_diff Prepares a data frame for a ggplot object to compare differences using linear interpolation.",
      "topics": [
        "build_diff"
      ]
    },
    {
      "page": "cal_2panel",
      "title": "cal_2panel Draws calibration curves (with legend) with a second panel underneath showing predicted differences.",
      "topics": [
        "cal_2panel"
      ]
    },
    {
      "page": "counterfactual_yhat",
      "title": "counterfactual_yhat",
      "topics": [
        "counterfactual_yhat"
      ]
    },
    {
      "page": "dat2mat",
      "title": "dat2mat",
      "topics": [
        "dat2mat"
      ]
    },
    {
      "page": "decomposition_matrix",
      "title": "Decomposition matrix",
      "topics": [
        "decomposition_matrix"
      ]
    },
    {
      "page": "demographic_parity",
      "title": "demographic_parity",
      "topics": [
        "demographic_parity"
      ]
    },
    {
      "page": "drawperson",
      "title": "drawperson",
      "topics": [
        "drawperson"
      ]
    },
    {
      "page": "drawprop",
      "title": "drawprop",
      "topics": [
        "drawprop"
      ]
    },
    {
      "page": "for_breakdown",
      "title": "for_breakdown",
      "topics": [
        "for_breakdown"
      ]
    },
    {
      "page": "getcal",
      "title": "getcal()",
      "topics": [
        "getcal"
      ]
    },
    {
      "page": "getprc",
      "title": "getprc()",
      "topics": [
        "getprc"
      ]
    },
    {
      "page": "getroc",
      "title": "getroc() Comprehensive plotting function for receiver-operator characteristic curve. Also calculates AUROC and standard error.",
      "topics": [
        "getroc"
      ]
    },
    {
      "page": "group_fairness",
      "title": "group_fairness",
      "topics": [
        "group_fairness"
      ]
    },
    {
      "page": "groupmetric_2panel",
      "title": "groupmetric_2panel Draws plots of a group fairness metric with a second panel underneath",
      "topics": [
        "groupmetric_2panel"
      ]
    },
    {
      "page": "integral",
      "title": "integral() Quick form for trapezoidal integration over range of x",
      "topics": [
        "integral"
      ]
    },
    {
      "page": "logistic",
      "title": "Logistic",
      "topics": [
        "logistic"
      ]
    },
    {
      "page": "logit",
      "title": "Logit",
      "topics": [
        "logit"
      ]
    },
    {
      "page": "phs_colours",
      "title": "phs_colours",
      "topics": [
        "phs_colours"
      ]
    },
    {
      "page": "plot_decomp",
      "title": "plot_decomp",
      "topics": [
        "plot_decomp"
      ]
    },
    {
      "page": "plot.sparraCAL",
      "title": "Plot function for class sparraCAL",
      "topics": [
        "plot.sparraCAL"
      ]
    },
    {
      "page": "plot.sparraPRC",
      "title": "Plot function for class above",
      "topics": [
        "plot.sparraPRC"
      ]
    },
    {
      "page": "plot.sparraROC",
      "title": "Plot function for class sparraROC",
      "topics": [
        "plot.sparraROC"
      ]
    },
    {
      "page": "prc_2panel",
      "title": "prc_2panel Draws a PRC curve (with legend) with a second panel underneath showing precision difference.",
      "topics": [
        "prc_2panel"
      ]
    },
    {
      "page": "roc_2panel",
      "title": "roc_2panel Draws a ROC curve (with legend) with a second panel underneath showing sensitivity difference.",
      "topics": [
        "roc_2panel"
      ]
    },
    {
      "page": "sim_pop_data",
      "title": "sim_pop_data",
      "topics": [
        "sim_pop_data"
      ]
    }
  ],
  "_readme": "https://github.com/cran/SPARRAfairness/raw/HEAD/README.md",
  "_rundeps": [
    "bitops",
    "caTools",
    "cli",
    "cpp11",
    "cvAUC",
    "data.table",
    "farver",
    "ggplot2",
    "ggrepel",
    "glue",
    "gplots",
    "gtable",
    "gtools",
    "isoband",
    "KernSmooth",
    "labeling",
    "lattice",
    "lifecycle",
    "Matrix",
    "matrixStats",
    "mvtnorm",
    "patchwork",
    "R6",
    "ranger",
    "RColorBrewer",
    "Rcpp",
    "RcppEigen",
    "rlang",
    "ROCR",
    "S7",
    "scales",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "SPARRAfairness_example.Rmd",
      "filename": "SPARRAfairness_example.html",
      "title": "SPARRAfairness example",
      "author": "James Liley, Ioanna Thoma",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Simulation of data",
        "Fit risk score",
        "Define groups",
        "Generate metrics",
        "Score distributions",
        "Counterfactual score distributions",
        "Score performance",
        "False omission and false discovery rates",
        "Plotting data",
        "Decompose FOR by admission type",
        "Frequencies of admission types amongst false omissions",
        "Plot a diagram",
        "References"
      ],
      "created": "2023-04-20 16:22:34",
      "modified": "2025-04-09 12:40:02",
      "commits": 3
    }
  ],
  "_score": 2.6989700043360187,
  "_indexed": true,
  "_nocasepkg": "sparrafairness",
  "_universes": [
    "jamesliley"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0.0",
      "date": "2026-05-28T14:58:20.000Z",
      "distro": "noble",
      "commit": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
      "fileid": "576f2fa876a0acdcdd4ba8f2769f67a42cbabcb8b996926ecff155ea5dc7ae88",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0.0",
      "date": "2026-05-28T14:57:59.000Z",
      "distro": "noble",
      "commit": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
      "fileid": "0840d1557305e8f97747880715a6d17a5525eb843fb3826428362b35d03596ef",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0.0",
      "date": "2026-05-28T15:22:47.000Z",
      "commit": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
      "fileid": "1ebe3bbcb69305558ba9c066e1ee6ba979328e184e7b14b1a62ea73faa4ebc31",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.0.0",
      "date": "2026-05-28T15:22:20.000Z",
      "commit": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
      "fileid": "8cc587117c7c00e19d65fefb455147196bba5980736277ebcec5421c5849dc6c",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0.0",
      "date": "2026-05-28T14:58:06.000Z",
      "commit": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
      "fileid": "f0e0adc8d65007a755dab73c85db3d45f221f4c914ed2b8a7b70fd280564ea68",
      "status": "success",
      "buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0.0",
      "date": "2026-05-28T14:57:37.000Z",
      "commit": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
      "fileid": "3f00b1ad70dc3ab7791f4d6095d966df96ebb5b24b323280b09c783096260747",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0.0",
      "date": "2026-05-28T14:56:50.000Z",
      "commit": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
      "fileid": "12a993aae4697b594131adca9a50d507bebfa00930ab105ce6116e6d5943c6e4",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.1.0.0",
      "date": "2026-05-28T14:57:27.000Z",
      "commit": "c9bfaa8c38d3402831666768f5c053d79cb4fb6a",
      "fileid": "f1e40f2d8446d767f1a31627d98d07e7f8aa03545c1474e81a3e174d88e9dbae",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/jamesliley/actions/runs/26582027750"
    }
  ]
}