View source: R/residual.plots.lattice.R
residual.plots.lattice | R Documentation |
Construct four sets of regression plots. Response variable $Y$ against each $X_j$, residuals $e$ against each $X_j$, partial residuals plots of $e^j$ against each $X_j$, added variable plots of $e^j$ against the residuals of each $X_j$ adjusted for the other $X$ columns. The slopes shown in the panels of both bottom rows are equal to the regression coefficients.
residual.plots.lattice(lm.object, X=dft$x, layout=c(dim(X)[2],1),
par.strip.text=list(cex=.8),
scales.cex=.6,
na.action=na.pass,
y.relation="same",
...)
lm.object |
|
X |
Identify the variables in each of the x, y, group positions in a formula object.
See |
layout , par.strip.text , ... |
lattice arguments. See |
scales.cex |
|
na.action |
See |
y.relation |
|
"trellis"
object.
Richard M. Heiberger <rmh@temple.edu>
residual.plots
, print.latticeresids
data(longley)
longley.lm <- lm( Employed ~ . , data=longley, x=TRUE, y=TRUE)
residual.plots.lattice(longley.lm)
## Not run:
longleyResid <- tempfile("longleyResid", fileext = ".pdf")
pdf(longleyResid, height=9, width=14)
print(residual.plots.lattice(longley.lm, pch=19),
A4.left=.0125, panel.width=list(5,"cm"))
dev.off()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.