mapLda | R Documentation |
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 )
object |
Object obtained by |
xlim |
Limits of the x-axis. |
ylim |
Limits of the y-axis. |
npoints |
Number of points on y-axis and x-axis (i.e., drawing precision). |
prior |
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). |
dimen |
Number of dimensions used for prediction. Probably only 2 (as these are used for drawing) makes sense. |
col |
Vector of mapping colors, default is |
No return value, called for side effects (plotting a map).
Aleš Žiberna
# Estimate the LDA model: ldaCars <- ldaPlus(x = mtcars[,c(1, 3, 4, 5, 6)], grouping = mtcars[,10]) # Plot LDA map: mapLda(ldaCars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.