if (FALSE) {
# 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))
}
Run the code above in your browser using DataLab