plot.lm.rrpp | R Documentation |
Plot Function for RRPP
## S3 method for class 'lm.rrpp'
plot(
x,
type = c("diagnostics", "regression", "PC"),
resid.type = c("p", "n"),
fitted.type = c("o", "t"),
predictor = NULL,
reg.type = c("PredLine", "RegScore"),
...
)
x |
plot object (from |
type |
Indicates which type of plot, choosing among diagnostics,
regression, or principal component plots. Diagnostic plots are similar to
|
resid.type |
If type = "diagnostics", an optional argument for whether Pearson ("p") or normalized ("n") residuals should be used. These residuals are the same for ordinary least-squares (OLS) estimation but differ for generalized least-squares (GLS) estimation. For the latter, normalizing residuals requires multiplying them by the transformation matrix obtained for GLS estimation. |
fitted.type |
As with resid.type, whether fitted values use observed ("o") or transformed ("t") values. |
predictor |
An optional vector if "regression" plot type is chosen,
and is a variable likely used in |
reg.type |
If "regression" is chosen for plot type, this argument indicates whether prediction line (PredLine) or regression score (RegScore) plotting is performed. For explanation of prediction line, see Adams and Nistri (2010). For explanation of regression score, see Drake and Klingenberg (2008). |
... |
other arguments passed to plot (helpful to employ
different colors or symbols for different groups). See
|
Michael Collyer
Drake, A. G., and C. P. Klingenberg. 2008. The pace of morphological change: Historical transformation of skull shape in St Bernard dogs. Proc. R. Soc. B. 275:71-76.
Adams, D. C., and A. Nistri. 2010. Ontogenetic convergence and evolution of foot morphology in European cave salamanders (Family: Plethodontidae). BMC Evol. Biol. 10:1-10.
## Not run:
# Univariate example
data(PlethMorph)
fitGLS <- lm.rrpp(TailLength ~ SVL, data = PlethMorph, Cov = PlethMorph$PhyCov,
print.progress = FALSE, iter = 0)
par(mfrow = c(2, 2))
plot(fitGLS)
plot(fitGLS, resid.type = "n") # use normalized (transformed) residuals
plot(fitGLS, resid.type = "n", fitted.type = "t") # use also transformed fitted values
# Multivariate example
Y <- as.matrix(cbind(PlethMorph$TailLength,
PlethMorph$HeadLength,
PlethMorph$Snout.eye,
PlethMorph$BodyWidth,
PlethMorph$Forelimb,
PlethMorph$Hindlimb))
PlethMorph$Y <- Y
fitGLSm <- lm.rrpp(Y ~ SVL, data = PlethMorph,
Cov = PlethMorph$PhyCov,
print.progress = FALSE, iter = 0)
par(mfrow = c(2, 2))
plot(fitGLSm)
plot(fitGLSm, resid.type = "n") # use normalized (transformed) residuals
plot(fitGLSm, resid.type = "n", fitted.type = "t") # use also transformed fitted values
par(mfrow = c(1, 1))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.