Bland-Altman plots for Python
Project description
A Python module to generate `Bland-Altman <https://en.wikipedia.org/wiki/Bland–Altman_plot>`_ plots to compare two measurements.
::
blandAltman(data1, data2, limitOfAgreement=1.96, confidenceInterval=None, confidenceIntervalMethod='exact paired', detrend=None, **kwargs)
Generate a Bland-Altman [#]_ [#]_ plot to compare two sets of measurements of the same value.
`data1` and `data2` should be 1D numpy arrays of equal length containing the paired measurements.
Confidence intervals on the limit of agreement may be calculated using:
- 'exact paired' uses the exact paired method described by Carkeet [#]_
- 'approximate' uses the approximate method described by Bland & Altman
The exact paired method will give more accurate results when the number of paired measurements is low (approx < 100), at the expense of much slower plotting time.
The *detrend* option supports the following options:
- ``None`` do not attempt to detrend data - plots raw values
- 'Linear' attempt to model and remove a multiplicative offset between each assay by linear regression
.. [#] Altman, D. G., and Bland, J. M. “Measurement in Medicine: The Analysis of Method Comparison Studies” Journal of the Royal Statistical Society. Series D (The Statistician), vol. 32, no. 3, 1983, pp. 307–317. `JSTOR <https://www.jstor.org/stable/2987937>`_.
.. [#] Altman, D. G., and Bland, J. M. “Measuring agreement in method comparison studies” Statistical Methods in Medical Research, vol. 8, no. 2, 1999, pp. 135–160. `DOI <https://doi.org/10.1177/096228029900800204>`_.
.. [#] Carkeet, A. "Exact Parametric Confidence Intervals for Bland-Altman Limits of Agreement" Optometry and Vision Science, vol. 92, no 3, 2015, pp. e71–e80 `DOI <https://doi.org/10.1097/OPX.0000000000000513>`_.
::
blandAltman(data1, data2, limitOfAgreement=1.96, confidenceInterval=None, confidenceIntervalMethod='exact paired', detrend=None, **kwargs)
Generate a Bland-Altman [#]_ [#]_ plot to compare two sets of measurements of the same value.
`data1` and `data2` should be 1D numpy arrays of equal length containing the paired measurements.
Confidence intervals on the limit of agreement may be calculated using:
- 'exact paired' uses the exact paired method described by Carkeet [#]_
- 'approximate' uses the approximate method described by Bland & Altman
The exact paired method will give more accurate results when the number of paired measurements is low (approx < 100), at the expense of much slower plotting time.
The *detrend* option supports the following options:
- ``None`` do not attempt to detrend data - plots raw values
- 'Linear' attempt to model and remove a multiplicative offset between each assay by linear regression
.. [#] Altman, D. G., and Bland, J. M. “Measurement in Medicine: The Analysis of Method Comparison Studies” Journal of the Royal Statistical Society. Series D (The Statistician), vol. 32, no. 3, 1983, pp. 307–317. `JSTOR <https://www.jstor.org/stable/2987937>`_.
.. [#] Altman, D. G., and Bland, J. M. “Measuring agreement in method comparison studies” Statistical Methods in Medical Research, vol. 8, no. 2, 1999, pp. 135–160. `DOI <https://doi.org/10.1177/096228029900800204>`_.
.. [#] Carkeet, A. "Exact Parametric Confidence Intervals for Bland-Altman Limits of Agreement" Optometry and Vision Science, vol. 92, no 3, 2015, pp. e71–e80 `DOI <https://doi.org/10.1097/OPX.0000000000000513>`_.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyCompare-1.0.0.tar.gz
(5.7 kB
view details)
File details
Details for the file pyCompare-1.0.0.tar.gz
.
File metadata
- Download URL: pyCompare-1.0.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a762a0505647e30fa4e62372c9c07aa8d512b984ccaeea423455d6797dcf1f2c |
|
MD5 | 948e95ad54763eb029178fe72d823e20 |
|
BLAKE2b-256 | d8509418e8f8d8efcb63d3ca231d292496377985b041e8738c5b4733107fb48e |