Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

balance (version 0.2.4)

ssBetween: Calculate Between-Group Log-ratio Sums of Squares

Description

This function calculates the between-group sums of squares for all variables or all log-ratios. This function only supports binary outcomes.

Usage

ssBetween(x, group, pairwise = FALSE, ...)

Arguments

x

A matrix with rows as samples (N) and columns as components (D).

group

A character vector. Group or sub-group membership. Argument passed to propr::propd.

pairwise

A logical. Toggles whether to decompose sums of squares for each log-ratio.

...

Other arguments passed to propr::propd.

Value

If pairwise = FALSE, this function returns a vector of the sums of squares for each variable. If pairwise = TRUE, this function returns a matrix of the sums of squares for each log-ratio.