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$warnings | Important notices, warnings, and error messages | ||||
results$interpretation | a html | ||||
results$summary | One-paragraph summary of results in plain language | ||||
results$explanations | Educational guide on agreement analysis | ||||
results$agreementtable | ICC, CCC, and Bland-Altman metrics | ||||
results$correlationtable | Pearson and Spearman correlation coefficients | ||||
results$scatterplot | Scatter plot with line of perfect agreement | ||||
results$blandaltmanplot | Bland-Altman plot showing bias and limits of agreement | ||||
results$multimethod_summary | Summary of multi-method analysis results | ||||
results$correlationmatrix | Correlation matrix for all methods | ||||
results$overall_icc_table | ICC analysis for all methods combined | ||||
results$report_sentences | Pre-formatted sentences for manuscripts and reports | ||||
results$statistical_glossary | Definitions of statistical terms with clinical interpretations | ||||
results$icc_selection_guide | When to use Consistency vs Absolute Agreement |
asDF or as.data.frame. For example:results$agreementtable$asDFas.data.frame(results$agreementtable)
Pathology Agreement Analysis