Skip to contents

Diagnostic Test Sample Size Calculator

Usage

diagnosticsamplesize(
  study_purpose = "diagnostic",
  target_sensitivity = 0.9,
  target_specificity = 0.9,
  prevalence = 0.1,
  ci_width = 0.1,
  alpha = 0.05,
  nonresponse_rate = 0,
  show_statement = TRUE,
  show_methodology = TRUE,
  show_references = FALSE,
  show_comparison_table = FALSE,
  comparison_prevalences = "0.05, 0.10, 0.20, 0.30, 0.50",
  show_method_comparison = FALSE
)

Arguments

study_purpose

.

target_sensitivity

.

target_specificity

.

prevalence

.

ci_width

.

alpha

.

nonresponse_rate

.

show_statement

.

show_methodology

.

show_references

.

show_comparison_table

.

comparison_prevalences

.

show_method_comparison

.

Value

A results object containing:

results$sample_size_summarya table
results$sample_size_statementa html
results$prevalence_tablea table
results$method_comparisona table
results$methodologya html
results$referencesa html

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$sample_size_summary$asDF

as.data.frame(results$sample_size_summary)