Skip to content

josesho/bland_altman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Producing Bland-Altman plots in Python

Requires matplotlib (2.1.0) and numpy (1.12.1).

Introduction

From the Wikipedia article: A Bland–Altman plot ... is a method of data plotting used in analyzing the agreement between two different assays.

Bland and Altman et al. has been cited over 20,000 times.

Usage

  • Place bland_altman.py in your working directory.
  • To load the function into your Python script or Jupyter notebook, run
    from .bland_altman import bland_altman_plot

Example

from .bland_altman import bland_altman_plot
import numpy as np

# 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)

my_bland_altman_plot = bland_altman_plot(m1, m2)

This should produce the following image.

A Bland-Altman plot

About

Python code to generate Bland-Altman plots

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages