regression | R Documentation |
Run regression models with adjusting for covariates. 'regression_each' is used for one outcome. In 'regression', several outcomes can be specified to run together.
regression( object, phenoData = NULL, model = NULL, outcome = NULL, covars = NULL, factors = NULL, feature_name = NULL, time = NULL, verbose = TRUE, ncpus = 1, p.adjust.method = "bonferroni", ... ) regression_each( object, phenoData = NULL, model = NULL, formula = NULL, outcome = NULL, covars = NULL, factors = NULL, feature_name = NULL, time = NULL, verbose = TRUE, ncpus = 1, p.adjust.method = "bonferroni", ... )
object |
A Metabolite object. |
phenoData |
A data.table with outcome and covariates. If 'phenoData' is NULL, '@sampleData' will be used. |
model |
Specify a regression model. See |
outcome |
Column name of the outcome variable. |
covars |
Column names of covariates. |
factors |
Variables to be treated as factor. |
feature_name |
A vector of selected metabolites to run. If both feature_name and random_select are NULL, will run regression for all features. |
time |
Column name of survival time, used in cox regression, see |
verbose |
Print log information. |
ncpus |
Number of CPUS for parallele job. |
p.adjust.method |
Adjust for P value method, see |
... |
Further arguments passed to regression model. |
formula |
A character or formula object to fit model (only used in 'regression_each') |
term estimate std.error statistic p.value n outcome p.value.adj.
data(df_plasma) fit_lm <- regression(object = df_plasma, phenoData = NULL, model = "lm", outcome = "BMI", covars = c("AGE", "GENDER", "ETHNICITY"), factors = "ETHNICITY")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.