The Line and the Cloud

View this presentation on a computer

This presentation contains detailed figures and interactive controls. Open this page on a computer for a readable view.

Back to lectures

The Line and the Cloud

A visual guide to regression models
in clinical chemistry

Filip Landgren

Sir Francis Galton
Figure 1. Sir Francis Galton

Sir Francis Galton

1822–1911

Darwin's half-cousin and a Victorian polymath whose work spanned heredity, meteorology and statistics. He measured the heights of parents and children, tabulated their frequencies in a grid and found elliptical contours.

The ellipse's shape became his measure of association: a narrow ellipse around a line indicates a strong linear relationship when the axis scales are held fixed. This was correlation, barely a decade before Pearson formalised r (1895–96).

Galton's ellipse

Galton 1886, Plate X: ellipse diagram of the heights of parents and children
Figure 2. Plate X from Regression towards Mediocrity in Hereditary Stature (1886).

What is r?

Figure 3. r describes the shape of the cloud, not a line through it.

Restriction of range

Figure 4. Correlation depends on the range of values we examine.

Correlation ≠ agreement

Figure 5. High correlation does not mean that the methods give the same results.

Is a mean bias of 16 the whole story?

Figure 6. The difference between the methods increases with concentration.

OLS: the invisible default

Figure 7. OLS minimises the sum of squared vertical residuals.

Deming: the principled default

Figure 8. Deming accounts for measurement error in both methods.

Passing–Bablok: the robust alternative

Figure 9. Passing–Bablok is based on ranked pairwise slopes.

Regression dilution

Figure 10. Measurement error in x attenuates the OLS slope.

Model convergence

Figure 11. OLS, Deming and Passing–Bablok with adjustable correlation.

The role of regression

Slope ≠ 1: proportional bias

Intercept ≠ 0: constant bias

R² = 1 − SSres / SStot

SSres: the sum of the squared vertical distances from the points to the regression line — the residual variation.

SStot: the sum of the squared deviations of the y values from their mean — the total variation.

R² = 0.90 means that the residual sum of squares is 10% of the total sum of squares.

r measures linear association. R² = r² holds for simple OLS regression with an intercept.

Can you see a difference?

Figure 12. Anscombe’s quartet: four different patterns with the same summary statistics.

Regression models have no eyes

Figure 13. Different point patterns with the same summary statistics.
Ptolemy's geocentric model with epicycles
Figure 14. Geocentric model with epicycles.

All models are geocentric

Identical statistics can hide entirely different realities, and a model with the wrong assumptions can still predict well.

Ptolemy's epicycles predicted planetary positions with high precision. The ontology was wrong.

"All regression models are geocentric, but not equally geocentric. The assumptions about error structure decide which slope you get."

Constant SD or constant CV?

−120124080120160Concentration (units)Residual (units)

Constant SD

Roughly the same absolute scatter.

−120124080120160Concentration (units)Residual (units)

Constant CV

Scatter grows with concentration.

Figure 15. Illustrative residuals around a correctly specified linear relationship: the same noise pattern on different scales.

Three approaches, different assumptions

Weighted Deming

Models measurement error in both methods. With constant CV, the model uses concentration-dependent variances.

Imprecision data inform the error model. High concentrations should not dominate simply because their absolute variance is larger.

Log scale

Can stabilise proportional scatter when values are positive, but also changes the form of the relationship.

log y = α + β log x
y = eαxβ

Passing–Bablok

Built on ranked pairwise slopes. A robust alternative, with assumptions of its own.

Robustness is no substitute for examining outliers, linearity and error structure.

may be consideredwith outliers

Why the choice of model matters

  • r measures linear association, not agreement, bias or interchangeability.
  • OLS ignores measurement error in x. Classical, independent measurement error in x attenuates the slope.
  • Deming accounts for error in both methods, as required when comparing two measurement procedures.
  • Passing–Bablok is robust, but robustness is not always an advantage. The method does not use imprecision data and rests on a hidden assumption about the error ratio.
  • When the measurement error is small relative to the measuring interval, the models converge, but model choice depends on the error structure, not the value of r.

From scatter plots to method decisions

  1. Plot the data. Examine the relationship, differences, outliers and measuring interval.
  2. Assess the error structure. SD, CV and imprecision in both methods.
  3. Choose the model. Check linearity and the relevant assumptions.
  4. Estimate bias and uncertainty at clinically relevant levels.
  5. Compare with predefined requirements. Is the evidence sufficient?

Acceptance criteria are set before the study.

References

  • CLSI EP09c, 3rd ed. 2018. Measurement Procedure Comparison and Bias Estimation Using Patient Samples. Ch. 6.2 (choice of regression), app. B (weighted Deming), app. G (r and the x range), app. I (Passing–Bablok), app. K (CIs for bias).
  • Linnet K. Performance of Deming regression analysis in case of misspecified analytical error ratio. Clin Chem 1998;44:1024–31.
  • Linnet K. Necessary sample size for method comparison studies based on regression analysis. Clin Chem 1999;45:882–94.
  • Stöckl D, Dewitte K, Thienpont LM. Validity of linear regression in method comparison studies. Clin Chem 1998;44:2340–6.
  • Passing H, Bablok W. J Clin Chem Clin Biochem 1983;21:709–20 (Part I) and 1984;22:431–45 (Part II).
  • Baumdicker F, Hölker U. Stat Probab Lett 2020;164:108801.
  • Galton F. Regression towards mediocrity in hereditary stature. J Anthropol Inst 1886;15:246–63.
  • Anscombe FJ. Am Stat 1973;27:17–21. Matejka J, Fitzmaurice G. Same stats, different graphs. CHI 2017.
  • Bland JM, Altman DG. Measuring agreement in method comparison studies. Stat Methods Med Res 1999;8:135–160. NIST Dataplot: Passing Bablok Fit.
  • McElreath R. Statistical Rethinking, 2nd ed. 2020, ch. 4.
"The task is not so much to see what no one has yet seen, but to think what nobody has yet thought about that which everybody sees."

Arthur Schopenhauer, Parerga und Paralipomena (1851)

Filip Landgren

filip.landgren@gmail.com
https://klinkemipedia.se