Agreement between two or more raters who scored the same cases. Cohen's kappa for two raters (unweighted, or linear or quadratic weighted for ordinal grades) with a confidence interval, and Fleiss' or Conger's exact kappa for three or more; optional Krippendorff's alpha, Gwet's AC, PABAK, ICC, Lin's concordance, Bland-Altman limits, marginal homogeneity tests, per-rater and per-subgroup agreement, rater and case clustering, consensus and agreement-level variables, and sample size for an agreement study.
Usage
agreement(
data,
vars = NULL,
baConfidenceLevel = 0.95,
confLevel = 0.95,
kappaCIMethod = "wald",
proportionalBias = FALSE,
showBlandAltmanGuide = FALSE,
blandAltmanPlot = FALSE,
agreementHeatmap = FALSE,
heatmapColorScheme = "bluered",
heatmapShowPercentages = TRUE,
heatmapShowCounts = TRUE,
heatmapAnnotationSize = 3.5,
showAgreementHeatmapGuide = FALSE,
sft = FALSE,
wght = "unweighted",
exct = FALSE,
showLevelInfo = FALSE,
gradingDesign = FALSE,
perPathologist = FALSE,
severityModel = FALSE,
latentModel = FALSE,
showGradingGuide = FALSE,
kripp = FALSE,
krippMethod = "nominal",
bootstrap = FALSE,
showKrippGuide = FALSE,
gwet = FALSE,
gwetWeights = "unweighted",
showGwetGuide = FALSE,
pabak = FALSE,
showPABAKGuide = FALSE,
icc = FALSE,
showICCGuide = FALSE,
iccType = "icc21",
meanPearson = FALSE,
showMeanPearsonGuide = FALSE,
linCCC = FALSE,
showLinCCCGuide = FALSE,
tdi = FALSE,
tdiCoverage = 90,
tdiLimit = 10,
showTDIGuide = FALSE,
iota = FALSE,
iotaStandardize = TRUE,
showIotaGuide = FALSE,
finn = FALSE,
finnLevels = 3,
finnModel = "oneway",
showFinnGuide = FALSE,
lightKappa = FALSE,
showLightKappaGuide = FALSE,
kendallW = FALSE,
showKendallWGuide = FALSE,
robinsonA = FALSE,
showRobinsonAGuide = FALSE,
meanSpearman = FALSE,
showMeanSpearmanGuide = FALSE,
raterBias = FALSE,
showRaterBiasGuide = FALSE,
bhapkar = FALSE,
showBhapkarGuide = FALSE,
stuartMaxwell = FALSE,
showStuartMaxwellGuide = FALSE,
maxwellRE = FALSE,
showMaxwellREGuide = FALSE,
interIntraRater = FALSE,
interIntraSeparator = "_",
showInterIntraRaterGuide = FALSE,
pairwiseKappa = FALSE,
referenceRater = NULL,
rankRaters = FALSE,
showPairwiseKappaGuide = FALSE,
allPairsKappa = FALSE,
allPairsCI = TRUE,
showAllPairsKappaGuide = FALSE,
itemModalCategoryAgreement = FALSE,
showItemModalGuide = FALSE,
hierarchicalKappa = FALSE,
clusterVariable = NULL,
iccHierarchical = FALSE,
clusterSpecificKappa = TRUE,
varianceDecomposition = TRUE,
testClusterHomogeneity = TRUE,
clusterRankings = FALSE,
showHierarchicalGuide = FALSE,
conditionVariable = NULL,
caseIdVariable = NULL,
mixedEffectsComparison = FALSE,
multipleTestCorrection = "none",
showMixedEffectsGuide = FALSE,
confusionMatrix = FALSE,
confusionNormalize = "none",
showConfusionMatrixGuide = FALSE,
bootstrapCI = FALSE,
nBoot = 1000,
showBootstrapCIGuide = FALSE,
multiAnnotatorConcordance = FALSE,
predictionRater = NULL,
showConcordanceF1Guide = FALSE,
specificAgreement = FALSE,
specificPositiveCategory = "",
specificAllCategories = TRUE,
specificConfidenceIntervals = TRUE,
showSpecificAgreementGuide = FALSE,
showSummary = FALSE,
showAbout = FALSE,
consensusName = "consensus_rating",
consensusRule = "majority",
tieBreaker = "exclude",
loaVariable = FALSE,
detailLevel = "detailed",
simpleThreshold = 50,
loaThresholds = "custom",
loaHighThreshold = 75,
loaLowThreshold = 56,
loaVariableName = "agreement_level",
showLoaTable = TRUE,
raterProfiles = FALSE,
raterProfileType = "boxplot",
raterProfileShowPoints = FALSE,
showRaterProfileGuide = FALSE,
agreementBySubgroup = FALSE,
subgroupVariable = NULL,
subgroupForestPlot = TRUE,
subgroupMinCases = 10,
showSubgroupGuide = FALSE,
raterClustering = FALSE,
clusterMethod = "hierarchical",
clusterDistance = "ccc",
clusterLinkage = "average",
nClusters = 3,
showDendrogram = TRUE,
showClusterHeatmap = TRUE,
showRaterClusterGuide = FALSE,
caseClustering = FALSE,
caseClusterMethod = "hierarchical",
caseClusterDistance = "euclidean",
caseClusterLinkage = "average",
nCaseClusters = 3,
showCaseDendrogram = TRUE,
showCaseClusterHeatmap = TRUE,
showCaseClusterGuide = FALSE,
pairedAgreementTest = FALSE,
conditionBVars = NULL,
pairedBootN = 2000,
showPairedAgreementGuide = FALSE,
agreementSampleSize = FALSE,
ssMetric = "kappa",
ssKappaNull = 0.4,
ssKappaAlt = 0.7,
ssNRaters = 2,
ssNCategories = 4,
ssAlpha = 0.05,
ssPower = 0.8,
showSampleSizeGuide = FALSE,
seed = 42,
specificCIMethod = "legacy",
specificCluster = NULL
)Arguments
- data
The data as a data frame in WIDE format: one row per case and one column per rater or method, holding that rater's score for that case. (Not long format - do not stack the raters into a single column.)
- vars
The variables in
dataholding the ratings, one per rater or method. Each selected variable is one rater's column of scores across the cases.- baConfidenceLevel
Proportion of differences the Bland-Altman limits of agreement are meant to contain, conventionally 0.95, giving mean difference +/- 1.96 SD. This is a coverage proportion for future differences, NOT a confidence level for the limits: raising it moves the limits outward rather than widening an interval around fixed limits.
- confLevel
Confidence level for confidence intervals in ICC, CCC, bootstrap CIs, and other agreement statistics. Default is 0.95 (95 percent CI).
- kappaCIMethod
Scale on which the confidence interval for Cohen's kappa is built. Wald is kappa plus or minus z times the non-null asymptotic standard error, clamped to the range minus one to one; it is symmetric and reproduces the limits printed by psych::cohen.kappa. Fisher z applies the arc-tangent transform, builds the interval on that scale with the delta-method standard error, and transforms back; the limits are asymmetric and cannot fall outside the range minus one to one. In simulation the Wald interval covered the true kappa about 85 to 95 percent of the time between 20 and 100 cases, while the Fisher z interval held close to its nominal level at every sample size when kappa was moderate and the categories balanced, but under-covered when one category was rare (about 88 percent at 20 to 30 cases with a 10 percent positive rate) and when kappa was very high (88 to 93 percent up to 50 cases). The setting applies to every table that builds a Cohen's kappa interval from the asymptotic standard error: the main table with two raters, All-Pairs Kappa, Agreement by Subgroup and the inter/intra-rater tables. Bootstrap intervals are not affected.
- proportionalBias
Fit an exploratory ordinary least-squares trend of the paired difference against the pair mean. The p-value tests whether that slope is zero; it is not, by itself, a valid general test of proportional bias because unequal method precision can create a slope even when neither method has magnitude-dependent bias. Confirm an apparent trend with replicated measurements or an errors-in-variables model before calling it proportional bias.
- showBlandAltmanGuide
Show educational guide explaining Bland-Altman limits of agreement for method comparison studies.
- blandAltmanPlot
Generate Bland-Altman plot for continuous agreement analysis. Displays the mean difference and limits of agreement between two raters; it needs exactly two rater variables. Only applicable when raters provide continuous measurements (e.g., tumor size in mm).
- agreementHeatmap
Generate heatmap visualization of agreement patterns for categorical data. Creates confusion matrices showing how each rater pair's classifications correspond. Color-coded cells reveal agreement (diagonal) and specific disagreement patterns (off-diagonal). Essential for identifying systematic biases, problematic categories, and training needs. Shows where raters agree strongly, where they consistently disagree, and which category confusions are most common. Particularly valuable for multi-category classifications with complex disagreement patterns.
- heatmapColorScheme
Color palette for the heatmap. Every scheme shows the share of all cases in a cell on a fixed 0 to 100 percent scale, so color means frequency, on or off the diagonal, not agreement. Blue-White-Red: blue for empty or rare cells, white at half of all cases, red above half. Traffic light: red for few cases through green for many, so a crowded off-diagonal cell is green too. Viridis is perceptually uniform and colorblind-safe (dark purple few, yellow many). Grayscale for black-and-white printing (light few, dark many).
- heatmapShowPercentages
Display percentage values within heatmap cells (percentage of total cases). Helps interpret relative frequency of each rater combination. Essential when comparing heatmaps with different sample sizes.
- heatmapShowCounts
Display absolute counts within heatmap cells (number of cases). Shows actual sample sizes for each cell. Useful for identifying cells with insufficient data and assessing statistical reliability.
- heatmapAnnotationSize
Text size for cell annotations (counts and percentages). Adjust for readability with different numbers of categories. Larger for few categories, smaller for many categories.
- showAgreementHeatmapGuide
Show educational guide and clinical use cases for Agreement Heatmap before running analysis.
- sft
Display frequency tables showing the distribution of ratings for each rater. Useful for understanding rating patterns and identifying potential biases.
- wght
For ordinal variables (e.g., tumor grade G1/G2/G3), weighted kappa accounts for degree of disagreement. Linear weights: Adjacent disagreements (G1 vs G2) receive partial credit. Squared weights: Larger disagreements (G1 vs G3) are penalized more heavily. Use 'Unweighted' for nominal categories with no inherent order.
- exct
Report Conger's (1980) exact kappa instead of Fleiss' kappa for 3 or more raters. Its chance-agreement term uses each rater's own category proportions, so the coefficient differs from Fleiss' kappa. Inference uses Gwet's (2014) linearized variance across all observed ratings. Not applicable with 2 raters.
- showLevelInfo
Display information about how categorical levels are currently ordered in your variables. Essential for weighted kappa analysis to ensure ordinal levels are properly ordered (e.g., G1 → G2 → G3 for tumor grades).
- gradingDesign
Show the reading design (cases, pathologists, ratings per case and per pathologist, whether every pathologist is linked through shared cases) and the distribution of categories used by each pathologist. Every observed rating is used; incomplete cases are not dropped.
- perPathologist
For each pathologist, the exact agreement with colleagues who read the same cases, the mean pairwise Cohen kappa, and the boundary table showing how much more often this pathologist calls a case at or above each grade than the colleagues who read the same cases.
- severityModel
Cumulative-probit mixed model with a random case effect and one fixed effect per pathologist (ordinal package). Each pathologist's grading tendency is shown relative to the panel average, with a Holm-adjusted p-value and a plot. Ordinal ratings only.
- latentModel
Cumulative-probit mixed model with crossed random effects for case and pathologist (Nelson and Edwards 2015). Reports the case, pathologist and (when a cluster variable is set) institution variances, the latent ICC(2,1) and the Nelson-Edwards model-based kappa. Ordinal ratings only; the table refuses designs too small for the estimates to be trusted.
- showGradingGuide
Show a plain-language guide to the pathologist grading tables: what each one answers, when to use which, and the design limits.
- kripp
Alternative reliability measure that handles missing data and supports various data types. Useful when raters didn't rate all cases or when comparing different measurement levels.
- krippMethod
Specifies the measurement level for Krippendorff's alpha calculation.
- bootstrap
Calculate bootstrap confidence intervals for Krippendorff's alpha.
- showKrippGuide
Show educational guide explaining when to use Krippendorff's Alpha including handling missing data and data type selection.
- gwet
Alternative agreement coefficient that is more stable than Cohen's kappa when dealing with high agreement rates or unbalanced marginal distributions (e.g., rare tumor subtypes). Gwet's AC corrects for the paradoxical behavior of kappa in extreme cases.
- gwetWeights
Unweighted (AC1) for nominal categories. Linear or Quadratic weights (AC2) for ordinal data.
- showGwetGuide
Show educational guide explaining when Gwet's AC is preferred over Cohen's kappa, especially for high agreement rates.
- pabak
Prevalence-Adjusted Bias-Adjusted Kappa (PABAK) corrects Cohen's kappa for the effects of prevalence and bias. Also reports the prevalence index (PI) and bias index (BI). Useful when kappa is paradoxically low despite high agreement (Byrt et al. 1993). Requires exactly 2 raters with categorical data.
- showPABAKGuide
Show educational guide explaining PABAK, the kappa paradox, and when prevalence/bias adjustment is needed.
- icc
Intraclass Correlation Coefficient for continuous measurements (e.g., tumor size in mm, biomarker concentrations). Standard measure for assessing agreement with numeric data. Complements Bland-Altman analysis.
- showICCGuide
Show educational guide explaining when and how to use the Intraclass Correlation Coefficient, including ICC model selection, interpretation thresholds, and clinical examples.
- iccType
ICC model selection. One-way: each subject rated by different raters. Two-way: all subjects rated by same raters. Random: raters are random sample. Mixed: raters are fixed. Single: reliability of individual rater. Average (k): reliability of mean rating.
- meanPearson
Mean Pearson Correlation calculates the average linear correlation coefficient across all rater pairs for continuous measurements. Pearson's r measures linear association between variables, ranging from -1 (perfect negative) to +1 (perfect positive correlation). For interrater agreement, high positive correlations indicate raters' measurements vary together linearly. Particularly useful for continuous scales (tumor size, biomarker levels, quantitative scores), assumes linear relationship and normality. Complements ICC by focusing on correlation rather than absolute agreement. Simple, interpretable measure for assessing whether raters rank and scale measurements similarly.
- showMeanPearsonGuide
Show educational guide and clinical use cases for Mean Pearson Correlation before running analysis.
- linCCC
Lin's Concordance Correlation Coefficient (CCC) measures both precision and accuracy for continuous data, making it superior to Pearson's r for method comparison and agreement studies. CCC ranges from -1 to +1 (perfect concordance) and equals the product of Pearson's r (precision) and a bias correction factor (accuracy). Unlike Pearson's r which only measures linear association, CCC penalizes systematic bias. Essential for method comparison (manual vs. automated), instrument validation, and assessing measurement agreement. Requires 2 raters/methods for pairwise comparison; calculates all pairwise CCCs for 3+ raters.
- showLinCCCGuide
Show educational guide and clinical use cases for Lin's Concordance Correlation Coefficient before running analysis.
- tdi
Total Deviation Index (TDI): the boundary within which the requested proportion of absolute differences between two measurement methods fall. Computed here as the empirical quantile of the absolute differences, with a distribution-free order-statistic confidence interval; a finite upper limit needs at least 36 pairs at 90 percent coverage and a 95 percent confidence level, and more at higher settings. It is a single number summarizing how far apart the two methods get, and it is useful alongside Bland-Altman when the differences are not normal. Note the scope: this estimator is unconditional, so it does NOT model variability as a function of magnitude and does not adjust for the case mix of the sample - a different spread of values gives a different TDI for the same two methods. Use it as a descriptive summary of the observed comparison, not on its own as a demonstration of equivalence or of regulatory acceptability, which require a prespecified design and acceptance criterion. Requires 2 raters/methods.
- tdiCoverage
Quantile of the observed absolute differences to report (default: 90 percent). Common descriptive targets are 90 or 95 percent. This is an unconditional empirical target for the sampled case mix, not a prediction guarantee for future measurements.
- tdiLimit
Maximum acceptable difference between methods in original units. Example: For tumor size, 5mm might be clinically acceptable. Compare the empirical TDI and the upper limit of its interval with this prespecified descriptive limit. Passing it does not, by itself, establish method equivalence.
- showTDIGuide
Show educational guide and clinical use cases for Total Deviation Index before running analysis.
- iota
Iota coefficient (Janson & Olsson, 2001) for the selected rater columns, computed as ONE variable rated by all of them. Supports quantitative (continuous) and nominal (categorical) ratings. For nominal ratings it is numerically identical to Conger's exact kappa, which the 'Exact kappa (3+ raters)' option also reports. The multivariate form of iota - several variables scored by the same raters, summarized in one coefficient - is NOT computed by this analysis, because no option here can say which columns belong to which variable; enter the rater columns of one variable at a time.
- iotaStandardize
Z-standardize the quantitative ratings before computing Iota. Standardization exists to equalise the contribution of several variables to a multivariate iota. This analysis computes iota for a single variable, where standardizing is an affine rescaling that leaves the coefficient unchanged, so this setting has no effect on the reported value.
- showIotaGuide
Show the educational guide explaining the Iota coefficient, what this analysis computes with it, and when to prefer kappa or ICC instead.
- finn
Finn coefficient for interrater reliability of categorical data. Variance-based agreement measure especially useful when variance between raters is low (i.e., agreement is high). Alternative to traditional kappa-based measures. Works with ordered categorical ratings.
- finnLevels
The number of categories on the rating scale, used by the Finn coefficient as its chance baseline (the variance of a uniform rating on an s-point scale), so it changes the value and can change its sign. When the rater variables are nominal or ordinal this is read from their declared levels instead and a note reports any disagreement; this option is only consulted for numeric ratings, where the scale cannot be recovered from the data. Count every category on the scale, including any that no case happened to receive.
- finnModel
Model specification for Finn coefficient. One-way: only subjects are random effects (each subject may be rated by different raters). Two-way: both subjects and raters are random (subjects and raters randomly chosen from larger populations).
- showFinnGuide
Show educational guide explaining the Finn coefficient and variance-based agreement measurement.
- lightKappa
Alternative agreement measure for 3 or more raters. Calculates the average of all pairwise kappas between raters. More robust than Fleiss' kappa when raters have different marginal distributions or when assumptions of Fleiss' kappa are questionable.
- showLightKappaGuide
Show educational guide explaining when Light's Kappa is preferred for 3+ rater studies.
- kendallW
Kendall's coefficient of concordance (W) measures agreement among raters when rating or ranking ordinal data. W ranges from 0 to 1 (perfect agreement); raters who agree no better than chance score about 1/m. Particularly useful for ranked data, severity scores, and ordinal grading systems where you want to know if raters rank cases in similar order.
- showKendallWGuide
Show educational guide explaining Kendall's W for ordinal concordance and ranking agreement.
- robinsonA
Robinson's A (1957) is an agreement coefficient for ordinal or numeric ratings: 1 minus the within-case variance divided by the total variance. It reaches 1 at perfect agreement; raters who agree no better than chance score about 1/m (0.5 for two raters), so the label is read from the chance-corrected value (mA - 1)/(m - 1). Alternative to weighted kappa that penalises systematic offsets between raters, not only disagreement in order. Particularly useful when ordinal categories have meaningful rank order (e.g., disease severity stages, tumor grades). Less affected by marginal distribution imbalances than kappa-based measures.
- showRobinsonAGuide
Show educational guide and clinical use cases for Robinson's A before running analysis.
- meanSpearman
Mean Spearman Rho calculates the average rank correlation across all rater pairs. Spearman's rho is a nonparametric measure of monotonic association for ordinal data. It ranges from -1 (perfect negative association) to +1 (perfect positive association), with 0 indicating no association. When used for interrater agreement, high positive values indicate raters rank cases similarly. Particularly useful for ordinal scales, rankings, and severity ratings. Robust to outliers and does not assume linear relationship. Complements other ordinal measures (Robinson's A, Kendall's W) by focusing on rank-order correlation rather than exact concordance.
- showMeanSpearmanGuide
Show educational guide and clinical use cases for Mean Spearman Rho before running analysis.
- raterBias
Tests whether the disagreements between two raters run in one direction more often than the other, i.e. whether one rater is consistently the higher scorer on the cases where they differ. A single chi-square on 1 degree of freedom comparing the total counts above and below the diagonal of the two-rater table (
irr::rater.bias). Requires exactly 2 raters and both variables must be declared Ordinal, because "higher" is otherwise undefined. This is NOT a test of marginal homogeneity: opposing shifts in different categories cancel out and it returns p = 1 even when the two raters use the categories at quite different rates. UsebhapkarorstuartMaxwellfor that hypothesis.- showRaterBiasGuide
Show an educational guide to the two-rater ordinal directional discordance test, including its distinction from marginal homogeneity.
- bhapkar
Bhapkar test for marginal homogeneity between two raters with multiple categories. More powerful alternative to Stuart-Maxwell test. Like McNemar's test but for >2 categories. Tests if two raters use rating categories with equal frequency. Essential for paired comparisons (e.g., pre-post training, novice vs. expert, pathologist vs. AI algorithm) to detect systematic differences in category usage.
- showBhapkarGuide
Show educational guide for the Bhapkar test of marginal homogeneity.
- stuartMaxwell
Stuart-Maxwell test for marginal homogeneity between two raters with multiple categories. Classic test for matched data analysis. Like McNemar's test but for >2 categories. Tests if two raters use rating categories with equal frequency. Note: Bhapkar test is more powerful for large samples, but Stuart-Maxwell is the traditional choice. Use for paired/matched comparisons to detect systematic category usage differences.
- showStuartMaxwellGuide
Show educational guide for the Stuart-Maxwell test of marginal homogeneity.
- maxwellRE
A two-way (case + rater) variance decomposition splits rater disagreement into a systematic (rater offset) and a random (residual) component; the between-case variance is reported separately. The random share is the proportion of disagreement attributable to random measurement error rather than systematic differences between raters or methods. Values range from 0 (all error is systematic) to 1 (all error is random). Essential for understanding error sources in method comparison studies, diagnostic test validation, and measurement reliability assessment. Typically used with continuous or ordinal data requiring 2+ raters/methods.
- showMaxwellREGuide
Show the guide to the rater variance decomposition before running analysis.
- interIntraRater
Simultaneous assessment of inter-rater and intra-rater reliability for test-retest studies. Calculates intra-rater reliability (same rater consistency across time) and inter-rater reliability (agreement between different raters). Requires paired columns representing the same rater at different time points (e.g., Rater1_Time1, Rater1_Time2). Essential for training evaluation, fatigue studies, and long-term reliability assessment. Reports both within-rater consistency and between-rater agreement.
- interIntraSeparator
Character separating rater ID from time point in column names (default: underscore). Example: With separator "", columns named "Rater1_T1" and "Rater1_T2" are recognized as the same rater at two time points. Common patterns: underscore (), dot (.), dash (-).
- showInterIntraRaterGuide
Show educational guide and clinical use cases for Inter/Intra-Rater Reliability before running analysis.
- pairwiseKappa
Compare each rater individually against a reference rater (e.g., gold standard, consensus score, senior pathologist). Produces individual kappa values for each rater-vs-reference comparison. Essential for training assessment, rater certification, and performance monitoring.
- referenceRater
Select the reference rater variable (e.g., consensus score, gold standard diagnosis, senior pathologist ratings). Each rater in the main variable list will be compared pairwise with this reference using Cohen's kappa.
- rankRaters
Rank raters from highest to lowest kappa (relative to reference). Shows best and worst performing raters for quality control and training needs. Useful for identifying raters who need additional training or those ready for certification.
- showPairwiseKappaGuide
Show educational guide for pairwise kappa analysis against a reference rater.
- allPairsKappa
For studies with 3+ raters, compute Cohen's kappa, observed agreement, standard error, a confidence interval at the chosen confidence level, z, and p-value for every rater pair (C(k,2) rows). Reproduces the conventional pairwise agreement table reported in interobserver reliability studies. Honors the 'wght' (weights) and 'multipleTestCorrection' options.
- allPairsCI
Show the confidence interval columns of the All-Pairs Kappa table. Each interval is built at the chosen confidence level from the non-null asymptotic standard error (vcd::Kappa), on the scale set by 'Kappa interval method'. When vcd::Kappa cannot return a finite standard error for a pair, that row falls back to the irr::kappa2 null-hypothesis standard error and a footnote says so.
- showAllPairsKappaGuide
Show educational guide for all-pairs kappa: when to report the full pairwise table versus average (Light's) or overall (Fleiss') kappa.
- itemModalCategoryAgreement
For each rating category, compute the mean within-case agreement rate across raters on cases whose modal rating equals that category. Identifies which categories drive disagreement (e.g., YSRB Category IV "suspicious" is a known agreement bottleneck in breast cytology). Cases with no unique mode (ties) are excluded.
- showItemModalGuide
Show educational guide for per-category item-modal agreement.
- hierarchicalKappa
Agreement for multi-center designs in which every case belongs to one cluster (institution, center or scanner) and the same raters score the cases. Categorical ratings get cluster-specific kappa and a stratified kappa (the cluster kappas weighted by cluster size, Barlow, Lai and Azen 1991) shown beside the pooled kappa. Continuous ratings get the within-cluster ICC(2,1) and ICC(2,k) from a linear mixed model. For categorical ratings the case, pathologist and institution variances come from the model-based agreement of the pathologist grading analysis (an ordinal mixed model), not from this section.
- clusterVariable
Variable giving the cluster (for example hospital, institution or scanner ID) that each case belongs to. Each case must belong to exactly one cluster; the same raters may score cases from every cluster. Used by the hierarchical kappa and, when set, by the model-based agreement of the pathologist grading analysis, which then adds an institution variance to the latent model.
- iccHierarchical
Intraclass correlations for the hierarchical design, estimated within cluster: ICC(2,1), the absolute-agreement reliability of a single rater, and ICC(2,k), that of the mean of the raters, from a linear mixed model. Continuous ratings only; for categorical ratings the latent ICC is reported by the model-based agreement of the pathologist grading analysis.
- clusterSpecificKappa
Agreement within each cluster separately, to see whether it is similar across sites: Cohen's or Fleiss' kappa for categorical ratings, the ICC for continuous ratings. Useful for quality control in multi-center studies.
- varianceDecomposition
Share of the rating variance due to cases, raters, clusters and residual error, from a linear mixed model. Continuous ratings only; for categorical ratings the variances are estimated by the model-based agreement of the pathologist grading analysis.
- testClusterHomogeneity
Likelihood ratio test for the institution (cluster) random effect: the linear mixed model for continuous ratings fitted with and without an institution term. It tests whether the cases' mean scores differ between institutions (case mix or site-level scoring, which this design cannot separate), not whether agreement (kappa or ICC) differs between them; read the cluster-specific estimates for that. The p-value is boundary-corrected, half the usual chi-square value, because a variance cannot be negative (Stram and Lee, 1994).
- clusterRankings
Rank clusters by their cluster-specific agreement. Read each rank beside that cluster's confidence interval: with small clusters, neighbouring ranks are rarely distinguishable, and ranking sites of very different size invites unfair comparison.
- showHierarchicalGuide
Show educational guide for hierarchical/multilevel kappa in multi-center studies.
- conditionVariable
Variable distinguishing measurement conditions (e.g., AI-assisted vs. conventional, pre-training vs. post-training). Enables mixed-effects comparison that accounts for rater and case random effects. Each data row is treated as a separate case unless a case ID variable is given.
- caseIdVariable
Identifies the case on each row of the mixed-effects condition comparison. Give it when the same case was measured under each condition on separate rows: rows sharing an ID are then one case in the model (a random intercept per case), so the conditions are compared within case. Without it every row is a separate case and the comparison is between cases.
- mixedEffectsComparison
Fit a linear mixed model to compare measurement conditions while accounting for rater and case random effects. Model: score ~ condition + (1|rater) + (1|case). Provides condition effect estimate with CI, variance components, and ICC. Give a case ID variable when a case was measured under each condition on separate rows; without it each row is one case and the comparison is between cases.
- multipleTestCorrection
Correction for multiple comparisons, applied to the pairwise p-values of the All-Pairs Kappa table and to the fixed-effect p-values of the Mixed-Effects Condition Comparison.
- showMixedEffectsGuide
Show educational guide for mixed-effects condition comparison in AI validation studies.
- confusionMatrix
Display a formal N×N confusion matrix comparing first two raters (or reference vs predicted). Includes row/column normalization options and per-class precision, recall, and F1 scores. Essential for multi-category classification studies (e.g., HER2 0/1+/2+/3+ scoring).
- confusionNormalize
How to normalize the confusion matrix. None shows raw counts. Row-normalized shows proportions within each reference category (equivalent to recall/sensitivity per class). Column-normalized shows proportions within each predicted category (equivalent to precision/PPV per class).
- showConfusionMatrixGuide
Show educational guide for multi-class confusion matrix interpretation and per-class metrics.
- bootstrapCI
Calculate bootstrap confidence intervals for agreement metrics (kappa, Fleiss kappa, Krippendorff alpha, ICC, percent agreement). Uses case resampling with BCa (bias-corrected and accelerated) method. Recommended when analytical CIs are unavailable or when distributions may be non-normal (e.g., skewed kappa distributions with few categories).
- nBoot
Number of bootstrap resamples for confidence interval estimation. 1000 is adequate for 95 percent CIs. Use 5000-10000 for publication-quality 99 percent CIs or when metrics are near boundary values (0 or 1).
- showBootstrapCIGuide
Show educational guide for bootstrap confidence intervals and when they are preferred over analytical CIs.
- multiAnnotatorConcordance
Compute concordance metrics where a prediction is considered correct if it matches ANY of the reference annotators. Useful for AI validation studies where multiple pathologists annotate the same cases and no single ground truth exists (e.g., Ottl et al. 2025 HER2 scoring). Reports concordance accuracy, per-class concordance F1, and comparison to strict consensus-based evaluation.
- predictionRater
The rater column whose ratings are the predictions to evaluate, for example the AI model's calls. It must also be one of the raters; the other raters are the reference annotators.
- showConcordanceF1Guide
Show educational guide for concordance metrics in AI validation with multiple reference annotators.
- specificAgreement
Calculate category-specific agreement indices for binary or multi-category data. For binary data: Positive Specific Agreement (PSA) and Negative Specific Agreement (NSA). For multi-category data: Agreement indices for each category separately. Essential when some categories are more clinically important than others (e.g., cancer diagnosis, adverse events, critical findings). Unlike overall kappa which treats all disagreements equally, specific agreement focuses on agreement within each category, revealing which categories have reliable agreement and which need attention.
- specificPositiveCategory
For binary specific agreement: Specify which category should be treated as "positive" (e.g., "Cancer", "Malignant", "Present", "Yes", "1"). Leave blank to calculate specific agreement for all categories. Required for PSA/NSA interpretation. Example: If categories are "Benign" and "Malignant", enter "Malignant".
- specificAllCategories
Calculate specific agreement for each category separately (recommended). When enabled, provides agreement indices for every category in your data, identifying which specific diagnoses/classifications have strong agreement and which may need improved training or criteria clarification.
- specificConfidenceIntervals
Calculate confidence intervals at the chosen confidence level for specific agreement indices using the selected method. Bootstrap resamples complete paired observations or clusters; the legacy Wilson option remains explicitly approximate.
- showSpecificAgreementGuide
Show educational guide and clinical use cases for Specific Agreement Indices before running analysis.
- showSummary
Display a natural-language interpretation of results with the Landis and Koch agreement level and clinical guidance. Recommended for reports and presentations.
- showAbout
Display an explanatory panel describing what this analysis does, when to use it, and how to interpret results.
- consensusName
Name of the new computed variable containing consensus ratings. Will be added to the dataset and available for downstream analyses.
- consensusRule
Rule for defining consensus. Simple majority = modal category with >50 percent of votes. Supermajority requires >=75 percent agreement. Unanimous requires 100 percent agreement. Cases not meeting threshold are set to NA in consensus variable.
- tieBreaker
How to break a tie between equally frequent categories (e.g., a 2-2 split with 4 raters) in the modal rating of Case Agreement and in the reference label of the multi-annotator concordance. Lowest and highest are read on the declared category order. It does not change the consensus variable: a majority, a supermajority or unanimity cannot tie, so a split case gets no consensus label under any setting. Exclude = leave tied cases without a label. First = use first category that appears. Lowest/Highest = use min/max of tied categories.
- loaVariable
Calculate the agreement level for each case. Choose between Simple (3 categories) or Detailed (5 categories) classification. Useful for identifying difficult cases and quality control. To also add the result to the dataset as a new column, enable the separate output variable 'Add case agreement categorization to data'.
- detailLevel
Simple mode: All Agreed (100 percent), Majority Agreed (>=threshold percent), No Agreement (<threshold percent). Detailed mode: Absolute (100 percent), High, Moderate, Low, Poor (based on custom/data-driven thresholds). Simple mode replicates the former "Agreement Status" feature.
- simpleThreshold
For Simple mode only: Minimum percent for "Majority Agreed" status. 50 percent = simple majority, 75 percent = supermajority, 100 percent = unanimous.
- loaThresholds
For Detailed mode only: How to define 5 LoA categories. Custom = user-defined cutpoints. Quartiles/Tertiles = data-driven splits.
- loaHighThreshold
For Detailed mode with Custom thresholds only: Minimum percent for "High" classification (e.g., 75 percent = >=12/16 raters). Cases >= this threshold are "High Agreement".
- loaLowThreshold
For Detailed mode with Custom thresholds only: Minimum percent for "Low" classification (e.g., 56 percent = >=9/16 raters). Below = "Poor", between Low and High = "Moderate".
- loaVariableName
Name for the computed Level of Agreement variable added to the dataset. Default: 'agreement_level'. Will contain categories like 'Absolute', 'High', 'Moderate', 'Low', 'Poor'.
- showLoaTable
Display summary table showing distribution of cases across LoA categories with counts and percentages. Useful for quality control reporting.
- raterProfiles
Generate box plots or violin plots showing the distribution of ratings for each rater. For categorical data: bar plots showing category distribution per rater. For continuous data: box plots/violin plots showing rating distribution per rater. Essential for identifying raters with systematically different rating patterns (e.g., consistently higher/lower scores, restricted range use, bimodal distributions). Reveals rating style differences, scale use patterns, and potential training needs. Particularly valuable when agreement is low - helps determine if disagreement stems from systematic differences in rating distributions or random variation.
- raterProfileType
For continuous data: Choose between box plots (shows median, quartiles, outliers) or violin plots (shows full distribution shape including multimodality). For categorical data: Automatically uses bar plots showing category frequencies.
- raterProfileShowPoints
Overlay individual rating observations on box/violin plots. Useful for smaller datasets (N < 100) to show actual data distribution. Not recommended for large datasets due to overplotting.
- showRaterProfileGuide
Show the educational guide explaining what a rater profile plot shows, how to read a systematic shift between raters, and when to prefer a coefficient instead.
- agreementBySubgroup
Calculate agreement statistics separately for each level of a subgroup variable (e.g., tumor type, disease stage, specimen type, difficulty level). Generates forest plot showing kappa/ICC values with confidence intervals across subgroups. Essential for determining whether agreement is consistent across different contexts or varies by case characteristics. Common use cases: comparing agreement for benign vs. malignant cases, early vs. advanced stage, different anatomical sites, or easy vs. difficult cases. Reveals whether rater training is adequate for all case types or whether specific subgroups need targeted attention.
- subgroupVariable
Categorical variable defining subgroups for stratified analysis. Examples: tumor_type, disease_stage, specimen_site, difficulty_level. Agreement will be calculated separately for each level of this variable.
- subgroupForestPlot
Create forest plot showing agreement estimates (kappa/ICC) with confidence intervals for each subgroup. Facilitates visual comparison of agreement across subgroups.
- subgroupMinCases
Minimum number of cases required in a subgroup to calculate agreement statistics. Subgroups with fewer cases will be excluded with a warning message. Default: 10 cases (reasonable for kappa estimation).
- showSubgroupGuide
Show the educational guide listing when stratified agreement is useful (tumor type, stage or grade, case difficulty, anatomical site). The table's own note explains that kappa depends on each subgroup's case mix and that subgroups are not compared with each other.
- raterClustering
Cluster raters based on their rating patterns to identify groups of raters with similar rating behavior. For continuous data: clustering on the distance chosen under Distance (1 minus Lin's CCC by default, or correlation, Euclidean or Manhattan). For categorical data: clustering on the proportion of cases on which two raters disagree. Essential for identifying subgroups of raters who rate similarly, detecting outlier raters, understanding rater training backgrounds, and optimizing panel composition. Reveals whether raters form natural groups (e.g., experienced vs. novice, different training backgrounds) or rate independently. Useful for targeted training interventions and understanding sources of disagreement.
- clusterMethod
Hierarchical clustering: Creates dendrogram showing nested rater groupings at all similarity levels. Best for exploring natural groupings without pre-specifying number of clusters. K-means: Partitions raters into K distinct clusters. Requires specifying number of clusters. Best when number of groups is known a priori (e.g., 2 training cohorts, 3 experience levels).
- clusterDistance
Distance used to compare raters. Concordance (1 - Lin's CCC) is the default: Lin's concordance correlation coefficient is the correlation multiplied by a bias factor, so it falls both when two raters scatter around each other and when one reads consistently higher or on a wider scale. Two raters are close only when their numbers are interchangeable, which is what agreement means. The similarity column is then the concordance coefficient itself, on -1 to 1. Correlation (1 - r), pattern only: groups raters whose case-to-case ranking agrees. It removes systematic offsets, so two raters can share a cluster while one reads consistently higher than the other; it measures association, not absolute agreement. Choose it when the question is about ranking rather than about interchangeable values. Euclidean and Manhattan: raw distance between the two raters' readings. Both see a systematic offset, but their size grows with the number of cases, so the similarity column is rescaled by the largest distance in the analysis and ranks raters within this dataset only. Manhattan is less affected by a single extreme case. Exact Agreement: 1 minus the proportion of cases scored identically. This is the distance used for categorical ratings whatever is selected here; on continuous measurements it counts exact equality only.
- clusterLinkage
How to measure distance between clusters: - Average: Distance between cluster means (balanced, recommended for most cases) - Complete: Maximum distance between any two points (compact clusters) - Single: Minimum distance between any two points (can create chain-like clusters) - Ward: Minimizes within-cluster variance (tends to create equal-sized clusters)
- nClusters
Number of clusters to form. K-means partitions the raters into this many clusters; hierarchical clustering cuts the dendrogram into this many branches. Consider the number of training cohorts, experience levels or institutions. A value larger than one less than the number of raters is reduced, and the table says so.
- showDendrogram
Display hierarchical clustering dendrogram showing rater groupings at all similarity levels. Height of joins indicates dissimilarity. Raters joined at lower heights are more similar. Useful for identifying natural number of clusters and understanding rater relationships.
- showClusterHeatmap
Display heatmap of pairwise rater similarities with cluster memberships annotated. Helps visualize which raters are most similar and validates cluster assignments. For continuous data the similarity is the one the chosen distance implies (Lin's CCC by default). For categorical data it is the proportion of cases two raters agree on.
- showRaterClusterGuide
Show the educational guide explaining how raters are grouped and how to read the dendrogram and similarity heatmap.
- caseClustering
Perform clustering of cases based on rating patterns across raters. Identifies groups of cases that received similar ratings.
- caseClusterMethod
Hierarchical: Creates a dendrogram showing nested groupings at all similarity levels. K-means: Partitions cases into K distinct clusters (continuous data only).
- caseClusterDistance
Distance used to compare cases. Euclidean is the default: straight-line distance between two cases' rating vectors, which sees the level of the ratings, so cases are grouped when the raters gave them similar numbers. The similarity column is the distance rescaled by the largest distance in the analysis and ranks cases within this dataset only. Manhattan: the same, from absolute differences, and less affected by one extreme rater. Correlation (1 - r), profile shape only: groups cases whose rating profile across raters has the same shape. It ignores the level of the ratings, so cases of very different magnitude are grouped together. A case's profile has only as many points as there are raters, so this needs at least three raters; with two, the correlation between any two cases is exactly +1 or -1 and the analysis stops with a message. Exact Agreement: 1 minus the proportion of raters who gave two cases the same value. This is the distance used for categorical ratings whatever is selected here. Lin's concordance coefficient is deliberately not offered for cases: it would be estimated from as many points as there are raters, typically three to six, which is too few.
- caseClusterLinkage
Average: Uses average distance between all pairs. Complete: Uses maximum distance between pairs. Single: Uses minimum distance between pairs. Ward: Minimizes within-cluster variance.
- nCaseClusters
Number of clusters to form. K-means partitions the cases into this many clusters; hierarchical clustering cuts the dendrogram into this many branches. A value larger than one less than the number of cases is reduced, and the table says so.
- showCaseDendrogram
Display hierarchical clustering dendrogram for cases.
- showCaseClusterHeatmap
Display similarity matrix heatmap with cluster boundaries.
- showCaseClusterGuide
Show educational guide about case clustering analysis.
- pairedAgreementTest
Perform a bootstrap test comparing interobserver agreement (kappa and percent agreement) between two conditions (e.g., manual vs AI-assisted scoring of the same cases).
- conditionBVars
Rater columns for the second condition (e.g., AI-assisted). The main rater variables serve as Condition A. Give Condition B the same number of rater columns as Condition A; otherwise only percent agreement is comparable and no kappa row is shown.
- pairedBootN
Number of bootstrap replications for paired comparison test.
- showPairedAgreementGuide
Show educational guide for comparing agreement between two conditions.
- agreementSampleSize
Compute the required sample size (number of subjects) for a prospective agreement study based on kappa or ICC.
- ssMetric
The agreement metric to power the study for.
- ssKappaNull
The kappa (or ICC) value under the null hypothesis. Common choices - 0.4 (moderate), 0.6 (substantial).
- ssKappaAlt
The kappa (or ICC) value under the alternative hypothesis. This is the minimum clinically meaningful agreement.
- ssNRaters
Planned number of raters in the study. Kappa calculations support 2 to 6 raters; the ICC calculation has no upper limit.
- ssNCategories
Number of rating categories (e.g., 4 for HER2 0/1+/2+/3+).
- ssAlpha
Type I error rate (two-sided).
- ssPower
Target power (1 - Type II error rate).
- showSampleSizeGuide
Show educational guide for planning agreement study sample size.
- seed
Random seed for everything random in this analysis: the bootstrap resampling, the k-means starting centers of rater and case clustering, and the random subsample the case-cluster heatmap draws above 200 cases. Change this value to obtain a different draw; the default (42) reproduces the previous fixed behavior.
- specificCIMethod
Bootstrap preserves paired observations and suppresses intervals with undefined or constant draws. It is exploratory; simulations found undercoverage even with 60 clusters. Legacy Wilson uses an effective denominator and has no guaranteed coverage. The existing legacy default is retained pending better coverage validation.
- specificCluster
Optional cluster ID aligned to the data. Specific-agreement intervals resample whole clusters; all other agreement outputs keep their own documented inference.
Value
A results object containing:
results$welcome | a html | ||||
results$irrtable | a table | ||||
results$contingencyTableGroup$contingencyTable | a table | ||||
results$contingencyTableGroup$ratingCombinationsTable | a table | ||||
results$contingencyTableGroup$contingencyTableExplanation | a html | ||||
results$gradingGroup$designSummaryTable | a table | ||||
results$gradingGroup$categoryDistributionTable | a table | ||||
results$gradingGroup$pathologistTable | a table | ||||
results$gradingGroup$boundaryTable | a table | ||||
results$gradingGroup$severityPlot | an image | ||||
results$gradingGroup$latentModelTable | a table | ||||
results$gradingGroup$gradingGuide | a html | ||||
results$blandAltmanGroup$blandAltman | an image | ||||
results$blandAltmanGroup$blandAltmanExplanation | a html | ||||
results$blandAltmanGroup$blandAltmanStats | a table | ||||
results$agreementHeatmapPlot | an image | ||||
results$agreementHeatmapExplanation | a html | ||||
results$krippTableGroup$krippTable | a table | ||||
results$krippTableGroup$krippExplanation | a html | ||||
results$lightKappaTableGroup$lightKappaTable | a table | ||||
results$lightKappaTableGroup$lightKappaExplanation | a html | ||||
results$lightKappaTableGroup$finnTable | a table | ||||
results$lightKappaTableGroup$finnExplanation | a html | ||||
results$lightKappaTableGroup$kendallWTable | a table | ||||
results$lightKappaTableGroup$kendallWExplanation | a html | ||||
results$lightKappaTableGroup$robinsonATable | a table | ||||
results$lightKappaTableGroup$robinsonAExplanation | a html | ||||
results$lightKappaTableGroup$meanSpearmanTable | a table | ||||
results$lightKappaTableGroup$meanSpearmanExplanation | a html | ||||
results$raterBiasGroup$raterBiasTable | a table | ||||
results$raterBiasGroup$raterBiasExplanation | a html | ||||
results$raterBiasGroup$bhapkarTable | a table | ||||
results$raterBiasGroup$bhapkarExplanation | a html | ||||
results$raterBiasGroup$stuartMaxwellTable | a table | ||||
results$raterBiasGroup$stuartMaxwellExplanation | a html | ||||
results$pairwiseKappaTable | a table | ||||
results$pairwiseKappaExplanation | a html | ||||
results$allPairsKappaTable | a table | ||||
results$allPairsKappaExplanation | a html | ||||
results$itemModalAgreementTable | a table | ||||
results$itemModalAgreementExplanation | a html | ||||
results$hierarchicalGroup$hierarchicalOverallTable | a table | ||||
results$hierarchicalGroup$clusterSpecificTable | a table | ||||
results$hierarchicalGroup$varianceDecompositionTable | a table | ||||
results$hierarchicalGroup$hierarchicalICCTable | a table | ||||
results$hierarchicalGroup$homogeneityTestTable | a table | ||||
results$hierarchicalGroup$hierarchicalExplanation | a html | ||||
results$advancedGroup$mixedEffectsTable | a table | ||||
results$advancedGroup$mixedEffectsVarianceTable | a table | ||||
results$advancedGroup$mixedEffectsExplanation | a html | ||||
results$advancedGroup$confusionMatrixTable | a table | ||||
results$advancedGroup$perClassMetricsTable | a table | ||||
results$advancedGroup$confusionMatrixExplanation | a html | ||||
results$advancedGroup$bootstrapCITable | a table | ||||
results$advancedGroup$bootstrapCIExplanation | a html | ||||
results$advancedGroup$concordanceF1Table | a table | ||||
results$advancedGroup$concordanceF1PerClassTable | a table | ||||
results$advancedGroup$concordanceF1Explanation | a html | ||||
results$gwetGroup$gwetTable | a table | ||||
results$gwetGroup$gwetExplanation | a html | ||||
results$gwetGroup$pabakTable | a table | ||||
results$gwetGroup$pabakExplanation | a html | ||||
results$iccGroup$iccTable | a table | ||||
results$iccGroup$iccExplanation | a html | ||||
results$iccGroup$meanPearsonTable | a table | ||||
results$iccGroup$meanPearsonExplanation | a html | ||||
results$iccGroup$linCCCTable | a table | ||||
results$iccGroup$linCCCExplanation | a html | ||||
results$iccGroup$tdiTable | a table | ||||
results$iccGroup$tdiExplanation | a html | ||||
results$maxwellREGroup$maxwellRETable | a table | ||||
results$maxwellREGroup$maxwellREExplanation | a html | ||||
results$maxwellREGroup$interIntraRaterIntraTable | a table | ||||
results$maxwellREGroup$interIntraRaterInterTable | a table | ||||
results$maxwellREGroup$interIntraRaterExplanation | a html | ||||
results$maxwellREGroup$iotaTable | a table | ||||
results$maxwellREGroup$iotaExplanation | a html | ||||
results$weightedKappaGuide | a html | ||||
results$specificAgreementGroup$specificAgreementTable | a table | ||||
results$specificAgreementGroup$specificAgreementExplanation | a html | ||||
results$levelInfoTable | a table | ||||
results$summary | a html | ||||
results$about | a html | ||||
results$clinicalUseCases | a html | ||||
results$consensusTable | a table | ||||
results$loaTable | a table | ||||
results$loaDetailTable | a table | ||||
results$computedVariablesInfo | a html | ||||
results$consensusVar | an output | ||||
results$loaOutput | an output | ||||
results$raterProfilePlot | an image | ||||
results$raterProfileExplanation | a html | ||||
results$subgroupAgreementTable | a table | ||||
results$subgroupForestPlotImage | an image | ||||
results$subgroupExplanation | a html | ||||
results$raterClusterGroup$raterClusterTable | a table | ||||
results$raterClusterGroup$raterDendrogram | an image | ||||
results$raterClusterGroup$raterClusterHeatmap | an image | ||||
results$raterClusterGroup$raterClusterExplanation | a html | ||||
results$raterClusterGroup$caseClusterTable | a table | ||||
results$raterClusterGroup$caseDendrogram | an image | ||||
results$raterClusterGroup$caseClusterHeatmap | an image | ||||
results$raterClusterGroup$caseClusterExplanation | a html | ||||
results$pairedAgreementGroup$pairedAgreementTable | a table | ||||
results$pairedAgreementGroup$pairedAgreementExplanation | a html | ||||
results$pairedAgreementGroup$agreementSampleSizeTable | a table | ||||
results$pairedAgreementGroup$agreementSampleSizeExplanation | a html |
Tables can be converted to data frames with asDF or as.data.frame. For example:
results$irrtable$asDF
as.data.frame(results$irrtable)
Examples
if (FALSE) { # \dontrun{
# Two raters scoring the same 250 cases as 0 or 1
agreement(
data = histopathology,
vars = c("Rater 1", "Rater 2"),
sft = TRUE)
} # }