| alsi | R Documentation |
Calculates ALSI as a variance-weighted Euclidean norm of row principal coordinates within a retained K-dimensional MCA subspace.
alsi(Fmat, eig, K)
Fmat |
Matrix of row principal coordinates ( |
eig |
Vector of eigenvalues (inertias) |
K |
Integer, number of dimensions to aggregate |
S3 object of class alsi containing:
alpha |
Numeric vector of ALSI values (length N), representing each individual's variance-weighted distance from the centroid in the retained MCA subspace |
w |
Variance weights (length K), computed as the proportion of retained inertia for each dimension |
alpha_vec |
Aggregated direction vector (length K), equal to sqrt(w), used for projecting category coordinates |
K |
Number of dimensions used in aggregation |
# Create example data
set.seed(123)
Fmat <- matrix(rnorm(100 * 4), nrow = 100, ncol = 4)
eig <- c(0.5, 0.3, 0.15, 0.05)
# Compute ALSI
a <- alsi(Fmat, eig, K = 3)
print(a)
hist(a$alpha, main = "Distribution of ALSI")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.