Skip to contents

Usage

pathologyagreement(
  data,
  dep1 = NULL,
  dep2 = NULL,
  additional_methods = list(),
  clinical_preset = "general",
  bootstrap_n = 1000,
  conf_level = 0.95,
  show_plots = TRUE,
  icc_type = "consistency",
  correlation_method = "both",
  missing_data = "listwise",
  show_interpretation = TRUE,
  show_summary = FALSE,
  show_explanations = FALSE
)

Arguments

data

the data as a data frame

dep1

a vector of numbers (the first measurement method)

dep2

a vector of numbers (the second measurement method)

additional_methods

optional additional measurement methods for multi-method analysis (enables 3+ method comparison)

clinical_preset

clinical analysis preset optimized for specific pathology scenarios

bootstrap_n

number of bootstrap replicates for confidence intervals

conf_level

confidence level for intervals (default 0.95 for 95\

show_plotsshow scatter plot and Bland-Altman plot

icc_typetype of intraclass correlation coefficient to calculate

correlation_methodcorrelation method(s) to calculate

missing_datamethod for handling missing values

show_interpretationprovide clinical interpretation of agreement statistics

show_summarygenerate a plain-language summary paragraph suitable for copy-pasting into reports

show_explanationsdisplay educational content explaining when to use this analysis, assumptions, and interpretation

A results object containing:

results$warningsImportant notices, warnings, and error messages
results$interpretationa html
results$summaryOne-paragraph summary of results in plain language
results$explanationsEducational guide on agreement analysis
results$agreementtableICC, CCC, and Bland-Altman metrics
results$correlationtablePearson and Spearman correlation coefficients
results$scatterplotScatter plot with line of perfect agreement
results$blandaltmanplotBland-Altman plot showing bias and limits of agreement
results$multimethod_summarySummary of multi-method analysis results
results$correlationmatrixCorrelation matrix for all methods
results$overall_icc_tableICC analysis for all methods combined
results$report_sentencesPre-formatted sentences for manuscripts and reports
results$statistical_glossaryDefinitions of statistical terms with clinical interpretations
results$icc_selection_guideWhen to use Consistency vs Absolute Agreement
Tables can be converted to data frames with asDF or as.data.frame. For example:results$agreementtable$asDFas.data.frame(results$agreementtable) Pathology Agreement Analysis