cor_lda: Calculate Structure Correlations from Discriminant Analysis
Description
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.
a numeric matrix of correlations, of size `nv` = number of predictor variables * `dimen`
Arguments
object
An object of class "lda" such as results from MASS::lda()
prior
The prior probabilities of the classes. By default, taken to be the proportions in what was set
in the call to MASS::lda()
dimen
The dimension of the space to be used. If this is less than the number of available dimensions,
\(\min(p, ng-1)\), only the first dimen discriminant components are used.
method
a character string indicating which correlation coefficient is to be computed. One of "pearson"
(default), "kendall", or "spearman": can be abbreviated. See stats::cor() for details