README.md

Bland-Altman

Description

Bland-Altman analysis and plot

To install GitHub R packages:

# Only the first time or to upgrade:
install.packages("devtools")
library(devtools)
install_github("sauthiem/BlandAltman")

# Every time before use
library(BlandAltman)

Example:

# Any numerical vector. x and y have to be the same length.
a <- rpois(100, 10)
b <- rpois(100, 10)

# Plot
BA.plot(a, b, title="Simulated vs observed data", percent=T, reference="mean", conf.int=0.95)

# Numbers
ba <- BA.analysis(a, b, percent=F)
str(ba)

# Agreement
agreement(a, b)


BA Example

List of 16
 $ x                         : num [1:100] 10.5 10 9 10 9.5 12.5 8.5 8.5 14 12.5 ...
 $ y                         : num [1:100] -3 -6 2 8 5 -9 -5 -3 2 -3 ...
 $ bias                      : num -0.54
 $ bias.ci                   : num 0.867
 $ bias.ci.lower             : num -1.41
 $ bias.ci.upper             : num 0.327
 $ limit.agrmt.ci            : num 1.5
 $ limit.agrmt.upper         : num 8.03
 $ limit.agrmt.upper.ci.upper: num 9.53
 $ limit.agrmt.upper.ci.lower: num 6.52
 $ limit.agrmt.lower         : num -9.11
 $ limit.agrmt.lower.ci.upper: num -7.6
 $ limit.agrmt.lower.ci.lower: num -10.6
 $ percentage.error          : num 8.1
 $ n                         : int 100
 $ conf.int                  : num 0.95

Parameters

List returned elements:

References:

1) Bland, J.M. & Altman, D.G., 1986. Statistical methods for assessing agreement between two methods of clinical measurement. Lancet, 1(8476), pp.307–310. 2) Giavarina, D., 2015. Understanding Bland Altman analysis. Biochemia Medica, 25(2), pp.141–151



sauthiem/BlandAltman documentation built on May 7, 2021, 11:05 p.m.