Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

can_lm

Transform a Multivariate Linear model mlm to a Canonical Representation


Description

This function uses candisc to transform the responses in a multivariate linear model to scores on canonical variables for a given term and then uses those scores as responses in a linear (lm) or multivariate linear model (mlm).

Usage

can_lm(mod, term, ...)

Arguments

mod

A mlm object

term

One term in that model

...

Arguments passed to candisc

Details

The function constructs a model formula of the form Can ~ terms where Can is the canonical score(s) and terms are the terms in the original mlm, then runs lm() with that formula.

Value

A lm object if term is a rank 1 hypothesis, otherwise a mlm object

Author(s)

Michael Friendly

See Also

Examples

iris.mod <- lm(cbind(Petal.Length, Sepal.Length, Petal.Width, Sepal.Width) ~ Species, data=iris)
iris.can <- can_lm(iris.mod, "Species")
iris.can
Anova(iris.mod)
Anova(iris.can)

candisc

Visualizing Generalized Canonical Discriminant and Canonical Correlation Analysis

v0.8-5
GPL (>= 2)
Authors
Michael Friendly [aut, cre], John Fox [aut]
Initial release
2021-01-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.