mmps {alr3} | R Documentation |
For a regression object, plots the response on the vertical axis versus
a linear combination u of terms in the mean function on the horizontal
axis. Added to the plot are a loess
smooth for the graph, along with
a loess smooth from the plot of the fitted values on u.
mmps(object,vars=~.,fitted=TRUE,layout=NULL,ask,...) ## S3 method for class 'lm' mmp(object, u , mean = TRUE, sd = FALSE, xlab = deparse(substitute(u)), degree = 1, span = 2/3,key="topleft", lineColors = c("blue", "red"), ...) ## S3 method for class 'glm' mmp(object, u, mean = TRUE, sd = FALSE, xlab = deparse(substitute(u)), degree = 1, span = 2/3,key="topleft", lineColors = c("blue", "red"), ...)
object |
A regression object, of type either lm or glm,
for which there is a |
vars |
A one-sided formula. A marginal model plot will be drawn for
each variable on the right-side of this formula that is not a factor. The
default is |
fitted |
If the default TRUE, then a marginal model plot in the direction of the fitted values or linear predictor of a generalized linear model will be drawn. |
layout |
A reasonable layout for the plots in the window is
determined by the program. If you don't like the default you can set your
own layout: |
ask |
If TRUE, ask before clearing the graph window to draw more plots. |
... |
Additional arguments passed from |
u |
The quantity to be plotted on the horizontal axis. The
default is the predicted values |
mean |
If TRUE, compare mean smooths |
sd |
If TRUE, compare sd smooths |
xlab |
label for horizontal axis |
degree |
Degree of the local polynomial, passed to |
span |
Span, the smoothing parameter for |
key |
If not NULL, this gives the location of the legend, chosen from the default "topleft", or "bottomleft","bottomright" or "topright". |
lineColors |
colors for data and model smooth, respectively |
mmp
draws one marginal model plot. mmps
draws all marginal model plots,
versus each of the terms in the model and versus fitted values. mmps
should not be used if some of the terms in the model are factors or
interactions.
Used for its side effect of producing plots.
Sanford Weisberg, sandy@stat.umn.edu
S. Weisberg (2005), Applied Linear Regression, third edition, Wiley, Chapter 8
data(ufcwc) c1 <- lm(Height ~ Dbh, ufcwc) mmp(c1, ufcwc$Dbh, xlab="Diameter, Dbh", lineColors=c("black", "black")) mmps(c1)