view_table: Test vs Disease/Gold Standard cross-classification table

View source: R/PVBcorrect_functions.R

view_tableR Documentation

Test vs Disease/Gold Standard cross-classification table

Description

View Test vs Disease/Gold Standard cross-classification table.

Usage

view_table(data, test, disease, show_unverified = FALSE, show_total = FALSE)

Arguments

data

A data frame, with at least "Test" and "Disease" variables.

test

The "Test" variable name, i.e. the test result. The variable must be in binary; positive = 1, negative = 0 format.

disease

The "Disease" variable name, i.e. the true disease status. The variable must be in binary; positive = 1, negative = 0 format.

show_unverified

Optional. Set to TRUE to view observations with unverified disease status. The default is FALSE.

show_total

Optional. Set to TRUE to view total by test result. The default is FALSE.

Value

A cross-clasification table.

Examples

str(cad_pvb)  # built-in data

view_table(data = cad_pvb, test = "T", disease = "D")  # without unverified observations
view_table(data = cad_pvb, test = "T", disease = "D", show_total = TRUE)
  # also with total observations by test result

view_table(data = cad_pvb, test = "T", disease = "D", show_unverified = TRUE)
  # with unverified observations
view_table(data = cad_pvb, test = "T", disease = "D", show_unverified = TRUE,
           show_total = TRUE)  # also with total observations by test result

wnarifin/PVBcorrect documentation built on May 12, 2024, 4:13 p.m.