Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mdplot

Mean-Difference Plot


Description

Creates a mean-difference plot of two columns of a matrix.

Usage

mdplot(x, columns=c(1,2), xlab="Mean", ylab="Difference", main=NULL, ...)

Arguments

x

numeric matrix with at least two columns.

columns

which columns of x to compare. Plot will display second minus first.

xlab

label for the x-axis.

ylab

label for the y-axis.

main

title of the plot. Defaults to

...

any other arguments are passed to plotWithHighlights.

Details

Plots differences vs means for a set of bivariate values. This is a generally useful approach for comparing two correlated measures of the same underlying phenomenon. Bland and Altman (1986) argue it is more information than a simple scatterplot of the two variables. The bivariate values are stored as columns of x.

Value

A plot is created on the current graphics device.

Author(s)

Gordon Smyth

References

Cleveland, W. S., (1993). Visualizing Data. Hobart Press.

Bland, J. M., and Altman, D. G. (1986). Statistical methods for assessing agreement between two methods of clinical measurement. Lancet 327, 307-310.

See Also

plotMD is an object-oriented implementation of mean-difference plots for expression data.

An overview of diagnostic functions available in LIMMA is given in 09.Diagnostics.

Examples

x1 <- runif(100)
x2 <- (x1 + rnorm(100,sd=0.01))^1.2
oldpar <- par(mfrow=c(1,2))
plot(x1,x2)
mdplot(cbind(x1,x2),bg.pch=1,bg.cex=1)
par(oldpar)

limma

Linear Models for Microarray Data

v3.46.0
GPL (>=2)
Authors
Gordon Smyth [cre,aut], Yifang Hu [ctb], Matthew Ritchie [ctb], Jeremy Silver [ctb], James Wettenhall [ctb], Davis McCarthy [ctb], Di Wu [ctb], Wei Shi [ctb], Belinda Phipson [ctb], Aaron Lun [ctb], Natalie Thorne [ctb], Alicia Oshlack [ctb], Carolyn de Graaf [ctb], Yunshun Chen [ctb], Mette Langaas [ctb], Egil Ferkingstad [ctb], Marcus Davy [ctb], Francois Pepin [ctb], Dongseok Choi [ctb]
Initial release
2020-10-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.