Learn R Programming

mulgar (version 1.0.5)

pooled_vc: Compute pooled variance-covariance matrix

Description

This function computes the group variance-covariance matrices, and produces a weighted average. It is useful for examining the linear discriminant analysis model.

Usage

pooled_vc(x, cl, prior = rep(1/length(unique(cl)), length(unique(cl))))

Value

matrix

Arguments

x

multivariate data set, matrix.

cl

class variable

prior

prior probability for each class, must sum to 1, default all equal

Examples

Run this code
data(clusters)
pooled_vc(clusters[,1:5], clusters$cl)

Run the code above in your browser using DataLab