Learn R Programming

PairedData (version 0.5)

plotBA: Bland-Altman plot

Description

Produce a Bland-Altman plot for paired data, including a confidence region for the mean of the differences.

Usage

plotBA(df,condition1,condition2,groups=NULL,facet=TRUE,...)

Arguments

df
Data frame
condition1
name of the variable corresponding to measurements in the "first" condition
condition2
name of the variable corresponding to measurements in the "second" condition
groups
name of the variable corresponding to groups
facet
In case of groups, faceting (TRUE) or overplotting (FALSE)
...
Arguments to be passed to methods, such as graphical parameters (see par)

References

  • J.M. Bland and D.G. Altman. Measuring agreement in method comparison studies. Statistical Methods in Medical Research, 8, 135-160, 1999.
  • D.M. Meek. Two macros for producing graphs to assess agreement between two variables. In Proceedings of Midwest SAS Users Group Annual Meeting, October 2007.

See Also

tmd

Examples

Run this code
data(PrisonStress)
plotBA(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter")
plotBA(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter",groups="Group")
plotBA(df=PrisonStress,condition1="PSSbefore",condition2="PSSafter",groups="Group",facet=FALSE)

Run the code above in your browser using DataLab