compute_fdr_tpr {bayesCureRateModel} | R Documentation |
Compute the achieved FDR and TPR
Description
This help function computes the achieved False Discovery Rate (FDR) and True Positive Rate (TPR). Useful for simulation studies where the ground truth classification of subjects in susceptibles and cured items is known.
Usage
compute_fdr_tpr(true_latent_status, posterior_probs,
myCut = c(0.01, 0.05, 0.1, 0.15))
Arguments
true_latent_status |
a binary vector containing the true latent status: 1 should correspond to the positive instances ("cured") and 0 to the negative ("susceptibles"). |
posterior_probs |
a numeric vector with entries between 0 and 1 containing the scores (posterior probabilities) of being positive ("cured") for each item. |
myCut |
Vector containing the desired nominal FDR levels. |
Value
This function will return for every nominal FDR level the following quantities:
achieved_fdr |
the achieved false discovery rate. |
tpr |
the true positive rate. |
nominal_fdr |
the nominal FDR level. |
Author(s)
Panagiotis Papastamoulis
Examples
set.seed(1)
v1 <- sample(0:1, size = 100, replace=TRUE, prob=c(0.8,0.2) )
v2 <- runif(100)
compute_fdr_tpr(true_latent_status = v1, posterior_probs = v2)
[Package bayesCureRateModel version 1.4 Index]