mapLda {multiUS}R Documentation

LDA mapping

Description

The function draws two dimensional map of discriminant functions.

Usage

mapLda(
  object,
  xlim = c(-2, 2),
  ylim = c(-2, 2),
  npoints = 101,
  prior = object$prior,
  dimen = 2,
  col = NULL
)

Arguments

object

Object obtained by ldaPlus function or MASS::lda function.

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 NULL (i.e., it takes the default R colors).

Value

No return value, called for side effects (plotting a map).

Author(s)

Aleš Žiberna

Examples

# Estimate the LDA model:
ldaCars <- ldaPlus(x = mtcars[,c(1, 3, 4, 5, 6)], grouping = mtcars[,10])
# Plot LDA map:
mapLda(ldaCars)

[Package multiUS version 1.2.3 Index]