Description Usage Arguments Value
Functions to retrieve true positives, prevalence, ...
Structure: Suppose you designed a test to predict if a person lied. Your tibble might look like this:
| | test_result | person_lied | comment | |—|————-|————-|——————-| | 1 | pos | yes | <- true positive | | 2 | pos | no | <- false positive | | 3 | neg | no | <- true negative | | 4 | pos | yes | ... | | 5 | neg | no | ... |
Your predicted condition (pred_cond
) would be test_result
and the
targeted condition (pred_cond_targ
) would be pos
. The actual condition
(act_cond
) would be person_lied
with targeted condition
(act_cond_targ
) yes
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | test_get_sensitivity(data, pred_cond, act_cond, pred_cond_targ = TRUE,
act_cond_targ = TRUE, prevalence = NULL, confusion_matrix = NULL)
test_get_specificity(data, pred_cond, act_cond, pred_cond_targ = TRUE,
act_cond_targ = TRUE, prevalence = NULL, confusion_matrix = NULL)
test_get_prevalence(data, pred_cond, act_cond, pred_cond_targ = TRUE,
act_cond_targ = TRUE, prevalence = NULL, confusion_matrix = NULL)
test_get_positive_predictive_value(data, pred_cond, act_cond,
pred_cond_targ = TRUE, act_cond_targ = TRUE, prevalence = NULL,
confusion_matrix = NULL)
test_get_negative_predictive_value(data, pred_cond, act_cond,
pred_cond_targ = TRUE, act_cond_targ = TRUE, prevalence = NULL,
confusion_matrix = NULL)
test_get_metrics(data, pred_cond, act_cond, pred_cond_targ = TRUE,
act_cond_targ = TRUE, prevalence = NULL, confusion_matrix = NULL)
test_get_relation(data, pred_cond, act_cond, pred_cond_targ = TRUE,
act_cond_targ = TRUE, alpha = eenv_alpha,
haldane_anscombe_correction = TRUE)
|
data |
A tibble holding the data |
pred_cond |
The column holding the predicted conditions / test results. |
act_cond |
The column holding the true conditions. |
pred_cond_targ |
The value that signifies the targeted predicted condition. |
act_cond_targ |
The value that signifies the targeted true condition. |
prevalence |
The prevalence in the reference population. |
confusion_matrix |
The confusion matrix as returned by
|
alpha |
The alpha level. |
haldane_anscombe_correction |
Apply Haldane Anscombe correction if necessary. |
variable
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.