biplot.msPCA: Biplot Visualization for msPCA Objects

View source: R/SRPCAMS_methods.R

biplot.msPCAR Documentation

Biplot Visualization for msPCA Objects

Description

Creates a biplot of the first two principal components from an msPCA object, displaying variables or groups in the component space.

Usage

## S3 method for class 'msPCA'
biplot(x, ...)

Arguments

x

An object of class msPCA.

...

Additional graphical parameters to customize the plot:

shape

Integer or character; shape of the points (default: 43).

size

Numeric; size of the points/text (default: 3).

alpha

Numeric between 0 and 1; transparency of the points/text (default: 0.7).

color

Character; determines the coloring scheme of points, either "variable" or "groups" (default: "variable").

Value

A ggplot2 object representing the biplot of the first two principal components.

Examples

set.seed(236)
data <- matrix(rnorm(2000), ncol = 4)
groups <- sample(1:10, 500, replace = TRUE)
W <- time_weights(N = 10, c(3,2,1))
covs <- ssMRCD(data, groups = groups, weights = W, lambda = 0.3)
pca <- msPCA(eta = 0.3, gamma = 0.5,COVS = covs$MRCDcov, k = 2)
pca$PC = align(PC = pca$PC, type = "largest")
biplot(pca, alpha = 1, shape = 16, size = 5, color = "variable")


ssMRCD documentation built on Nov. 5, 2025, 7:44 p.m.