
getWithin(variables, group)
n-k
, where
n
is the number of observations and k
is
the number of groups)
withinCov
## Not run:
# # load iris dataset
# data(iris)
#
# # estimated within-class covariance matrix (dividing by n-k)
# getWithin(iris[,1:4], iris[,5])
#
# # compared to the within-class covariance matrix (dividing by n-1)
# withinCov(iris[,1:4], iris[,5])
# ## End(Not run)
Run the code above in your browser using DataLab