cresiduals | R Documentation |
Residuals from full conditionals of a Multivariate
Linear Model (mlm
) object. The full conditional for each response is a
linear model with all other responses used as predictors in addition to the
regressors specified in the formula of the mlm
object. This is used to
diagnose the multivariate normality assumption in plotenvelope
.
cresiduals(object, standardize = TRUE, ...)
object |
a |
standardize |
logical defaults to |
... |
further arguments passed to |
A residuals
function for mlm
objects, which returns residuals from a full
conditional model, that is, a linear model of each response against all responses
as well as predictors, which can be used to diagnose the multivariate normality assumption.
These can be standardized (standardize=TRUE
) to facilitate overlay plots of multiple
responses, as in plotenvelope
.
A matrix of residuals
David Warton <david.warton@unsw.edu.au>
Warton DI (2022) Eco-Stats - Data Analysis in Ecology, from t-tests to multivariate abundances. Springer, ISBN 978-3-030-88442-0
cpredict
, lm
, plotenvelope
, residuals
, rstandard
data(iris)
# fit a mlm:
iris.mlm=lm(cbind(Sepal.Length,Sepal.Width,Petal.Length,Petal.Width)~Species,data=iris)
# construct full conditional residuals:
cresiduals(iris.mlm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.