| Title: | High-Dimensional Methods via Generalised Singular Decomposition |
|---|---|
| Description: | Construct a Canonical Variate Analysis Biplot via the Generalised Singular Value Decomposition, for cases when the number of samples is less than the number of variables. For more information on these biplots, see Ganey, R., & Gardner-Lubbe, S. (2026) <doi:10.1007/s10260-025-00831-y>. |
| Authors: | Raeesa Ganey [aut, cre] (ORCID: <https://orcid.org/0009-0008-6973-0999>) |
| Maintainer: | Raeesa Ganey <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.1.0 |
| Built: | 2026-05-15 16:06:53 UTC |
| Source: | https://github.com/raeesaganey91/widerhino |
Calibrate axis
.calibrate.axis( j, Xhat, means, sd, axes.rows, ax.which, ax.tickvec, ax.orthogxvec, ax.orthogyvec ).calibrate.axis( j, Xhat, means, sd, axes.rows, ax.which, ax.tickvec, ax.orthogxvec, ax.orthogyvec )
j |
j |
Xhat |
Xhat |
means |
means |
sd |
sd |
axes.rows |
axes.rows |
ax.which |
ax.which |
ax.tickvec |
ax.tickvec |
ax.orthogxvec |
ax.orthogxvec |
ax.orthogyvec |
ax.orothogyvec |
Calibrated axes
Provide axes coordinates
axes_coordinates(bp, which.var = 1:bp$p)axes_coordinates(bp, which.var = 1:bp$p)
bp |
Object |
which.var |
which variable(s) to find coordinates |
Axes coordinates
Plot the CVA biplot
CVAbiplot(x, which.var = 1:x$p, var.label = TRUE, group.col = NULL)CVAbiplot(x, which.var = 1:x$p, var.label = TRUE, group.col = NULL)
x |
Object from CVAgsvd |
which.var |
which variable to display on the biplot |
var.label |
whether to display label for variable name |
group.col |
vector of colours for the groups in the data |
A CVA biplot based on the GSVD
data(sim_data) CVAgsvd(X=sim_data[,2:301],group = sim_data[,1])|> CVAbiplot(group.col=c("tan1","darkcyan","darkslateblue"),which.var = 1:10)data(sim_data) CVAgsvd(X=sim_data[,2:301],group = sim_data[,1])|> CVAbiplot(group.col=c("tan1","darkcyan","darkslateblue"),which.var = 1:10)
Compute canonical variate analysis using the generalised singular value decomposition when number of variables (p) is larger than the number of samples (n).
CVAgsvd(X, group)CVAgsvd(X, group)
X |
n x p data matrix |
group |
vector of size n showing the groups |
If p < n, then the solution defaults to the standard canonical variate analysis.
An object with components of a CVA biplot
CVAgsvd(X=iris[,1:4],group = iris[,5]) |> CVAbiplot(group.col = c("orange","red","pink"))CVAgsvd(X=iris[,1:4],group = iris[,5]) |> CVAbiplot(group.col = c("orange","red","pink"))
Get GSVD Get the components of the GSVD decomposition
get.GSVD(A, B)get.GSVD(A, B)
A |
Matrix A |
B |
Matrix B |
Returns components from the GSVD decomposition
Group variable: 0, 1, 2
Variable 1
...
Variable 300
A data set with 100 rows and 301 columns
simulated data