crPlots(model, terms = ~., layout = NULL, ask, main,
...)
crp(...)
crPlot(model, ...)
## S3 method for class 'lm':
crPlot(model, variable,
id.method = list(abs(residuals(model, type="pearson")), "x"),
labels,
id.n = if(id.method[1]=="identify") Inf else 0,
id.cex=1, id.col=palette()[1],
order=1, line=TRUE, smoother=loessLine,
smoother.args=list(), smooth, span,
col=palette()[1], col.lines=palette()[-1],
xlab, ylab, pch=1, lwd=2, grid=TRUE, ...)
lm
or glm
.~.
is to plot against all numeric predictors. For example, the
specification terms = ~ . - X3
c(1, 1)
or c(4, 3)
, the layout
of the graph will have this many rows and columns. If not set, the program
will select an appropriate layout. If the number of graphs exceed nine, you
must select the laTRUE
, ask the user before drawing the next plot; if FALSE
, the default, don't ask.
This is relevant only if not all the graphs can be drawn in one window.crPlots
passes these arguments to crPlot
.
crPlot
passes them to plot
.id.n=0
for labeling no points. See
showLabels
for details of these arguments.1
.TRUE
to plot least-squares line.ScatterplotSmoothers
for available
smooethers and arguments.smooth=TRUE
then smoother
is set to loessLine
,
and if span
is specified, it is added to smoother.args
.col.lines=c("red", "red")
1
(a circle, see par
).2
(see par
).NULL
. These functions are used for their side effect of producing
plots.crPlots
, for which crp
is an abbreviation.
The model cannot contain interactions, but can contain factors.
Parallel boxplots of the partial residuals are drawn for the levels
of a factor.ceresPlots
, avPlots
crPlots(m<-lm(prestige~income+education, data=Prestige))
# get only one plot
crPlots(m, terms=~ . - education)
crPlots(lm(prestige ~ log2(income) + education + poly(women,2), data=Prestige))
crPlots(glm(partic != "not.work" ~ hincome + children,
data=Womenlf, family=binomial))
Run the code above in your browser using DataLab