library(plsgenomics)
data(Colon) ## Data from plsgenomics R package
X = data.frame(Colon$X[,1:100]) ## The first 100 genes
Z = data.frame(Colon$X[,101:102]) ## Two clinical covariates
colnames(Z) = c("Z1", "Z2")
Y = as.vector(Colon$X[,1000]) ## Continuous outcome variable
## Apply identifyHubs():
preNG = identifyHubs(X=X, delta=0.05, tau=5, ebic.gamma = 0.1)
## Explore preNG results:
## To display the degree centrality for each node,
## sorted from strongest to weakest.
preNG$assoResults
preNG$hubs ## Returns the names of the identified hub nodes.
Run the code above in your browser using DataLab