Skip to contents

Usage

pathologyagreement(
  data,
  dep1,
  dep2,
  additional_methods,
  clinical_preset = "general",
  bootstrap_n = 1000,
  conf_level = 0.95,
  show_plots = TRUE,
  icc_type = "consistency",
  correlation_method = "both",
  show_interpretation = TRUE
)

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

show_interpretationprovide clinical interpretation of agreement statistics

A results object containing:

results$interpretationa html
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