METHOD COMPARISON · PASSING-BABLOK · DEMING · WEIGHTED DEMING · BLAND-ALTMAN · DECISION LEVELS · RUNS IN YOUR BROWSER · NOTHING UPLOADED

Do the old and the new method agree, and where do they not?

You measured the same samples two ways: a new assay against the current one, a new analyser against the reference lab, a cuff against a mercury column. Paste the pairs and get Passing-Bablok regression (1983) with its intervals and linearity test, Deming and weighted Deming regression with jackknife intervals, the Bland-Altman bias and limits of agreement, and the difference between the methods at your decision levels.

Nothing you enter leaves this browser tab. A statistical estimate from the readings you give, not medical, laboratory accreditation or regulatory advice.

Your paired readings

Example: mercury against oscillometric blood pressure in 4,212 adults

In the 2017-2018 National Health and Nutrition Examination Survey, adults had their blood pressure taken twice in random order: by a physician with a mercury sphygmomanometer, and by a technician with an Omron HEM-907XL oscillometric cuff, three readings each. Taking the mean of each set of three, the oscillometric device reads systolic pressure 1.3 mmHg lower on average (95% CI 1.0 to 1.6), and for 95% of people the two differ by between -20.9 and +18.2 mmHg: close on average, far apart for some individuals.

Least squares, which treats the mercury reading as exact, gives a slope of 0.87, as if the cuff under-read high pressures by 13%. That is the attenuation Cornbleet and Gochman warned about in 1979: both methods have error, and the error in x drags the slope toward zero. Passing-Bablok gives 1.023 (95% CI 1.000 to 1.041) and Deming 1.017 (0.995 to 1.039). At 130 mmHg, Deming puts the cuff 1.2 mmHg below mercury (0.9 to 1.6). The CUSUM test finds no curvature (p = 0.88). Passing-Bablok used all 8,850,570 pairwise slopes.

Data: CDC/NCHS, NHANES 2017-2018 files BPX_J, BPXO_J and DEMO_J (public domain); not survey-weighted, so these describe the sample, not the U.S. population. The NCHS report on the study (Ostchega et al. 2021) has the official analysis.

Questions

Why not just use ordinary least squares or the correlation?

Least squares assumes the x method has no error. When both methods have error, its slope is pulled toward zero, so it reports a proportional difference that is not there. On the NHANES blood-pressure example the least-squares slope is 0.87 while Passing-Bablok and Deming give 1.02. A high correlation only says the two methods rise together; two methods can correlate at 0.99 and still differ by a clinically important amount.

Passing-Bablok or Deming?

Deming regression assumes normally distributed errors with a known ratio of the two methods' error variances (lambda, 1 by default) and gives standard errors that make the bias at any level easy to compute. Passing-Bablok makes no assumption about the error distribution and resists outliers, but needs the two methods to be strongly positively correlated and a linear relationship, which the CUSUM test checks. The tool shows both; when they disagree, look at the outliers and the Bland-Altman plot.

What is lambda, the error-variance ratio?

Lambda is the variance of the new method's measurement error divided by the comparison method's. If you know each method's repeatability standard deviation, from replicate measurements, enter both and the tool sets lambda to their squared ratio. With lambda 1 and the same scale, Deming regression is orthogonal regression.

When should I use weighted Deming or percentage differences?

When the scatter grows with the level, as with many lab assays where the error is a constant percentage. The tool tests whether the size of the differences rises with the mean and says so. Weighted Deming (Linnet 1990) weights each sample by one over its level squared, and the percentage Bland-Altman plot expresses the limits as percentages.

How do I read the result at a decision level?

Enter the values where a decision changes, such as a diagnostic cut-off. For each, the tool gives the expected difference between the methods there (intercept plus (slope minus 1) times the level) with a 95% interval: from the Deming jackknife, and for up to 500 pairs from a bootstrap of Passing-Bablok. Compare it with the difference you could accept; that limit comes from your field, not from this tool.

How many samples can it handle?

Up to 20,000 pairs. Passing-Bablok needs the median of every pairwise slope, which is 8,850,570 slopes for the NHANES example; instead of listing them, the tool counts how many fall below a trial value with a merge-sort inversion count and bisects, so the whole analysis takes one to two seconds. Below 600 pairs it sorts every slope, and the tests check that both ways give the same answer.

Is my data uploaded anywhere?

No. Every number is computed by JavaScript in this browser tab. There are no accounts, cookies or analytics vendors.

Method and citation

Passing-Bablok (Passing & Bablok 1983). Every pairwise slope except identical points and slopes of exactly −1; pairs with the same x count as infinite. The slope is the median shifted by K, the number of slopes below −1, which makes it symmetric in x and y. The confidence interval takes the slopes at ranks K + M1 and K + M2, M1 = round((N − C)/2), M2 = N − M1 + 1, C = z √(n(n−1)(2n+5)/18). The intercept is the median of y − bx, its interval from the slope's limits. Readings with up to 9 decimals are scaled to integers first, so ties and slopes of −1 are found exactly. Above 600 pairs, each order statistic is found by bisection on the slope t, counting slopes below t as the inversions between the order of x and the order of y − tx (the counting idea of Dillencourt, Mount & Netanyahu 1992).

CUSUM linearity test (Passing & Bablok 1983). Points above the line score √(L/l), points below −√(l/L); summed in order along the line, the largest absolute sum over √(l + L + 1) is compared with the Kolmogorov distribution. With the line fitted to the same points this is conservative: in simulation it raised at most 0.1% false alarms at the nominal 5%, and caught a moderate curve 87.8% of the time.

Deming regression (Cornbleet & Gochman 1979) with λ = error variance of y over error variance of x. Weighted Deming (Linnet 1990): weights 1/level² from the estimated true values, iterated to convergence. Standard errors by the jackknife (Linnet 1990, 1993), intervals with Student's t on n − 2 degrees of freedom; the difference at a level Xc is a + (b − 1)Xc with its standard error from the jackknife covariance of a and b.

Bland-Altman (1986, 1999). Differences y − x (or percentages of the pair's mean) against the pair's mean; bias, SD, limits bias ± 1.96 SD; standard errors s/√n for the bias and √(3s²/n) for each limit, t on n − 1 degrees of freedom; trend tests of the differences, and of their size, on the mean. Kendall's tau-b by Knight's (1966) O(n log n) method.

Checked against an independent Python reference (eval/make_reference.py): Deming by its closed form in numpy (agreeing to 1e-10) and by scipy's iterative orthogonal distance regression (to its own tolerance, about 1e-5), weighted Deming by a separate iteration and by orthogonal regression at the final weights, the jackknife by refitting each leave-one-out set from scratch, Passing-Bablok by listing every slope in exact fractions (to 1e-12), and Kendall's tau from scipy, on 33 generated data sets and the 4,212 NHANES pairs. The 1986 paper's peak-flow example gives its published bias and limits. On 1,000 simulated data sets of 60 pairs with constant error, the 95% intervals covered the true slope 95.5% (Deming) and 95.4% (Passing-Bablok) of the time.

@article{passing1983new, author={Passing, H. and Bablok, W.}, title={A new biometrical procedure for testing the equality of measurements from two different analytical methods}, journal={Journal of Clinical Chemistry and Clinical Biochemistry}, volume={21}, number={11}, pages={709--720}, year={1983}, doi={10.1515/cclm.1983.21.11.709}}
@article{cornbleet1979incorrect, author={Cornbleet, P. J. and Gochman, N.}, title={Incorrect least-squares regression coefficients in method-comparison analysis}, journal={Clinical Chemistry}, volume={25}, number={3}, pages={432--438}, year={1979}, doi={10.1093/clinchem/25.3.432}}
@article{linnet1990estimation, author={Linnet, Kristian}, title={Estimation of the linear relationship between the measurements of two methods with proportional errors}, journal={Statistics in Medicine}, volume={9}, number={12}, pages={1463--1473}, year={1990}, doi={10.1002/sim.4780091210}}
@article{linnet1993evaluation, author={Linnet, Kristian}, title={Evaluation of regression procedures for methods comparison studies}, journal={Clinical Chemistry}, volume={39}, number={3}, pages={424--432}, year={1993}, doi={10.1093/clinchem/39.3.424}}
@article{bland1986statistical, author={Bland, J. Martin and Altman, Douglas G.}, title={Statistical methods for assessing agreement between two methods of clinical measurement}, journal={The Lancet}, volume={327}, number={8476}, pages={307--310}, year={1986}, doi={10.1016/S0140-6736(86)90837-8}}
@article{bland1999measuring, author={Bland, J. Martin and Altman, Douglas G.}, title={Measuring agreement in method comparison studies}, journal={Statistical Methods in Medical Research}, volume={8}, number={2}, pages={135--160}, year={1999}, doi={10.1177/096228029900800204}}
@article{knight1966computer, author={Knight, William R.}, title={A computer method for calculating Kendall's tau with ungrouped data}, journal={Journal of the American Statistical Association}, volume={61}, number={314}, pages={436--439}, year={1966}, doi={10.1080/01621459.1966.10480879}}
@article{sen1968estimates, author={Sen, Pranab Kumar}, title={Estimates of the regression coefficient based on Kendall's tau}, journal={Journal of the American Statistical Association}, volume={63}, number={324}, pages={1379--1389}, year={1968}, doi={10.1080/01621459.1968.10480934}}
@article{dillencourt1992randomized, author={Dillencourt, Michael B. and Mount, David M. and Netanyahu, Nathan S.}, title={A randomized algorithm for slope selection}, journal={International Journal of Computational Geometry \& Applications}, volume={2}, number={1}, pages={1--27}, year={1992}, doi={10.1142/S0218195992000020}}

Limits: up to 20,000 pairs, one value per method per sample (average replicates first). No regression-based or log-scale limits of agreement, no repeated-measures Bland-Altman, no outlier rule; Passing-Bablok intervals at decision levels are bootstrapped up to 500 pairs.