Description Usage Arguments Details Value Author(s) References Examples
An auxilary function calculating the group weighting matrix grpWTs
required when calling the MSGlasso function.
1 | Cal_grpWTs(P, Q, G, R, gmax, PQ.grps)
|
P |
a positive interger indicating number of predictor variables |
Q |
a positive interger indicating number of response variables |
G |
a positive interger indicating number of predictor groups |
R |
a positive interger indicating number of response groups |
gmax |
a positive interger indicating the max number of different groups a single variable (either a predictor or response variable) belongs to. |
PQ.grps |
a matrix of (p+q) by (gmax+1), with each row starting with group indicators that row variable belongs to, and followed by 999's till the row is filled. |
Generates the required input group weighting matrix grpWTs
when calling the main MSGlasso function. The grpWTs
is a g by r matrix containing the adaptive weighting scores for each group. MSGLasso.grpWTs
use the square root of the group size (number of entries the group contains) as the weight for each group.
A list with one components:
grpWTs |
the |
Yanming Li, Bin Nan, Ji Zhu
Y. Li, B. Nan and J. Zhu (2015) Multivariate sparse group lasso for the multivariate multiple linear regression with an arbitrary group structure. Biometrics. DOI: 10.1111/biom.12292
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ###########################################################################
## generating the grp.WTs matrix for an overlapping group structure
###########################################################################
P <- 200
Q <- 200
G <- 10
R <- 10
gmax <- 1
GarrStarts <-c(0,20,40,60,80,100,120,140,160,180)
GarrEnds <-c(19,39,59,79,99,119,139,159,179,199)
RarrStarts <-c(0,20,40,60,80,100,120,140,160,180)
RarrEnds <-c(19,39,59,79,99,119,139,159,179,199)
tmp <- FindingPQGrps(P, Q, G, R, gmax, GarrStarts, GarrEnds, RarrStarts, RarrEnds)
PQ.grps <- tmp$PQgrps
tmp1 <- Cal_grpWTs(P, Q, G, R, gmax, PQ.grps)
grp.WTs <- tmp1$grpWTs
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.