View source: R/coda4microbiome_longitudinal_functions.R
coda_glmnet_longitudinal_null | R Documentation |
Performs a permutational test for the coda_glmnet_longitudinal() algorithm: It provides the distribution of results under the null hypothesis by implementing the coda_glmnet_longitudinal() on different rearrangements of the response variable.
coda_glmnet_longitudinal_null(
x,
y,
x_time,
subject_id,
ini_time,
end_time,
niter = 100,
covar = NULL,
alpha = 0.9,
lambda = "lambda.1se",
nfolds = 10,
sig = 0.05
)
x |
abundance matrix or data frame in long format (several rows per individual) |
y |
outcome (binary); data type: numeric, character or factor vector |
x_time |
observation times |
subject_id |
subject id |
ini_time |
initial time to be analyzed |
end_time |
end time to be analyzed |
niter |
number of sample iterations |
covar |
data frame with covariates (default = NULL) |
alpha |
elastic net parameter (default = 0.9) |
lambda |
penalization parameter (default = "lambda.1se") |
nfolds |
number of folds |
sig |
significance value (default = 0.05) |
list with "accuracy" and "confidence interval"
M. Calle - T. Susin
set.seed(123) # to reproduce the results
data(ecam_filtered, package = "coda4microbiome") # load the data
x=x_ecam # microbiome abundance
x_time = metadata$day_of_life # observation times
subject_id = metadata$studyid # subject id
y= metadata$diet # diet ("bd"= breast diet, "fd"=formula diet)
ini_time = 0
end_time = 90
coda_glmnet_longitudinal_null (x,y, x_time, subject_id, ini_time, end_time,
lambda="lambda.min",nfolds=4, niter=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.