3

I am trying to get Bland-Altman Statistics in python similar to what we get in R. However I haven't found nothing about this. I already have the Bland-Altman plot in python. I am especially interested in Bias and Limits of agreement. Thank you.

This is what I get from R:

Standard deviation of bias:  6.52818 

Standard error of bias:  0.06593449 
Standard error for limits of agreement:  0.1126868 

Bias:  -5.855469e-13 
Bias- upper 95% CI:  0.1292452 
Bias- lower 95% CI:  -0.1292452 

Upper limit of agreement:  12.79523 
Upper LOA- upper 95% CI:  13.01612 
Upper LOA- lower 95% CI:  12.57434 ```



  • Does this answer your question? [Bland-Altman plot in Python](https://stackoverflow.com/questions/16399279/bland-altman-plot-in-python) – dallonsi Oct 11 '21 at 08:31
  • 1
    *I already have the Bland-Altman plot in python* what informations does it hold? – Daweo Oct 11 '21 at 08:32
  • The information I have with the plot is mean and SD of the differences (y-axis) plotted with mean of the two methods (x-axis). – Carla Martins Oct 11 '21 at 08:57
  • Thank you Daweo! Your comment make me realize how I can extract the information from the plot, of calculate it with simple calculations! In fact it take me some time because my mean differences are really small (like 5.78x10^-13), and difficult to see in the plot. – Carla Martins Oct 11 '21 at 11:32

1 Answers1

0

The Bias can be calculated as mean of differences between method 1 and method 2, and the limits of agreement as + or - 1.96SD of the mean of differences between method 1 and method 2.

differences = method_1 - method_2
mean_differences = statistics.mean(differences)
stdev_differences = statistics.stdev(differences)