| scores.lda | R Documentation |
This is a thin wrapper for predict_discrim() to provide a scores() method for discriminant analysis
from MASS::lda().
## S3 method for class 'lda'
scores(x, prior = x$prior, dimen, ...)
x |
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,
|
... |
Unused; for compatibility with the generic |
a data frame for the observations with columns LD1, LD2, ... for the discriminant dimensions
Michael Friendly
predict_discrim(), MASS::lda()
library(MASS) # for lda()
iris.lda <- lda(Species ~ ., iris)
scores(iris.lda) |>
str()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.