Carla Martins
Carla Martins

Reputation: 31

Bland-Altman Statistics in Python

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 ```



Upvotes: 3

Views: 510

Answers (1)

Carla Martins
Carla Martins

Reputation: 31

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)

Upvotes: 0

Related Questions