betweenCov

0th

Percentile

Between-class Covariance Matrix

Calculates between-class covariance matrix

Usage
betweenCov(variables, group, div_by_n = FALSE)
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)
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

See Also

getWithin, betweenSS, withinCov, totalCov

Aliases
  • betweenCov
Examples
## Not run: 
# # load iris dataset
# data(iris)
# 
# # between-class covariance matrix (dividing by n-1)
# betweenCov(iris[,1:4], iris[,5])
# 
# # between-class covariance matrix (dividing by n)
# betweenCov(iris[,1:4], iris[,5], div_by_n=TRUE)
# ## End(Not run)
Documentation reproduced from package DiscriMiner, version 0.1-29, License: GPL-3

Community examples

Looks like there are no examples yet.