powered by
The function draws two dimensional map of discriminant functions.
mapLda( object, xlim = c(-2, 2), ylim = c(-2, 2), npoints = 101, prior = object$prior, dimen = 2, col = NULL )
No return value, called for side effects (plotting a map).
Object obtained by ldaPlus function or MASS::lda function.
ldaPlus
MASS::lda
Limits of the \(x\)-axis.
Limits of the \(y\)-axis.
Number of points on y-axis and x-axis (i.e., drawing precision).
Prior probabilities of class membership to estimate the model (they can be estimated based on the sample data or they can be provided by a reseacher).
Number of dimensions used for prediction. Probably only 2 (as these are used for drawing) makes sense.
Vector of mapping colors, default is NULL (i.e., it takes the default R colors).
NULL
Aleš Žiberna
# Estimate the LDA model: ldaCars <- ldaPlus(x = mtcars[,c(1, 3, 4, 5, 6)], grouping = mtcars[,10]) # Plot LDA map: mapLda(ldaCars)
Run the code above in your browser using DataLab