Function to generate Bland Altman plots. Barry Greene, September 2008
Bland, J.M., Altman, D.G. 'Statistical methods for assessing agreement ...
between two methods of clinical measurement'(1986) Lancet, 1 (8476), pp. 307-310.
Inputs: data1: Data from first instrument
data2: Data from second instument
Outputs: data_mean: Mean of data recorded by both instruments
data_diff: Difference of data recorded by both instruments
md: Mean difference
sd: Standard deviation of difference
Produces Bland Altman plot with mean difference and mean difference +/-
2*SD difference lines.
The calculation for 1.96 SD level is wrong in the code. Easy to fix, please fix it.
Unfortunately, I cannot rate this entry positively. The input handling is bad (try e.g. bland_altman(1:10,1:10). Some required functions aren't provided. Therefore not useful, especially since there are other entries on the File Exchange offering the same functionality.
I think your calculation of the CR is off (standard deviation is usually corrected by N-1 when using the sample-population. Cf. http://www.medcalc.org/manual/blandaltman.php)
Standard deviation lines are incorrect if the mean of the data is negative.
You didn't provide mean_nan.m and std_nan.m needed by bland_altman.m. Can you please also post them? Thanks.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.