
Last chance! 50% off unlimited learning
Sale ends in
Mixed Sparsity of the Loadings
sparsity_mixed(PC, p, N, k = 1, tolerance = 0.001, mean = "arithmetic")
Returns the geometric mean of the percentage of entry-wise and group-wise sparsity.
matrix-like object of PCs.
integer, number of variables.
integer, number of groups.
integer, which components should be used. Does not work for multiple PCs simultaneously.
tolerance for sparsity.
if "arithmetic"
or "geometric"
mean should be used.
PC = matrix(c(1,0,2,3,0,7,0,1,0,1,0.001,0), ncol = 2)
sparsity_mixed(PC, N = 2, p = 3, tolerance = 0, k = 1)
sparsity_mixed(PC, N = 2, p = 3, tolerance = 0.001, k = 2, mean = "geometric")
Run the code above in your browser using DataLab