scatterplotMatrix {car} | R Documentation |
Enhanced scatterplot matrices with univariate displays down the diagonal;
spm
is an abbreviation for scatterplotMatrix
.
This function just sets up a call to pairs
with custom panel functions.
scatterplotMatrix(x, ...) ## S3 method for class 'formula' scatterplotMatrix(formula, data=NULL, subset, labels, ...) ## Default S3 method: scatterplotMatrix(x, var.labels=colnames(x), diagonal=c("density", "boxplot", "histogram", "oned", "qqplot", "none"), adjust=1, nclass, plot.points=TRUE, smoother=loessLine, smoother.args=list(), smooth, span, spread = !by.groups, reg.line=lm, transform=FALSE, family=c("bcPower", "yjPower"), ellipse=FALSE, levels=c(.5, .95), robust=TRUE, groups=NULL, by.groups=FALSE, labels, id.method="mahal", id.n=0, id.cex=1, id.col=palette()[1], col=if (n.groups == 1) palette()[3:1] else rep(palette(), length=n.groups), pch=1:n.groups, lwd=1, lty=1, cex=par("cex"), cex.axis=par("cex.axis"), cex.labels=NULL, cex.main=par("cex.main"), legend.plot=length(levels(groups)) > 1, row1attop=TRUE, ...) spm(x, ...)
x |
a data matrix, numeric data frame. |
formula |
a one-sided “model” formula, of the form
|
data |
for |
subset |
expression defining a subset of observations. |
labels,id.method,id.n,id.cex,id.col |
Arguments for the labelling of
points. The default is |
var.labels |
variable labels (for the diagonal of the plot). |
diagonal |
contents of the diagonal panels of the plot. |
adjust |
relative bandwidth for density estimate, passed to
|
nclass |
number of bins for histogram, passed to |
plot.points |
if |
smoother |
a function to draw a nonparametric-regression smooth; the default is |
smoother.args |
a list of named values to be passed to the smoother function; the specified elements of the
list depend upon the smoother (see |
smooth, span |
these arguments are included for backwards compatility: if |
spread |
if TRUE, estimate the (square root) of the variance function. For |
reg.line |
if not |
transform |
if |
family |
family of transformations to estimate: |
ellipse |
if |
levels |
levels or levels at which concentration ellipses are plotted;
the default is |
robust |
if |
groups |
a factor or other variable dividing the data into groups; groups are plotted with different colors and plotting characters. |
by.groups |
if |
pch |
plotting characters for points; default is the plotting characters in
order (see |
col |
colors for lines and points; the default is taken from the color palette,
with |
lwd |
width of linear-regression lines (default |
lty |
type of linear-regression lines (default |
cex, cex.axis, cex.labels, cex.main |
set sizes of various graphical elements
(see |
legend.plot |
if |
row1attop |
If |
... |
arguments to pass down. |
NULL
. This function is used for its side effect: producing
a plot.
John Fox jfox@mcmaster.ca
Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage.
pairs
, scatterplot
,
dataEllipse
, powerTransform
,
bcPower
, yjPower
, cov.trob
,
showLabels
, ScatterplotSmoothers
.
scatterplotMatrix(~ income + education + prestige | type, data=Duncan) scatterplotMatrix(~ income + education + prestige, transform=TRUE, data=Duncan, smoother=loessLine) scatterplotMatrix(~ income + education + prestige | type, smoother=FALSE, by.group=TRUE, transform=TRUE, data=Duncan)