Bland-Altman
Create Bland-Altman plot
Minimum Origin Version Required: 2020b
1.plot_BA -r 1 irng:=[Book1]Sheet1!(C"RV",D"IC",A"Subj.") diff:=1 trplot.fillloa:=1 trplot.fillcil:=0;
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input | irng |
Input Range |
|
Specify data ranges of Method1, Method2, and Subject, in sequence. Subject column is optional.
Option list:
|
X Axis | xaxis |
Input int |
|
Specify the values used for X axis.
Option list:
|
Y Axis | yaxis |
Input int |
|
Specify the values used for Y axis.
Option list:
|
SD Multiplier for LoA | sd |
Input double |
|
Specify the multiplier factor of Standard Deviation for Limits of Agreement method. |
Confidence Level in % | conf |
Input double |
|
Specify the confidence level in percentage. |
True Value is Constant | trueval |
Input int |
|
Checking this option to use One Way Anova to get mean square for the residual for two methods separately. Available only when Subject is specified. |
Plot Each Subject as One Bubble | bubble |
Input int |
|
Available only when Subject is specified. Specify whether to plot each subject as one bubble.
When it is selected, bubble size is mapped to number of replicates for each subject. Otherwise, each data point is plotted as one symbol, and its color and shape is mapped to Subject column. |
Mean Difference (bias) Estimation | diff |
Input int |
|
Available only when Subject is specified. When True Value is Constant is checked, Mean Difference Estimation uses subject differenct.
Option list:
|
Confidence Interval Estimation for LoA | interval |
Input int |
|
Available only when Subject is specified.
Option list:
|
Lines and Fills | trplot |
Input TreeNode |
|
Check to show the desired reference lines and color-filled area.
See details in the next table. |
Mean of Pairwise Means | mpm |
Input int |
|
Mean of all pair-wise means: 0=false, 1=true. |
Bland-Altman Ratio | ratio |
Input int |
|
Calculated as 0.5*(upper LoA - lower LoA)/mpm: 0=false, 1=true. |
Output Results | rd |
Output ReportData |
|
Specify the range of output data for plotting. |
This trplot tree specifies all supported reference lines and filled intervals.
Syntax: trplot.Treenode:=<value>
Example: trplot.fillloa:=1
Treenode | Label | Type | Default | Description |
---|---|---|---|---|
mean | Mean | int | 1 | Line of Mean value. |
equality | Line of Equality (Difference=0) | int | 1 | Line of Equality (Difference=0). |
Limits of Agreement | int | 1 | Limits of Agreement | |
fillloa | Fill Between LoA | int | 0 | Fill interval area between LoA. |
cim | CI of Mean | int | 0 | Lines of upper and lower limits of confidence interval of mean. The confidence level is specified in Confidence Level in %. |
fillcim | Fill Between CI of Mean | int | 1 | Fill area between confidence interval of mean. The confidence level is specified by Confidence Level in %. |
cil | CI of Limits of Agreement | int | 0 | Lines of limits of Agreement |
fillcil | Fill Between CI of LoA | int | 1 | Fill area between confidence interval of limits of Agreement. The confidence level is specified by Confidence Interval Estimation for LoA. |
This X-Function is used to create the Bland-Altman plot. A Bland-Altman plot is a graphic display of difference between two methods. It is typically plotting the differences of two methods against their mean, with mean difference and 95% confidence intervals for comparison.
Also see menu deails here.
It is assumed that the repeated differences for a single subject are independent in this case. One way ANOVA is used to calculate mean square of the residual (measurement error) for differences of two methers.
where is the number of subjects,
is number of observations on subject i. If all the subjects have the same number of observations, m, this factor reduces to m.
Total Variance for Single Differences on Different Subjects = Mean Square of Error + Average Difference across Subjects
Standard Deviation = Square Root of Total Variance for Single Differences on Different Subjects
Mean = mean of the individual differences
One Way Anova is used to get mean square for the residual (measurement error) for two methods separately.
If the Multiplier of observations on each subjects are the same, the above formula can be simplified as:
Standard Deviation = square root of (variance of differences between subject means + Multiplier of method1 * mean square of error of method1 + Multiplier of method2 * mean square of error of method2)
Mean = mean of the individual differences
Bland & Altman (2007)