Learn R Programming

MethodCompare (version 0.1.2)

bland_altman_plot: Extended Bland-Atlman limits of agreement (LoA) plot

Description

This function produces the extended Bland-Altman Limits of Agreement (LoA) plot when there are repeated measurements with possibly heteroscedastic variance of measurement errors.

Usage

bland_altman_plot(data, new = "y1", Ref = "y2", ID = "id", fill = TRUE)

Arguments

data

a dataframe contains the object identification number (id), the measurement values from the new measurement method (y1) and those from the reference standard (y2)

new

specify the variable name or location for the new measurement method

Ref

specify the variable name or location for the reference measuerment method

ID

specify the variable name for location for the subject identification number (id)

fill

logical. if TRUE use the average value for new methods to fill out the missing value (only useful for drawing a plot with all the measurements by the reference standard)

Author

Mingkai Peng & Patrick Taffé

Details

This functions computes the limits of agreement (LoA) when there are repeated measurements and possibly heteroscedastic variance of measurement errors

Examples

Run this code
### Load the data
data(data1)
### Bland and Altman's plot
bland_altman_plot(data1)

Run the code above in your browser using DataLab