| cor_lda | R Documentation |
cor_lda() calculates the "structure" correlations between the observed variables and the discriminant dimension scores
from a linear discriminant analysis provided by MASS::lda(). These more directly assess the direction and strength
of the relations between the two sets than do the scaling weights returned by lda(). They are useful for plotting
the discriminant scores, showing the contributions of the variables by vectors.
cor_lda(
object,
prior = object$prior,
dimen,
method = c("pearson", "kendall", "spearman"),
...
)
object |
An object of class |
prior |
The prior probabilities of the classes. By default, taken to be the proportions in what was set
in the call to |
dimen |
The dimension of the space to be used. If this is less than the number of available dimensions,
|
method |
a character string indicating which correlation coefficient is to be computed. One of |
... |
other arguments (presently ignored) |
a numeric matrix of correlations, of size `nv` = number of predictor variables * `dimen`
Michael Friendly
predict_discrim(), MASS::lda(), stats::cor()
library(candisc)
library(MASS) # for lda()
iris.lda <- lda(Species ~ ., iris)
cor_lda(iris.lda)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.