Generate the Design Matrix for LDA Model
getDesignMatrix(modelLDA, data, scale = FALSE)
A design matrix where each row corresponds to an observation and
each column to a predictor variable. If scale = TRUE
, the variables are
centered and scaled based on the means and standard deviations provided in
the LDA model object.
A fitted LDA model object containing the terms, variable indices, variable centers, and scaling factors.
A data frame containing the predictor variables that are used to create the design matrix.
A logical value indicating whether to scale the design matrix
based on the mean and standard deviation of the variables (default is
FALSE
).