statsmodels.graphics.agreement.mean_diff_plot(m1, m2, sd_limit=1.96, ax=None, scatter_kwds=None, mean_line_kwds=None, limit_lines_kwds=None)
[source]
Tukey’s Mean Difference Plot.
Tukey’s Mean Difference Plot (also known as a BlandAltman plot) is a graphical method to analyze the differences between two methods of measurement. The mean of the measures is plotted against their difference.
For more information see https://en.wikipedia.org/wiki/BlandAltman_plot
Parameters: 


Returns: 
fig – If 
Return type: 
matplotlib Figure 
Bland JM, Altman DG (1986). “Statistical methods for assessing agreement between two methods of clinical measurement”
Load relevant libraries.
>>> import statsmodels.api as sm >>> import numpy as np >>> import matplotlib.pyplot as plt
Making a mean difference plot.
>>> # Seed the random number generator. >>> # This ensures that the results below are reproducible. >>> np.random.seed(9999) >>> m1 = np.random.random(20) >>> m2 = np.random.random(20) >>> f, ax = plt.subplots(1, figsize = (8,5)) >>> sm.graphics.mean_diff_plot(m1, m2, ax = ax) >>> plt.show()
(Source code, png, hires.png, pdf)
© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.graphics.agreement.mean_diff_plot.html