Description Usage Arguments Details Value Author(s) References Examples
An auxilary function calculating the containing variable index for each predictor (or response) group. It generates the required input GR.grps
matrix when calling the MSGlasso function.
1 | FindingGRGrps(P, Q, G, R, cmax, G.Starts, G.Ends, R.Starts, R.Ends)
|
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 |
cmax |
a positive interger indicating the max number of variables a single group (either a predictor or response group) contains. |
G.Starts |
a vector of starting coordinates for the predictor groups. |
G.Ends |
a vector of ending coordinates for the predictor groups. |
R.Starts |
a vector of starting coordinates for the response groups. |
R.Ends |
a vector of ending coordinates for the response groups. |
Generates the required input GRgrps
matrix when calling the main MSGlasso function, when user provide the starting and ending coordinates for each of the predictor and response groups. The GRgrps
is a matrix of (g+r) by (cmax+1), with each row starting with variable indicators that row group contains, and followed by 999's till the row is filled.
A list with one components:
GRgrps |
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 | ###########################################################################
## generating the GR.grps matrix for an overlapping group structure
###########################################################################
P <- 200
Q <- 200
G <- 10
R <- 10
cmax <- 400
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 <- FindingGRGrps(P, Q, G, R, cmax, GarrStarts, GarrEnds, RarrStarts, RarrEnds)
GR.grps <- tmp$GRgrps
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.