Title: | High-Dimensional Methods via Generalised Singular Decomposition |
Version: | 1.0.2 |
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 biplots, see Gower JC, Lubbe SG, Le Roux NJ (2011) <doi:10.1002/9780470973196> and for more information on the generalised singular value decomposition, see Edelman A, Wang Y (2020) <doi:10.1137/18M1234412>. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Depends: | R (≥ 4.1.0) |
Imports: | geigen, Matrix, MASS, ggplot2, dplyr |
Suggests: | knitr, rmarkdown, testthat |
Config/Needs/website: | rmarkdown |
NeedsCompilation: | no |
Packaged: | 2025-06-06 12:55:11 UTC; raeesaganey |
Author: | Raeesa Ganey |
Maintainer: | Raeesa Ganey <Raeesa.ganey@wits.ac.za> |
Repository: | CRAN |
Date/Publication: | 2025-06-11 15:10:02 UTC |
Calibrate axis
Description
Calibrate axis
Usage
.calibrate.axis(
j,
Xhat,
means,
sd,
axes.rows,
ax.which,
ax.tickvec,
ax.orthogxvec,
ax.orthogyvec
)
Arguments
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 |
Value
Calibrated axes
Plot the CVA biplot
Description
Plot the CVA biplot
Usage
CVAbiplot(
x,
which.var = 1:x$p,
var.label = FALSE,
group.col = NULL,
zoom.out = 50
)
Arguments
x |
Object from CVA |
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 |
zoom.out |
percentage to zoom out of the plot |
Value
A CVA biplot based on the GSVD
Examples
data(sim_data)
CVAgsvd(X=sim_data[,2:301],group = sim_data[,1])|>
CVAbiplot(group.col=c("tan1","darkcyan","darkslateblue"),which.var = 1:10,zoom.out=80)
CVA Biplot using the GSVD
Description
Create a CVA biplot using the generalised singular value decomposition when number of variables (p) is larger than the number of samples (n).
Usage
CVAgsvd(X, group)
Arguments
X |
n x p data matrix |
group |
vector of size n showing the groups |
Details
If p < n, then the solution defaults to the standard CVA biplot.
Value
An object with components of a CVA biplot
Examples
CVAgsvd(X=iris[,1:4],group = iris[,5]) |>
CVAbiplot(group.col = c("orange","red","pink"))
Provide axes coordinates
Description
Provide axes coordinates
Usage
axes_coordinates(bp, which.var = 1:bp$p)
Arguments
bp |
Object |
which.var |
which variable(s) to find coordinates |
Value
Axes coordinates
Get GSVD Get the components of the GSVD decomposition
Description
Get GSVD Get the components of the GSVD decomposition
Usage
get.GSVD(A, B)
Arguments
A |
Matrix A |
B |
Matrix B |
Value
Returns components from the GSVD decomposition
Simulated Data
Description
- Class
Group variable: 0, 1, 2
- X1
Variable 1
...
- X300
Variable 300
Format
A data set with 100 rows and 301 columns
Source
simulated data