| Line 1... |
Line 1... |
| 1 |
% File src/library/stats/man/plot.lm.Rd
|
1 |
% File src/library/stats/man/plot.lm.Rd
|
| 2 |
% Part of the R package, https://www.R-project.org
|
2 |
% Part of the R package, https://www.R-project.org
|
| 3 |
% Copyright 1995-2018 R Core Team
|
3 |
% Copyright 1995-2019 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{plot.lm}
|
6 |
\name{plot.lm}
|
| 7 |
\alias{plot.lm}
|
7 |
\alias{plot.lm}
|
| 8 |
% \alias{plot.mlm} %which is .NotYetImplemented()
|
8 |
% \alias{plot.mlm} %which is .NotYetImplemented()
|
| 9 |
\title{Plot Diagnostics for an lm Object}
|
9 |
\title{Plot Diagnostics for an lm Object}
|
| 10 |
\usage{
|
10 |
\usage{
|
| 11 |
\method{plot}{lm}(x, which = c(1:3, 5), %% was which = 1:4
|
11 |
\method{plot}{lm}(x, which = c(1,2,3,5), %% was which = 1:4
|
| 12 |
caption = list("Residuals vs Fitted", "Normal Q-Q",
|
12 |
caption = list("Residuals vs Fitted", "Normal Q-Q",
|
| 13 |
"Scale-Location", "Cook's distance",
|
13 |
"Scale-Location", "Cook's distance",
|
| 14 |
"Residuals vs Leverage",
|
14 |
"Residuals vs Leverage",
|
| 15 |
expression("Cook's dist vs Leverage " * h[ii] / (1 - h[ii]))),
|
15 |
expression("Cook's dist vs Leverage " * h[ii] / (1 - h[ii]))),
|
| 16 |
panel = if(add.smooth) panel.smooth else points,
|
16 |
panel = if(add.smooth) function(x, y, ...)
|
| - |
|
17 |
panel.smooth(x, y, iter=iter.smooth, ...) else points,
|
| 17 |
sub.caption = NULL, main = "",
|
18 |
sub.caption = NULL, main = "",
|
| 18 |
ask = prod(par("mfcol")) < length(which) && dev.interactive(),
|
19 |
ask = prod(par("mfcol")) < length(which) && dev.interactive(),
|
| 19 |
\dots,
|
20 |
\dots,
|
| 20 |
id.n = 3, labels.id = names(residuals(x)), cex.id = 0.75,
|
21 |
id.n = 3, labels.id = names(residuals(x)), cex.id = 0.75,
|
| 21 |
qqline = TRUE, cook.levels = c(0.5, 1.0),
|
22 |
qqline = TRUE, cook.levels = c(0.5, 1.0),
|
| 22 |
add.smooth = getOption("add.smooth"), label.pos = c(4,2),
|
23 |
add.smooth = getOption("add.smooth"),
|
| - |
|
24 |
iter.smooth = if(isGlm && binomialLike) 0 else 3,
|
| - |
|
25 |
label.pos = c(4,2),
|
| 23 |
cex.caption = 1, cex.oma.main = 1.25)
|
26 |
cex.caption = 1, cex.oma.main = 1.25)
|
| 24 |
}
|
27 |
}
|
| 25 |
\arguments{
|
28 |
\arguments{
|
| 26 |
\item{x}{\code{lm} object, typically result of \code{\link{lm}} or
|
29 |
\item{x}{\code{lm} object, typically result of \code{\link{lm}} or
|
| 27 |
\code{\link{glm}}.}
|
30 |
\code{\link{glm}}.}
|
| Line 54... |
Line 57... |
| 54 |
\item{qqline}{logical indicating if a \code{\link{qqline}()} should be
|
57 |
\item{qqline}{logical indicating if a \code{\link{qqline}()} should be
|
| 55 |
added to the normal Q-Q plot.}
|
58 |
added to the normal Q-Q plot.}
|
| 56 |
\item{cook.levels}{levels of Cook's distance at which to draw contours.}
|
59 |
\item{cook.levels}{levels of Cook's distance at which to draw contours.}
|
| 57 |
\item{add.smooth}{logical indicating if a smoother should be added to
|
60 |
\item{add.smooth}{logical indicating if a smoother should be added to
|
| 58 |
most plots; see also \code{panel} above.}
|
61 |
most plots; see also \code{panel} above.}
|
| - |
|
62 |
\item{iter.smooth}{the number of robustness iterations, the argument
|
| - |
|
63 |
\code{iter} in \code{\link{panel.smooth}()}; the default uses no such
|
| - |
|
64 |
iterations for \code{\link{glm}(*, family=binomial)} fits which is
|
| - |
|
65 |
particularly desirable for the (predominant) case of binary observations.}
|
| 59 |
\item{label.pos}{positioning of labels, for the left half and right
|
66 |
\item{label.pos}{positioning of labels, for the left half and right
|
| 60 |
half of the graph respectively, for plots 1-3.}
|
67 |
half of the graph respectively, for plots 1-3.}
|
| 61 |
\item{cex.caption}{controls the size of \code{caption}.}
|
68 |
\item{cex.caption}{controls the size of \code{caption}.}
|
| 62 |
\item{cex.oma.main}{controls the size of the \code{sub.caption} only if
|
69 |
\item{cex.oma.main}{controls the size of the \code{sub.caption} only if
|
| 63 |
that is \emph{above} the figures when there is more than one.}
|
70 |
that is \emph{above} the figures when there is more than one.}
|