R: Minus versus Add plot

MAplot {DataVisualizations} | R Documentation

## Minus versus Add plot

### Description

Bland-Altman plot [Altman/Bland, 1983].

### Usage

    MAplot(X,Y,islog=TRUE,LoA=FALSE,CI=FALSE,

    densityplot=FALSE,main,xlab,ylab,

    Cls,lwd=2,ylim=NULL,...)

### Arguments

`X` | [1:n] numerical vector of a feature/variable
`Y` | [1:n] another numerical vector of a feature/variable
`islog` | Optional, TRUE: MAplot, FALSE: M=x-y versus a=0.5(x+y)
`LoA` | Optional, if TRUE: limits of agreement are plottet as lines if densityplot=FALSE
`CI` | Optional, if TRUE: confidence intervals for LoA, see [Stockl et al., 2004], if densityplot=FALSE
`densityplot` | Optional, FALSE: Scatterplot using `Classplot`, TRUE: density scatter plot with `DensityScatter`
`main` | Optional, see `plot`
`xlab` | Optional, see `plot`
`ylab` | Optional, see `plot`
`Cls` | Optional, prior Classification as a numeric vector.
`lwd` | Optional, if `LoA=TRUE` or `CI=TRUE` the width of the lines, otherwise input argument is ignored
`ylim` | Optional, default `=NULL` sets this parameter automatically, otherwise see `Classplot`.
`...` | for example, `ylim`, Please see either`Classplot` in the mode `Plotter="native"`, or `DensityScatter` for further arguments depending on `densityplot`, see also details

### Details

Bland-Altman plot [Altman/Bland, 1983] for visual representation of genomic data or in order to decorrelate data.

"The limits of agreement (LoA) are defined as the mean difference +- 1.96 SD of differences. If these limits do not exceed the maximum allowed difference between methods (the differences within mean +- 1.96 SD are not clinically important), the two methods are considered to be in agreement and may be used interchangeably." cited as in URL. Please note, that the underyling assumption is the normal distribution of the differences. Input argument `LoA=TRUE` shows the mean of the difference in blue and +- 1.96 SD in green. Input argument `CI=TRUE` shows the mean of the difference in blue and the confidence intervall as red dashed lines similar to the cited URL.

In case of `densityplot=FALSE`, the function `Classplot` is always called with `Plotter="native"`. Then, the input argument "`Colors`"" of points can only be set in `Classplot` if "`Cls`"" is given in this function, otherwise the points are always black. The input argument "`Size`"" sets the size of points in `Classplot`.

### Value

`MA` | [1:n,2] Matrix of Minus component of two features and Add component of two features
`Handle` | see `DensityScatter` for output options, if densityplot=TRUE, otherwise NULL
`Statistics` | Named list of four element, each consisting of one value depending on input parameters `LoA` and `CI`, of this function. If not specifically set each list element is `NULL`. The elements are `Mean_value` - mean allowed difference, `SD_value` - standard deviation of difference, `LoA_value` - Limits of agreement=1.96*SD, `CI_value` - confidence intervall, i.e., maximum allowed difference

### Author(s)

Michael Thrun

### References

[Altman/Bland, 1983] Altman D.G., Bland J.M.: Measurement in medicine: the analysis of method comparison studies, The Statistician, Vol. 32, p. 307-317, doi:10.2307/2987937, 1983.

https://www.medcalc.org/manual/bland-altman-plot.php

[Stockl et al., 2004] Stockl, D., Rodriguez Cabaleiro, D., Van Uytfanghe, K., & Thienpont, L. M.: Interpreting method comparison studies by use of the Bland-Altman plot: reflecting the importance of sample size by incorporating confidence limits and predefined error limits in the graphic, Clinical chemistry, Vol. 50(11), pp. 2216-2218. 2004.

### Examples

    data("ITS")
    data("MTY")
    MAlist=MAplot(ITS,MTY)

[Package DataVisualizations version 1.2.3 Index]