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$interpretation | a html | ||||
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