FLORAL {FLORAL} | R Documentation |
Fit Log-ratio lasso regression for compositional covariates
Description
Conduct log-ratio lasso regression for continuous, binary and survival outcomes.
Usage
FLORAL(
x,
y,
ncov = 0,
family = "gaussian",
longitudinal = FALSE,
id = NULL,
tobs = NULL,
failcode = NULL,
length.lambda = 100,
lambda.min.ratio = NULL,
ncov.lambda.weight = 0,
a = 1,
mu = 1,
ncv = 5,
intercept = FALSE,
foldid = NULL,
step2 = TRUE,
progress = TRUE,
plot = TRUE
)
Arguments
x |
Feature matrix, where rows specify subjects and columns specify features. The first |
y |
Outcome. For a continuous or binary outcome, |
ncov |
An integer indicating the number of first |
family |
Available options are |
longitudinal |
|
id |
If |
tobs |
If |
failcode |
If |
length.lambda |
Number of penalty parameters used in the path |
lambda.min.ratio |
Ratio between the minimum and maximum choice of lambda. Default is |
ncov.lambda.weight |
Weight of the penalty lambda applied to the first |
a |
A scalar between 0 and 1: |
mu |
Value of penalty for the augmented Lagrangian |
ncv |
Folds of cross-validation. Use |
intercept |
|
foldid |
A vector of fold indicator. Default is |
step2 |
|
progress |
|
plot |
|
Value
A list with path-specific estimates (beta), path (lambda), and others. Details can be found in README.md
.
Author(s)
Teng Fei. Email: feit1@mskcc.org
References
Fei T, Funnell T, Waters N, Raj SS et al. Scalable Log-ratio Lasso Regression Enhances Microbiome Feature Selection for Predictive Models. bioRxiv 2023.05.02.538599.
Examples
set.seed(23420)
# Continuous outcome
dat <- simu(n=50,p=30,model="linear")
fit <- FLORAL(dat$xcount,dat$y,family="gaussian",ncv=2,progress=FALSE,step2=TRUE)
# Binary outcome
# dat <- simu(n=50,p=30,model="binomial")
# fit <- FLORAL(dat$xcount,dat$y,family="binomial",progress=FALSE,step2=TRUE)
# Survival outcome
# dat <- simu(n=50,p=30,model="cox")
# fit <- FLORAL(dat$xcount,survival::Surv(dat$t,dat$d),family="cox",progress=FALSE,step2=TRUE)
# Competing risks outcome
# dat <- simu(n=50,p=30,model="finegray")
# fit <- FLORAL(dat$xcount,survival::Surv(dat$t,dat$d,type="mstate"),failcode=1,
# family="finegray",progress=FALSE,step2=FALSE)