Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


ssMRCD (version 1.1.0)

sparsity_mixed: Mixed Sparsity of the Loadings

Description

Mixed Sparsity of the Loadings

Usage

sparsity_mixed(PC, p, N, k = 1, tolerance = 0.001, mean = "arithmetic")

Value

Returns the geometric mean of the percentage of entry-wise and group-wise sparsity.

Arguments

PC

matrix-like object of PCs.

p

integer, number of variables.

N

integer, number of groups.

k

integer, which components should be used. Does not work for multiple PCs simultaneously.

tolerance

tolerance for sparsity.

mean

if "arithmetic" or "geometric" mean should be used.

Examples

Run this code
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