#generate data
n = 100
L = huge.generator(n=100, graph = "hub")
#subset indices
ind.group = c(1:30)
#preselect the neighborhood
ind.mat = huge.scr(L$data)$ind.mat
lambda = exp(seq(log(1),log(0.1),length=10))
#subsampling and subgraph estimation
R.path = list()
for(k in 1:6){
ind.sample = sample(c(1:n), floor(n*0.8), replace=FALSE)
R.path[[k]] = huge.subgraph(L$data[ind.sample,], ind.group = ind.group,
ind.mat = ind.mat, lambda = lambda)$path
}
#stability selection
D = huge.stars(R.path)
Run the code above in your browser using DataLab