pairs.mod | R Documentation |
Plots a scatterplot matrix in which panels below the diagonal show ordinary scatterplots of pairs of variables, and those above the diagonal show scatterplots of residuals after regression on all the other variables.
## S3 method for class 'mod'
pairs(x, format = "MC", labelnames = names(x), highlight = NULL, level = 0.9, ...)
x |
A matrix whose rows correspond to units and whose columns correspond to variables measured on those units. |
format |
'MM' for marginal (that is, standard) scatterplots above and below the diagonal, 'MC' for marginal below and conditional (= partial) above, etc. 'MC' by default. |
labelnames |
Names of the variables. |
highlight |
Indexes of observations (rows) to be highlighted. |
level |
Scalar giving the level for the contour, 0.9 by default. |
... |
The plotting symbol and other arguments for the points can be controlled by ‘pch=’, etc. |
The diagonal shows histograms of the original data, and (in black) histograms of the partial residuals after adjustment on all the other variables, shifted to have the same mean as the original data. Also given are the original
The below-diagonal panels contain the numerical value of the correlation, and those above the diagonal contain the partial correlation, that is, the correlation of the residuals after linear regression on the remaining variables. The panels show ellipses which would contain 90 percent of the observations in a large normal sample with the same mean and covariance matrix as the data.
Produces the scatterplot matrix, and prints the marginal and partial standard deviations of the variables.
pairs.mod calls library(ellipse) and will give an error if this is unavailable.
Sylvain Sardy (Sylvain.Sardy@epfl.ch)
Davison, A. C. and Sardy, S. (2000) The partial scatterplot matrix. Journal of Computational and Graphical Statistics, 9, 750–758.
library(ellipse)
data(mathmarks)
pairs.mod(mathmarks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.