Ceres Plots
These functions draw Ceres plots for linear and generalized linear models.
ceresPlots(model, ...) ## Default S3 method: ceresPlots(model, terms = ~., layout = NULL, ask, main, ...) ceresPlot(model, ...) ## S3 method for class 'lm' ceresPlot(model, variable, id=FALSE, line=TRUE, smooth=TRUE, col=carPalette()[1], col.lines=carPalette()[-1], xlab, ylab, pch=1, lwd=2, grid=TRUE, ...) ## S3 method for class 'glm' ceresPlot(model, ...)
model |
model object produced by |
terms |
A one-sided formula that specifies a subset of the regressors.
One component-plus-residual plot is drawn for each term. The default
|
layout |
If set to a value like |
ask |
If |
main |
Overall title for any array of cerers plots; if missing a default is provided. |
... |
|
variable |
A quoted string giving the name of a variable for the horizontal axis |
id |
controls point identification; if |
line |
|
smooth |
specifies the smoother to be used along with its arguments; if |
col |
color for points; the default is the first entry
in the current car palette (see |
col.lines |
a list of at least two colors. The first color is used for the
ls line and the second color is used for the fitted lowess line. To use
the same color for both, use, for example, |
xlab,ylab |
labels for the x and y axes, respectively. If not set appropriate labels are created by the function. |
pch |
plotting character for points; default is |
lwd |
line width; default is |
grid |
If TRUE, the default, a light-gray background grid is put on the graph |
Ceres plots are a generalization of component+residual (partial residual) plots that are less prone to leakage of nonlinearity among the predictors.
The function intended for direct use is ceresPlots
.
The model cannot contain interactions, but can contain factors. Factors may be present in the model, but Ceres plots cannot be drawn for them.
NULL
. These functions are used for their side effect: producing
plots.
John Fox jfox@mcmaster.ca
Cook, R. D. and Weisberg, S. (1999) Applied Regression, Including Computing and Graphics. Wiley.
Fox, J. (2016) Applied Regression Analysis and Generalized Linear Models, Third Edition. Sage.
Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition, Sage.
ceresPlots(lm(prestige~income+education+type, data=Prestige), terms= ~ . - type)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.