
When two methods move together, are they interchangeable?
A measurement method can track another method extremely closely and still disagree with it on individual samples. Correlation describes how two measurements move together across a sample. Agreement asks a different question: how far apart are the two readings for the same sample, and does that difference change as the quantity being measured changes?
This distinction matters whenever a new laboratory assay, field sensor, imaging method or digital instrument is compared with an established procedure. A strong correlation is not enough to justify replacing one method with another.
This tutorial uses the documented milk dataset distributed with the R package MethComp. It contains fat-content measurements from 45 human-milk samples, each measured by a triglyceride-derived enzymic method (Trig) and the Standard Gerber method (Gerber). Measurements are expressed in grams per 100 millilitres. The observations are historical laboratory data, not crop-sensor measurements.
The original Bland and Altman paper used these same measurements to illustrate both the conventional difference-versus-average plot and a regression-based extension for proportional bias. The aim here is to reproduce that reasoning transparently in base R.
1. Set up the project
The analysis uses base R and portable paths relative to the project root. It does not silently install packages or download data. The Quarto project is configured to execute from the root folder, so the same data paths work in the standalone script and this article.
project_dir <- getwd()
data_dir <- file.path(project_dir, "01_data")
output_dir <- file.path(project_dir, "outputs")
table_dir <- file.path(output_dir, "tables")
figure_dir <- file.path(output_dir, "figures")
log_dir <- file.path(output_dir, "logs")
for (path in c(output_dir, table_dir, figure_dir, log_dir)) {
if (!dir.exists(path)) dir.create(path, recursive = TRUE)
}2. Import and audit the paired observations
Each sample is measured by both methods. The experimental unit is therefore the sample, not an individual method reading. The 90 rows in the long-format file are 45 matched pairs; they must not be treated as 90 independent samples.
pairs_file <- file.path(data_dir, "milk_method_pairs.csv")
long_file <- file.path(data_dir, "milk_method_readings_long.csv")
if (!file.exists(pairs_file)) {
stop("Cannot find 01_data/milk_method_pairs.csv. Run the script from the project root.")
}
if (!file.exists(long_file)) {
stop("Cannot find 01_data/milk_method_readings_long.csv. Restore the Stage 2 data file.")
}
milk_pairs <- read.csv(pairs_file, stringsAsFactors = FALSE)
milk_long <- read.csv(long_file, stringsAsFactors = FALSE)
required_pairs <- c("item", "trig_g_per_100ml", "gerber_g_per_100ml")
required_long <- c("meth", "item", "y")
if (!all(required_pairs %in% names(milk_pairs))) {
stop("The paired CSV does not contain the expected columns.")
}
if (!all(required_long %in% names(milk_long))) {
stop("The long CSV does not contain the expected columns.")
}
if (nrow(milk_pairs) != 45 || nrow(milk_long) != 90) {
stop("Unexpected row count: this tutorial expects 45 matched samples and 90 method readings.")
}
if (anyNA(milk_pairs) || anyNA(milk_long)) {
stop("Missing values were found. Investigate them before calculating agreement.")
}
if (!is.numeric(milk_pairs$trig_g_per_100ml) ||
!is.numeric(milk_pairs$gerber_g_per_100ml)) {
stop("Both paired measurement columns must be numeric.")
}
if (any(!is.finite(milk_pairs$trig_g_per_100ml)) ||
any(!is.finite(milk_pairs$gerber_g_per_100ml))) {
stop("Non-finite measurements were found.")
}
if (any(milk_pairs$trig_g_per_100ml <= 0) ||
any(milk_pairs$gerber_g_per_100ml <= 0)) {
stop("All measurements must be positive for this source dataset.")
}
if (anyDuplicated(milk_pairs$item) > 0 ||
!setequal(as.integer(milk_pairs$item), 1:45)) {
stop("The paired sample identifiers are not unique and complete.")
}
if (!setequal(unique(milk_long$meth), c("Gerber", "Trig")) ||
any(table(milk_long$meth) != 45) ||
anyDuplicated(milk_long[c("meth", "item")]) > 0) {
stop("The long-format file does not contain one reading per method and sample.")
}
trig_long <- milk_long[milk_long$meth == "Trig", c("item", "y")]
gerber_long <- milk_long[milk_long$meth == "Gerber", c("item", "y")]
trig_long <- trig_long[order(trig_long$item), ]
gerber_long <- gerber_long[order(gerber_long$item), ]
if (!identical(as.integer(trig_long$item), as.integer(milk_pairs$item)) ||
!identical(as.integer(gerber_long$item), as.integer(milk_pairs$item))) {
stop("The sample IDs in the long and paired CSV files do not match.")
}
if (!isTRUE(all.equal(as.numeric(trig_long$y),
as.numeric(milk_pairs$trig_g_per_100ml), tolerance = 0)) ||
!isTRUE(all.equal(as.numeric(gerber_long$y),
as.numeric(milk_pairs$gerber_g_per_100ml), tolerance = 0))) {
stop("The long and paired CSV files contain different measurements.")
}
cat("Data audit passed: 45 complete pairs and 90 method readings.\n")Data audit passed: 45 complete pairs and 90 method readings.
The import checks confirm that the two files contain the same paired measurements. They also check the sample identifiers, method labels, expected number of readings, positive values and missingness before any agreement statistic is calculated.
3. Preserve the pairing and define the difference
We define the difference as Trig minus Gerber. A positive difference means the enzymic method reads higher for that sample; a negative difference means it reads lower. The average of the two readings is used as a practical estimate of measurement magnitude.
analysis_data <- data.frame(
item = as.integer(milk_pairs$item),
gerber = as.numeric(milk_pairs$gerber_g_per_100ml),
trig = as.numeric(milk_pairs$trig_g_per_100ml)
)
analysis_data$average <- (analysis_data$trig + analysis_data$gerber) / 2
analysis_data$difference <- analysis_data$trig - analysis_data$gerber
n_pairs <- nrow(analysis_data)4. Correlation: useful, but not an agreement measure
A paired scatter plot is a useful first visual check. The diagonal line represents perfect equality: every point on that line would have identical Gerber and Trig readings. A fitted line can be close to the diagonal while individual paired differences remain too wide for the intended use. In these data, the fitted relationship lies close to the equality line, but the Bland–Altman plots below reveal a systematic change in the direction of the difference as fat content increases.
method_summary <- data.frame(
method = c("Gerber", "Trig"),
n = c(length(analysis_data$gerber), length(analysis_data$trig)),
mean = c(mean(analysis_data$gerber), mean(analysis_data$trig)),
sd = c(sd(analysis_data$gerber), sd(analysis_data$trig)),
median = c(median(analysis_data$gerber), median(analysis_data$trig)),
minimum = c(min(analysis_data$gerber), min(analysis_data$trig)),
maximum = c(max(analysis_data$gerber), max(analysis_data$trig))
)
pearson_test <- stats::cor.test(
analysis_data$gerber,
analysis_data$trig,
method = "pearson"
)
correlation_summary <- data.frame(
pearson_r = unname(pearson_test$estimate),
ci_lower = pearson_test$conf.int[1],
ci_upper = pearson_test$conf.int[2],
p_value = pearson_test$p.value
)| method | n | mean | sd | median | minimum | maximum |
|---|---|---|---|---|---|---|
| Gerber | 45 | 2.804 | 1.301 | 2.67 | 0.85 | 6.20 |
| Trig | 45 | 2.804 | 1.265 | 2.67 | 0.96 | 6.21 |
| pearson_r | ci_lower | ci_upper | p_value |
|---|---|---|---|
| 0.9981 | 0.9965 | 0.999 | <1e-16 |
The mean Gerber reading is 2.8038 g/100 ml, and the mean Trig reading is 2.8036 g/100 ml. The Pearson correlation is 0.9981 (95% confidence interval 0.9965 to 0.9990; p = <2e-16). This is an exceptionally strong linear association. However, the p-value tests whether the population correlation is zero; it does not test agreement or interchangeability. A wide range of values across samples can produce a very high correlation even when the two readings differ materially for individual samples.
5. Calculate bias and conventional limits of agreement
For each matched sample, let \(D_i\) be the difference between methods and \(A_i\) their average:
\[ D_i = \mathrm{Trig}_i - \mathrm{Gerber}_i, \qquad A_i = \frac{\mathrm{Trig}_i + \mathrm{Gerber}_i}{2} \]
The mean difference estimates bias, the average direction and size of disagreement. The standard deviation of the differences describes how much individual disagreements vary around that mean. Under an approximately normal, stable distribution of differences, the conventional 95% limits of agreement are
\[ \bar D - 1.96s_D \quad\text{and}\quad \bar D + 1.96s_D \]
These limits are not confidence limits for the mean. They estimate the range expected to contain about 95% of future paired differences under the model assumptions. Confidence intervals around the bias and each limit describe the sampling uncertainty in those estimates.
The confidence interval for a limit uses the estimated uncertainty in both the mean difference and its standard deviation. The code uses the standard approximation with a \(t\) critical value and \(n-1\) degrees of freedom.
bias <- mean(analysis_data$difference)
sd_difference <- sd(analysis_data$difference)
loa_multiplier <- stats::qnorm(0.975)
t_critical <- stats::qt(0.975, df = n_pairs - 1)
lower_loa <- bias - loa_multiplier * sd_difference
upper_loa <- bias + loa_multiplier * sd_difference
se_bias <- sd_difference / sqrt(n_pairs)
bias_ci <- bias + c(-1, 1) * t_critical * se_bias
se_loa <- sd_difference * sqrt(
1 / n_pairs + loa_multiplier^2 / (2 * (n_pairs - 1))
)
lower_loa_ci <- lower_loa + c(-1, 1) * t_critical * se_loa
upper_loa_ci <- upper_loa + c(-1, 1) * t_critical * se_loa
agreement_summary <- data.frame(
n_pairs = n_pairs,
mean_bias = bias,
bias_ci_lower = bias_ci[1],
bias_ci_upper = bias_ci[2],
sd_of_differences = sd_difference,
lower_95_loa = lower_loa,
lower_loa_ci_lower = lower_loa_ci[1],
lower_loa_ci_upper = lower_loa_ci[2],
upper_95_loa = upper_loa,
upper_loa_ci_lower = upper_loa_ci[1],
upper_loa_ci_upper = upper_loa_ci[2]
)| n_pairs | mean_bias | bias_ci_lower | bias_ci_upper | sd_of_differences | lower_95_loa | lower_loa_ci_lower | lower_loa_ci_upper | upper_95_loa | upper_loa_ci_lower | upper_loa_ci_upper |
|---|---|---|---|---|---|---|---|---|---|---|
| 45 | -2e-04 | -0.0264 | 0.026 | 0.0873 | -0.1713 | -0.2165 | -0.1262 | 0.1709 | 0.1257 | 0.216 |
The estimated mean bias is -0.00022 g/100 ml, with a 95% confidence interval from -0.02645 to 0.02600. The conventional 95% limits of agreement are -0.17132 to 0.17087 g/100 ml. The confidence interval for the lower limit is -0.21647 to -0.12616, and for the upper limit it is 0.12572 to 0.21603. The mean-bias interval includes zero, but that only describes the average signed difference. The limits describe individual disagreement. The observed differences range from -0.25 to 0.19 g/100 ml. Because the difference-versus-average plot shows a downward trend, these horizontal limits are a useful first summary but do not fully describe how the expected difference changes with measurement magnitude.
6. Look for proportional bias
The conventional limits assume that the average difference and its spread are reasonably constant across the measurement range. A sloping cloud in the difference-versus-average plot signals that the direction or size of bias may change with measurement magnitude.
A simple first model is
\[ D_i = \beta_0 + \beta_1 A_i + \varepsilon_i. \]
The intercept describes the fitted difference at a measurement average of zero, while the slope describes how the expected difference changes as measurement magnitude increases. The slope is a diagnostic of proportional bias; it is not a calibration equation to apply automatically.
bias_model <- stats::lm(difference ~ average, data = analysis_data)
bias_model_summary <- summary(bias_model)
bias_model_ci <- stats::confint(bias_model)
bias_coef <- bias_model_summary$coefficients
proportional_bias <- data.frame(
term = rownames(bias_coef),
estimate = bias_coef[, "Estimate"],
standard_error = bias_coef[, "Std. Error"],
t_value = bias_coef[, "t value"],
p_value = bias_coef[, "Pr(>|t|)"],
ci_lower = bias_model_ci[, 1],
ci_upper = bias_model_ci[, 2],
row.names = NULL
)
regression_residual_sd <- bias_model_summary$sigma
prediction_grid <- data.frame(
average = seq(
min(analysis_data$average),
max(analysis_data$average),
length.out = 100
)
)
prediction_grid$estimated_difference <- as.numeric(
stats::predict(bias_model, newdata = prediction_grid)
)
prediction_grid$lower_regression_loa <-
prediction_grid$estimated_difference - loa_multiplier * regression_residual_sd
prediction_grid$upper_regression_loa <-
prediction_grid$estimated_difference + loa_multiplier * regression_residual_sd
analysis_data$estimated_difference <- as.numeric(stats::fitted(bias_model))
analysis_data$regression_residual <- as.numeric(stats::residuals(bias_model))| term | estimate | standard_error | t_value | p_value | ci_lower | ci_upper |
|---|---|---|---|---|---|---|
| (Intercept) | 0.0790 | 0.0291 | 2.7198 | 0.0094 | 0.0204 | 0.1376 |
| average | -0.0283 | 0.0094 | -2.9934 | 0.0046 | -0.0473 | -0.0092 |
The estimated intercept is 0.07904 and the estimated slope is -0.02827. The slope is expressed in g/100 ml of difference per 1 g/100 ml of average (95% confidence interval -0.04732 to -0.00922; p = 0.00456). The negative slope means that the expected Trig-minus-Gerber difference decreases as fat content increases: Trig tends to read higher at the lower end, while Gerber tends to read higher at the upper end. The confidence interval excludes zero, supporting proportional bias in this sample. The intercept is defined at an average of zero, outside the observed range, and should not be given a practical laboratory interpretation. This regression is a diagnostic description, not an automatic calibration equation.
7. Regression-based limits and residual diagnostics
When the expected difference changes with measurement magnitude, the estimated mean difference can be allowed to vary with the average. If the residual standard deviation is approximately constant, the regression-based limits are
\[ \widehat D(A) \pm 1.96s_{\mathrm{res}}, \]
where \(s_{\mathrm{res}}\) is the residual standard deviation around the fitted difference-on-average line. These curves are point estimates, not confidence bands; the confidence intervals reported for the conventional limits do not apply to the regression-based curves.
The residual spread must also be inspected. The original Bland–Altman extension models absolute residuals against measurement magnitude when the residual standard deviation itself changes. Under a normal residual model, the fitted mean absolute residual is multiplied by the square root of pi over two to estimate the residual SD at each magnitude. This tutorial reports the absolute-residual trend and residual plots as diagnostics, but does not fit variable-width limits. The decision to retain a constant residual SD is a working assumption supported by the observed diagnostic, not proof that the variance is exactly constant.
analysis_data$absolute_residual <- abs(analysis_data$regression_residual)
absolute_residual_model <- stats::lm(
absolute_residual ~ average,
data = analysis_data
)
absolute_residual_coef <- summary(absolute_residual_model)$coefficients
absolute_residual_ci <- stats::confint(absolute_residual_model)
residual_shapiro <- stats::shapiro.test(analysis_data$regression_residual)
diagnostic_summary <- data.frame(
regression_residual_sd = regression_residual_sd,
shapiro_w = unname(residual_shapiro$statistic),
shapiro_p_value = residual_shapiro$p.value,
absolute_residual_slope = absolute_residual_coef["average", "Estimate"],
absolute_residual_slope_ci_lower = absolute_residual_ci["average", 1],
absolute_residual_slope_ci_upper = absolute_residual_ci["average", 2],
absolute_residual_slope_p_value = absolute_residual_coef["average", "Pr(>|t|)"]
)| regression_residual_sd | shapiro_w | shapiro_p_value | absolute_residual_slope | absolute_residual_slope_ci_lower | absolute_residual_slope_ci_upper | absolute_residual_slope_p_value |
|---|---|---|---|---|---|---|
| 0.0803 | 0.9864 | 0.8694 | 0.0052 | -0.0067 | 0.017 | 0.3832 |
The residual standard deviation around the fitted line is 0.08033 g/100 ml. At the lowest observed average (0.905), the fitted difference is 0.0535 and the regression-based limits are -0.1040 to 0.2109 g/100 ml. At the highest observed average (6.205), the fitted difference is -0.0964 and the limits are -0.2538 to 0.0611 g/100 ml. These are fitted limits, not confidence bands.
The absolute-residual slope is 0.00517, with a 95% confidence interval from -0.00666 to 0.01699 (p = 0.383). This provides no strong evidence that residual spread changes systematically across the observed range, but a non-significant slope does not prove constant variance.
draw_method_scatter <- function() {
common_range <- range(c(analysis_data$gerber, analysis_data$trig))
plot(
analysis_data$gerber,
analysis_data$trig,
xlim = common_range,
ylim = common_range,
asp = 1,
pch = 19,
col = "steelblue",
xlab = "Gerber fat content (g/100 ml)",
ylab = "Trig fat content (g/100 ml)",
main = "Association is not the same as agreement"
)
abline(0, 1, lty = 2, lwd = 2, col = "grey35")
abline(stats::lm(trig ~ gerber, data = analysis_data),
lwd = 2, col = "firebrick")
legend(
"topleft",
legend = c("Line of equality", "Fitted relationship"),
lty = c(2, 1),
lwd = 2,
col = c("grey35", "firebrick"),
bty = "n"
)
}
draw_conventional_bland_altman <- function() {
plot(
analysis_data$average,
analysis_data$difference,
pch = 19,
col = "steelblue",
xlab = "Average of Gerber and Trig (g/100 ml)",
ylab = "Difference: Trig minus Gerber (g/100 ml)",
main = "Conventional Bland–Altman limits"
)
abline(h = 0, lty = 3, col = "grey45")
abline(h = bias, lwd = 2, col = "darkgreen")
abline(h = c(lower_loa, upper_loa), lty = 2, lwd = 2, col = "firebrick")
abline(bias_model, lwd = 2, col = "purple4")
legend(
"bottomleft",
legend = c("Zero difference", "Mean bias", "95% limits", "Difference-on-average fit"),
lty = c(3, 1, 2, 1),
lwd = c(1, 2, 2, 2),
col = c("grey45", "darkgreen", "firebrick", "purple4"),
bty = "n",
cex = 0.82
)
}
draw_regression_bland_altman <- function() {
plot(
analysis_data$average,
analysis_data$difference,
pch = 19,
col = "steelblue",
xlab = "Average of Gerber and Trig (g/100 ml)",
ylab = "Difference: Trig minus Gerber (g/100 ml)",
main = "Magnitude-specific regression limits"
)
abline(h = 0, lty = 3, col = "grey45")
lines(
prediction_grid$average,
prediction_grid$estimated_difference,
lwd = 2,
col = "darkgreen"
)
lines(
prediction_grid$average,
prediction_grid$lower_regression_loa,
lwd = 2,
lty = 2,
col = "firebrick"
)
lines(
prediction_grid$average,
prediction_grid$upper_regression_loa,
lwd = 2,
lty = 2,
col = "firebrick"
)
legend(
"bottomleft",
legend = c("Zero difference", "Estimated mean difference", "Regression-based 95% limits"),
lty = c(3, 1, 2),
lwd = c(1, 2, 2),
col = c("grey45", "darkgreen", "firebrick"),
bty = "n",
cex = 0.82
)
}
draw_residual_diagnostics <- function() {
old_par <- par(mfrow = c(1, 2))
qqnorm(
analysis_data$regression_residual,
pch = 19,
col = "steelblue",
main = "Normal Q–Q plot of regression residuals"
)
qqline(analysis_data$regression_residual, col = "firebrick", lwd = 2)
plot(
analysis_data$average,
analysis_data$absolute_residual,
pch = 19,
col = "steelblue",
xlab = "Average of the two methods (g/100 ml)",
ylab = "Absolute regression residual (g/100 ml)",
main = "Check whether residual spread changes"
)
abline(absolute_residual_model, col = "firebrick", lwd = 2)
par(old_par)
}
png(file.path(figure_dir, "01_method_scatter.png"),
width = 2400, height = 1800, res = 300)
draw_method_scatter()
dev.off()png
2
png(file.path(figure_dir, "02_bland_altman_conventional.png"),
width = 2400, height = 1800, res = 300)
draw_conventional_bland_altman()
dev.off()png
2
png(file.path(figure_dir, "03_bland_altman_regression.png"),
width = 2400, height = 1800, res = 300)
draw_regression_bland_altman()
dev.off()png
2
png(file.path(figure_dir, "04_regression_residual_diagnostics.png"),
width = 3000, height = 1500, res = 300)
draw_residual_diagnostics()
dev.off()png
2
Visual diagnostics




The Shapiro–Wilk statistic is 0.9864, with p = 0.869. This test does not provide strong evidence against normality, but it is not a pass/fail certificate. The Q–Q plot shows some tail departures, and the largest absolute regression residual is 0.2110 g/100 ml. With only 45 pairs, visual inspection, the size of individual residuals, and scientific understanding remain important.
8. Export the analysis
write.csv(method_summary,
file.path(table_dir, "01_method_summary.csv"),
row.names = FALSE)
write.csv(correlation_summary,
file.path(table_dir, "02_correlation_summary.csv"),
row.names = FALSE)
write.csv(agreement_summary,
file.path(table_dir, "03_conventional_agreement_summary.csv"),
row.names = FALSE)
write.csv(proportional_bias,
file.path(table_dir, "04_difference_on_average_model.csv"),
row.names = FALSE)
write.csv(diagnostic_summary,
file.path(table_dir, "05_regression_diagnostics.csv"),
row.names = FALSE)
write.csv(analysis_data,
file.path(table_dir, "06_paired_differences.csv"),
row.names = FALSE)
write.csv(prediction_grid,
file.path(table_dir, "07_regression_based_limits.csv"),
row.names = FALSE)
summary_lines <- c(
sprintf("Matched samples analysed: %d", n_pairs),
sprintf("Pearson correlation: %.5f (p = %.4g)",
correlation_summary$pearson_r, correlation_summary$p_value),
sprintf("Mean bias, Trig minus Gerber: %.5f g/100 ml", bias),
sprintf("Conventional 95%% limits of agreement: %.5f to %.5f g/100 ml",
lower_loa, upper_loa),
sprintf("Difference-on-average slope: %.5f (95%% CI %.5f to %.5f)",
proportional_bias$estimate[proportional_bias$term == "average"],
proportional_bias$ci_lower[proportional_bias$term == "average"],
proportional_bias$ci_upper[proportional_bias$term == "average"]),
sprintf("Residual SD around the difference-on-average line: %.5f g/100 ml",
regression_residual_sd),
sprintf("Absolute-residual trend p-value: %.4g",
diagnostic_summary$absolute_residual_slope_p_value),
sprintf("Shapiro–Wilk p-value for regression residuals: %.4g",
diagnostic_summary$shapiro_p_value),
"Interpret limits in the context of a prespecified acceptable measurement error.",
"The data contain no replicate readings within each method; method-specific repeatability cannot be separated."
)
writeLines(summary_lines, file.path(log_dir, "analysis_summary.txt"))
utils::capture.output(sessionInfo(),
file = file.path(log_dir, "R_session_info.txt"))
cat(paste(summary_lines, collapse = "\n"), "\n")
cat("\nTables, figures and logs were saved under outputs/.\n")9. What would justify interchangeability?
Neither a high correlation nor a small average bias establishes that two methods can be used interchangeably. The decision requires an acceptable difference defined before looking at the results, based on the purpose of the measurement and the consequences of error. The confidence intervals for the limits can then be compared with that external tolerance.
There is another limitation in this dataset: each method is measured once per sample. Without replicate readings within each method, we cannot separate the repeatability of Gerber from the repeatability of Trig. Bland and Altman emphasize that repeatability is an important part of method comparison and recommend collecting replicate measurements when the research question requires it.
Finally, the original sampling frame, collection dates and geographic coverage are not documented in the dataset help page. These historical observations are useful for teaching agreement analysis, but they do not establish performance for every milk population or laboratory.
The same framework is used in modern agricultural measurement. Anderson et al. (2026) compared smartphone-based PhotoFolia leaf-image estimates with SPAD-meter readings and laboratory assays in rice, and used Bland–Altman plots to inspect bias and limits of agreement. Their limits widened as the reference-spectrum library became less specific, while chlorophyll-estimation errors depended on concentration. This illustrates why agreement must be inspected across the measurement range; these rice observations are not part of the historical milk dataset used here.
Main lessons
- Correlation measures association across samples; agreement measures the size and pattern of paired differences.
- Preserve the matched sample structure. The 90 method readings represent 45 pairs.
- Report mean bias, limits of agreement and confidence intervals in the original measurement units.
- Inspect difference against average. Proportional bias can make a single horizontal pair of limits incomplete.
- Define acceptable measurement error externally. Statistical output alone cannot decide whether a method is fit for its intended purpose.
References
- Bland, J. M., & Altman, D. G. (1999). Measuring agreement in method comparison studies. Statistical Methods in Medical Research, 8(2), 135–160. https://doi.org/10.1177/096228029900800204.
- Carstensen, B., Gurrin, L., Ekstrøm, C. T., & Figurski, M. (2024). MethComp: Analysis of Agreement in Method Comparison Studies, version 1.30.2. CRAN package page.
- Anderson, J., et al. (2026). Image-based leaf SPAD value and chlorophyll measurement using a mobile phone: enabling accessible and sustainable crop management. Precision Agriculture, 27, article 81. https://doi.org/10.1007/s11119-026-10386-x.
- Lucas, A., Hudson, G. J., Simpson, P., Cole, T. J., & Baker, B. A. (1987). An automated enzymic micromethod for the measurement of fat in human milk. Journal of Dairy Research, 54, 487–492.
Data attribution: The milk dataset is distributed with MethComp and adapted from Table 3 of Bland and Altman (1999), which cites the underlying human-milk measurement study by Lucas and colleagues. The package declares GPL (version 2 or later); its help page does not state a separate dataset-specific license. Confirm rights before commercial re-hosting of the original measurements.
Comments
Post a Comment