Generate a table of diagnostic measures

dx_forest(
  dx_obj,
  fraction = FALSE,
  breaks = NA,
  limits = NA,
  tick_label_size = 6.5,
  trans = c(NA, "log10"),
  measures = c("AUC", "Sensitivity", "Specificity", "Odds Ratio"),
  return_grid = FALSE,
  filename = NA,
  header_bg = "white",
  header_col = "black",
  body_bg = c("#e6e4e2", "#ffffff"),
  footer_bg = "#b8b6b4",
  footer_col = "black",
  body_or_col = "black",
  footer_or_col = footer_col
)

Arguments

dx_obj

An object of class dx

fraction

Logical. Should the fraction for sensitivity and specificity be shown?

breaks

A numeric vector of breaks to include on axis ticks. If left empty, breaks will be determined using the min and max value from 95% CIs.

limits

Limits for axis ticks. Ticks will be generates using base::breaks. Ignored if breaks are passed.

tick_label_size

Font size for axis labels.

trans

Method to transform the odds ratio by. Currently, only log10 is supported.

measures

Measures to be included in the plot

return_grid

Should a grid object be returned? If FALSE, grid is drawn using grid.draw.

filename

File bane to create on disk. If left NA, no file will be created.

header_bg

Background color of the header

header_col

Color of text in the header

body_bg

Background color of table rows. If values are less than total number of rows, values are repeated.

footer_bg

Background color if the footer row.

footer_col

Color of the footer row.

body_or_col

Color of odds ratios in the table body

footer_or_col

Color of odds ratios in the table footer

Examples


dx_obj <- dx(
  data = dx_heart_failure,
  true_varname = "truth",
  pred_varname = "predicted",
  outcome_label = "Heart Attack",
  threshold_range = c(.1, .2, .3),
  setthreshold = .3,
  grouping_variables = c("AgeGroup", "Sex", "AgeSex")
)
dx_forest(dx_obj)
dx_forest(dx_obj, trans = "log10")