balance_dendrogram {coda.plot} | R Documentation |
Compositional Balance Dendrogram
Description
Plots a balance dendrogram based on a compositional data set and a corresponding balance matrix. This visualization helps interpret the structure of balances in compositional data analysis.
Usage
balance_dendrogram(X, B, group = NULL)
Arguments
X |
A numeric matrix or data frame representing the compositional data. Rows are observations and columns are components (must be strictly positive). |
B |
A numeric matrix representing the balance basis (e.g., an isometric log-ratio (ilr) balance matrix). |
group |
Show boxplot by groups |
Details
The dendrogram shows the hierarchical structure of balances derived from the balance matrix B
.
Each internal node corresponds to a balance, and the height or color may reflect the variance explained or other statistics.
Value
A 'ggplot2
' object representing the balance dendrogram.
Examples
# Simulated compositional data and balances
X = matrix(runif(50, 1, 10), ncol = 5)
colnames(X) = LETTERS[1:5]
B = pb_basis(X, method = 'exact')
balance_dendrogram(X, B)
[Package coda.plot version 0.1.9 Index]