thresh_n_gr: Soft threshholding a vector with respect to a number of groups
Description
Soft threshholding a vector with respect to a number of groups
Usage
thresh_n_gr(w, keep_gr, index_gr)
Value
A list containing sparse loading vector and names of the selected groups
Arguments
- w
Numerical loading vector
- keep_gr
How many groups to retain
- index_gr
List of index and size. index are the index of variables belongs to the group in the original vector, size is the group size