obtainHierarchy | R Documentation |
This function obtains the group set on group level that defines the hierarchy; if a group of covariates g is a subset of group h, then group h is an ancestor of group g (higher up in the hierarchy). This hierarchy is used in adaptively discretising continuous co-data.
obtainHierarchy(groupset, penalty = "LOG")
groupset |
Group set of groups of covariates with nested groups. |
penalty |
Default: "LOG" for a latent overlapping group approach (currently the only option in ecpc) |
We use the latent overlapping group (LOG) lasso penalty to define the hierarchical constraints as described in (Yan, Bien et al. 2007); for each group g of covariates, we make a group on group level with group number g and the group numbers of its ancestors in the hierarchical tree. This way, group g can be selected if and only if all its ancestors are selected. This function assumes that if group g is a subset of group h, then group h is an ancestor of group g. Note that this assumption does not necessarily hold for all hierarchies. The group set on group level should then be coded manually.
A group set on group level defining the hierarchy.
Yan, X., Bien, J. et al. (2017). Hierarchical sparse modeling: A choice of two group lasso formulations. Statistical Science 32 531-560.
splitMedian
to obtain a group set of nested groups for continuous co-data.
cont.codata <- seq(0,1,length.out=20) #continuous co-data #only split at lower continous co-data group groupset <- splitMedian(values=cont.codata,split="lower",minGroupSize=5) #obtain groups on group level defining the hierarchy groupset.grouplvl <- obtainHierarchy(groupset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.