withinSS: Within-class Sum of Squares Matrix

Description Usage Arguments Author(s) See Also Examples

View source: R/withinSS.R

Description

Calculates within-class sum of squares and cross product matrix (a.k.a. within-class scatter matrix)

Usage

1
  withinSS(variables, group)

Arguments

variables

matrix or data frame with explanatory variables (No missing values are allowed)

group

vector or factor with group memberships (No missing values are allowed)

Author(s)

Gaston Sanchez

See Also

withinCov, betweenSS, totalSS

Examples

1
2
3
4
5
6
7
8
## Not run: 
  # load iris dataset
  data(iris)

  # within-class scatter matrix
  withinSS(iris[,1:4], iris[,5])
  
## End(Not run)

Example output

             Sepal.Length Sepal.Width Petal.Length Petal.Width
Sepal.Length      38.9562     13.6300      24.6246      5.6450
Sepal.Width       13.6300     16.9620       8.1208      4.8084
Petal.Length      24.6246      8.1208      27.2226      6.2718
Petal.Width        5.6450      4.8084       6.2718      6.1566

DiscriMiner documentation built on May 1, 2019, 10:32 p.m.