Learn R Programming

⚠️There's a newer version (0.1.0.0) of this package.Take me there.

SPARRAfairness: an R package implementing functions for assessing differential behaviour of the SPARRA score in demographic groups.

To download and install this package, use

install.packages("SPARRAfairness")
library(SPARRAfairness)

For examples demonstrating use of this package, see vignette SPARRAfairness_vignette.

Copy Link

Version

Install

install.packages('SPARRAfairness')

Monthly Downloads

168

Version

0.0.0.1

License

GPL (>= 3)

Maintainer

James Liley

Last Published

April 20th, 2023

Functions in SPARRAfairness (0.0.0.1)

group_fairness

group_fairness
getroc

getroc() Comprehensive plotting function for receiver-operator characteristic curve. Also calculates AUROC and standard error.
getprc

getprc()
groupmetric_2panel

groupmetric_2panel Draws plots of a group fairness metric with a second panel underneath
integral

integral() Quick form for trapezoidal integration over range of x
getcal

getcal()
drawprop

drawprop
roc_2panel

roc_2panel Draws a ROC curve (with legend) with a second panel underneath showing sensitivity difference.
plot.sparraCAL

Plot function for class sparraCAL
logistic

Logistic
prc_2panel

prc_2panel Draws a PRC curve (with legend) with a second panel underneath showing precision difference.
sim_pop_data

sim_pop_data
plot.sparraROC

Plot function for class sparraROC
plot.sparraPRC

Plot function for class above
plot_decomp

plot_decomp
adjusted_fdr

adjusted_fdr
ab

ab() Shorthand to draw a red x-y line
all_data

All data for fairness measures
dat2mat

dat2mat
cal_2panel

cal_2panel Draws calibration curves (with legend) with a second panel underneath showing predicted differences.
demographic_parity

demographic_parity
drawperson

drawperson
adjusted_for

adjusted_for
counterfactual_yhat

counterfactual_yhat
logit

Logit
decomposition_matrix

Decomposition matrix
phs_colours

phs_colours