# SAS Bland-Altman Analysis | SAS Bland Altman Plot

Job-ready Online Courses: Dive into Knowledge. Learn More!

We looked at t-tests, correlation and regression in the previous tutorials, today we will be looking at another process called SAS Bland Altman Analysis and how to create SAS Bland Altman plot.

At last, we will discussÂ PROC SGPLOT Procedure in SASÂ Programming Language with SAS Bland Altman Plot example.

So let us get started.

## What is SAS Bland Altman Analysis

SAS Bland-Altman analysis is not a statistical test, instead, it is a process used to assess agreement between two methods of measurement.

An important requirement of the Bland-Altman method for measuring agreement is that the two methods for measuring the same characteristic use the same scale of measurement.Â  This implies that when plotted, the points should line up along theÂ lineÂ yÂ =Â x (line of identity).Â

SAS Bland Altman analysis is based on examination of two plots:Â

1. Plot of identity: A scatterplot of the two measurements along with the lineÂ y = x.Â If the measurements are in basic agreement then the points in the scatterplot will line up closer to the lineÂ y = x.Â Â
1. Bland-Altman plot:Â A scatterplot of variable means plotted on the horizontal axis and the differences plotted on the vertical axis which shows the amount of disagreement between the two measures and lets you see how this disagreement relates to the magnitude of the measurements.Â  SAS Blend Altman plot includes approximate 95% limits.

## SAS PROC SGPLOT Procedure

We create a SAS Bland Altman plot by first calculating the mean, upper limit and lower limit of the variable values. We then use PROC SGPLOT to create the Bland Altman plot in SAS.

SAS Proc SGPLOT Syntax-

```PROC SGPLOT DATA = dataset;
SCATTER X=variable Y=Variable;
REFLINE value;```

Here scatter will create a scatterplot like we saw earlier an refline will create a reference line either on horizontal or vertical axis.

## SAS Bland Altman Plot

In the below example we calculate the differences in the values of the variables and also the mean of the variables of the same observation. We also calculate the standard deviation values to be used in the upper and lower limit of the calculation.

SAS Bland Altman PlotÂ Example-

```dataÂ  temp;
input new old;
datalines;
23 34
23 14
16 77
35 85
23 80
27 15
30 11
26 42
37 35
20 9
34 54
61 67
45 25
77 64
45 53
;Â
data differ ;
setÂ  temp ;
/* calculate the difference */
diff=new-old ;
/* calculate the average */
mean=(new+old)/2 ;
run ;
proc print data=differs;
run;Â
proc sql noprint ;
select mean(diff)-2*std(diff),Â  mean(diff)+2*std(diff)
intoÂ Â  :lower,Â  :upper
from differs ;
quit;Â
proc sgplot data=differs ;
scatter x=mean y=diff;
refline 0 &upper &lower ;
TITLE 'Bland-Altman Plot';
run ;
quit ;```

a. An enhanced version of the SAS Bland Altman plot
In the enhanced version, the curve is fitted.

Example-

```proc sgplot data=differs;
reg x = new y = diff;
needle x= new y=diff;
refline 0;
TITLE 'Enhanced Bland-Altman Plot';
run;
quit;```

This was all about SAS Bland Altman Analysis Tutorial. Hope you like our explanation of SAS Bland Altman Plot.

## Conclusion

Hence, we hope you all understood what is SAS Bland-Altman analysis and how can we create a SASÂ bland Altman plot. We also saw how the plot can be enhanced.

For any queries post your doubts in the comments section below and stay tuned to learn more interesting things in SAS Programming Language.

Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

DataFlair Team

The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.