#generate data
L = huge.generator(graph = "hub")
#subset indices
ind.group = c(1:40)
#generate the preselected neighborhood
ind.mat = huge.scr(L$data, ind.group)$ind.mat
#generated lambda
lambda = exp(seq(log(0.8),log(0.01),length=30))
#subgraph solution path estimation with the preselected neighborhood
G.path = huge.subgraph(L$data, ind.group = ind.group, ind.mat = ind.mat, lambda = lambda)
#subgraph solution path estimation with specified lambda.min and n.lambda
G.path = huge.subgraph(L$data, ind.group = ind.group, ind.mat = ind.mat,
n.lambda = 20, lambda.min = 0.01)
#graph solution path estimation using elastic net
G.path = huge.subgraph(L$data, ind.group = ind.group, alpha = 0.7)
Run the code above in your browser using DataLab