adjusted_fdr {SPARRAfairness} | R Documentation |
adjusted_fdr
Description
Estimates false discovery rate P(target=FALSE|score>cutoff,group=g) 'adjusted' for some category.
Usage
adjusted_fdr(
scores,
target,
category,
group1,
group2,
cutoffs = seq(min(scores, na.rm = TRUE), max(scores, na.rm = TRUE), length = 100),
nboot = 100
)
Arguments
scores |
vector of risk scores |
target |
vector of values of target (which risk score aims to predict) |
category |
vector of categories |
group1 |
indices of group 1 |
group2 |
indices of group 2 |
cutoffs |
score cutoffs at which to estimate metric (default 100 evenly-spaced) |
nboot |
number of bootstrap samples for standard error |
Details
Namely, calculates
sum ( P(target=FALSE|score>cutoff,category=c,group=g)P(category=c|score<cutoff) )
where the sum is over categories c.
Value
matrix of dimension length(cutoffs)x4, with (i,2g-1)th entry the relevant fairness metric for group g at the ith cutoff value and (i,2g)th entry the approximate standard error of the (i,2g-1)th entry
Examples
# See vignette
[Package SPARRAfairness version 0.0.0.1 Index]