Skip to contents

Construction

Generate a dx object

dx()
Set options for diagnostic analysis
dx_cm()
Create a Confusion Matrix from Predictions and Truth
dx_compare()
Compare Multiple Classification Models

Metrics

Measures of binary classification tasks

dx_accuracy()
Calculate Accuracy
dx_auc()
Calculate Area Under the ROC Curve (AUC)
dx_auc_pr()
Calculate Area Under the Precision-Recall Curve (AUC-PR)
dx_balanced_accuracy()
Calculate Balanced Accuracy
dx_brier()
Calculate Brier Score
dx_cohens_kappa()
Calculate Cohen's Kappa
dx_detection_prevalence()
Calculate Detection Prevalence
dx_f1()
Calculate F1 Score with Confidence Intervals
dx_f2()
Calculate F2 Score with Confidence Intervals
dx_fbeta()
Calculate F-beta Score with Confidence Intervals
dx_fdr()
Calculate False Discovery Rate (FDR)
dx_fowlkes_mallows()
Calculate Fowlkes-Mallows Index
dx_g_mean()
Calculate G-mean
dx_lrt_neg()
Calculate Negative Likelihood Ratio
dx_lrt_pos()
Calculate Positive Likelihood Ratio
dx_markedness()
Calculate Markedness
dx_mcc()
Calculate Matthews Correlation Coefficient (MCC)
dx_nir()
Calculate No Information Rate (NIR)
dx_npv()
Calculate Negative Predictive Value (NPV)
dx_odds_ratio()
Calculate Odds Ratio
dx_prevalence()
Calculate Prevalence
dx_fnr() dx_miss_rate()
Calculate False Negative Rate (FNR)
dx_fpr() dx_fall_out()
Calculate False Positive Rate (FPR)
dx_informedness() dx_youden_j()
Calculate Informedness
dx_ppv() dx_precision()
Calculate Positive Predictive Value (PPV, Precision)
dx_sensitivity() dx_recall() dx_tpr()
Calculate Sensitivity (True Positive Rate, Recall)
dx_specificity() dx_tnr()
Calculate Specificity (True Negative Rate)

Tests

Statistical tests

breslow_day_test()
Breslow-Day Test for Homogeneity of Odds Ratios
dx_chi_square()
Chi-Square Test for Independence in a 2x2 Table
dx_delong()
DeLong's Test for Comparing Two ROC Curves
dx_fishers_exact()
Fisher's Exact Test for Independence in a 2x2 Table
dx_g_test()
G-Test (Log-Likelihood Ratio Test) for Independence in 2x2 Table
dx_mcnemars()
McNemar's Chi-squared Test for Paired Proportions
dx_z_test()
Z-test for Comparing Two Proportions

Figures

Figures summarizing diagnostic statistics

dx_plot_calibration()
Plot Calibration Curve
dx_plot_cap()
Plot Cumulative Accuracy Profile (CAP) Curve
dx_plot_cm()
Plot Confusion Matrix with Metrics
dx_plot_cost()
Plot Cost Curve
dx_plot_decision_curve()
Plot Decision Curve
dx_plot_forest()
Create table with odds ratios displayed graphically
dx_plot_gain()
Plot Gain Chart
dx_plot_ks()
Plot Kolmogorov-Smirnov Curve
dx_plot_lift()
Plot Lift Curve
dx_plot_pr()
Plot Precision-Recall Curve
dx_plot_predictive_value()
Plot Predictive Values Against Prevalence
dx_plot_probabilities()
Plot Predicted Probabilities
dx_plot_roc()
Plot ROC Curve
dx_plot_rocs()
Plot ROC Curves for Multiple Models
dx_plot_thresholds()
Plot Diagnostic Measures across Thresholds
dx_plot_youden_j()
Plot Youden's J Index Curve
dx_edit_cell()
Edit a cell within an object returned from dx_forest

Utilities

Helper functions and S3 methods

as.data.frame(<dx>)
Convert to a data frame
summary(<dx>)
Summary

Data

Test data sets

dx_heart_failure
Heart attack outcomes and predictions