Learn R Programming

shallot (version 0.4.6)

variance.ratio: Variance Ratio

Description

This function calculates the variance of the expected pairwise allocation matrix (EPAM) within clusters/subsets over the total variance of the expected pairwise allocation matrix.

Usage

variance.ratio(x, y)

Arguments

x, y

If y is not specified then x must be an object of class sdols.confidence. Otherwise, x is a vector of cluster labels and y is an expected pairwise allocation matrix.

Details

The variance.ratio function takes as input an object of class sdols.confidence and calculates the variance ratio for the estimated partition from the corresponding expected pairwise allocation matrix (EPAM).

The variance ratio is the weighted average of the within cluster variances of the EPAM, weighted by the number of pairwise EPAM values per cluster, over the total variance of the EPAM.

See Also

Other Default Mass Selection: default.mass, mass.algorithm, partition.confidence

Examples

Run this code
# NOT RUN {
x <- rep(c(1,2,3), times=c(2,3,5))
y <- diag(10)
y[upper.tri(y)] <- runif(45)
variance.ratio(x,y)

# }

Run the code above in your browser using DataLab