totalCov: Total Covariance Matrix

Description Usage Arguments Details Author(s) See Also Examples

View source: R/totalCov.R

Description

Calculates total covariance matrix

Usage

1
  totalCov(variables, div_by_n = FALSE)

Arguments

variables

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

div_by_n

logical indicating division by number of observations

Details

When div_by_n=TRUE the covariance matrices are divided by n (number of observations), otherwise they are divided by n-1

Author(s)

Gaston Sanchez

See Also

totalSS, betweenCov, withinCov

Examples

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

  # total covariance matrix (dividing by n-1)
  totalCov(iris[,1:4])

  # total covariance matrix (dividing by n)
  totalCov(iris[,1:4], div_by_n=TRUE)
  
## End(Not run)

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