Learn R Programming

sjPlot (version 2.0.0)

sjc.grpdisc: Compute a linear discriminant analysis on classified cluster groups

Description

Computes linear discriminant analysis on classified cluster groups. This function plots a bar graph indicating the goodness of classification for each group.

Usage

sjc.grpdisc(data, groups, groupcount, clss.fit = TRUE, prnt.plot = TRUE)

Arguments

Value

(Invisibly) returns an object with
  • data: the used data frame for plotting,
  • plot: the ggplot object,
  • accuracy: a vector with the accuracy of classification for each group,
  • total.accuracy: the total accuracy of group classification.

Examples

Run this code
# retrieve group classification from hierarchical cluster analysis
# on the mtcars data set (5 groups)
groups <- sjc.cluster(mtcars, 5)

# plot goodness of group classificatoin
sjc.grpdisc(mtcars, groups, 5)

Run the code above in your browser using DataLab