limitsOfAgreement
statistics: LoA = limitsOfAgreement (X, Y)
statistics: LoA = limitsOfAgreement (X, Y, name, value)
statistics: [LoA, stats] = limitsOfAgreement (…)
Bland-Altman limits of agreement between two measurement methods.
LoA = limitsOfAgreement (X, Y) compares two
methods that measured the same subjects, the measurements of the first in
the vector X and of the second, in the same order, in Y. With
d = X - Y the differences, dbar their mean and
s their standard deviation, the bias of the first method against
the second is dbar and the limits of agreement are
dbar - 1.96 * s and dbar + 1.96 * s, between which about 95%
of the differences between the methods fall when the differences are
normal. Two methods
agree well enough to be used in place of one another when the limits are
too close to matter in practice, a judgement the data cannot make.
LoA is a table with the rows Bias, LowerLimit and
UpperLimit and the variables Estimate and
ConfidenceIntervals, each row’s confidence interval at the level
100 (1 - alpha) percent: dbar + [-1, 1] * t * s / sqrt (n)
for the bias and [-1, 1] * t * sqrt (3 * s^2 / n) about each limit,
t being the 1 - alpha / 2 quantile of Student’s t
distribution on n - 1 degrees of freedom and n the number of
subjects (Bland and Altman, 1986). X and Y are vectors of
type double or single, of the same length, and a subject with a missing
value (NaN) in either is left out. Where either is single, so are
the results.
The following Name-Value pairs are supported:
| Name | Value |
|---|---|
'Multiplier' | The number of standard deviations from the bias to each limit, a positive scalar. The default is 1.96, which Bland and Altman use. |
'Alpha' | The significance level of the confidence intervals, a scalar in the range (0,1). The default is 0.05. |
[LoA, stats] = limitsOfAgreement (…) also returns
a structure with the fields sd, the standard deviation of the
differences, n, the number of subjects, differences and
means, the difference and the mean of the two measurements of each
subject, which blandAltmanPlot draws.
The bias with its interval is the paired mean difference of
meanEffectSize. MATLAB has no limits of agreement, so
limitsOfAgreement is specific to Octave.
Reference: J. M. Bland and D. G. Altman. Statistical methods for assessing agreement between two methods of clinical measurement. The Lancet, 327(8476):307–310, 1986.
See also: blandAltmanPlot, meanEffectSize, cohenKappa
Source Code: limitsOfAgreement
Two meters measured the peak expiratory flow of 17 subjects
x = [494, 395, 516, 434, 476, 557, 413, 442, 650, 433, 417, 656, 267, ...
478, 178, 423, 427];
y = [512, 430, 520, 428, 500, 600, 364, 380, 658, 445, 432, 626, 260, ...
477, 259, 350, 451];
LoA = limitsOfAgreement (x, y)
LoA =
3x2 table
Estimate ConfidenceIntervals
________ ____________________
Bias -2.11765 -22.0488 17.8135
LowerLimit -78.0973 -112.619 -43.5755
UpperLimit 73.862 39.3402 108.384