View source: R/TreeFusedlasso.R
TreeFusedlasso | R Documentation |
Fit the tree-guided fused lasso model.
TreeFusedlasso(y, X, tree, type = 1)
y |
the univariate response. |
X |
a data frame or matrix containing the compositional data. Rows of the matrix represent observations and columns are the taxa. |
tree |
the phylogenetic tree. |
type |
two different penalty construct methods : 1 or 2. |
Returns a genlasso object.
Wang, T., Zhao, H.: Constructing predictive microbial signatures at multiple taxonomic levels. Journal of the American Statistical Association 112(519), 1022–1031 (2017).
library(phyloseq) otu.tab <- t(otu_table(combo.phyloseq.obj)) X <- eBay_comps(otu.tab, prior = "Dirichlet") tree <- phy_tree(combo.phyloseq.obj) metadata <- sample_data(combo.phyloseq.obj) y <- metadata$bmi fit <- TreeFusedlasso(y, X, tree) IC <- ICgenlasso(fit, IC='AIC') IC <- ICgenlasso(fit, IC='BIC')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.