powered by
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", ... )
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", ... )
A Metabolite object.
A data.table with outcome and covariates. If `phenoData` is NULL, `@sampleData` will be used.
Specify a regression model. See fit_lm for more details. 'auto' can be used to infer 'lm' or 'logistic' (with only 0, 1, and NA).
fit_lm
Column name of the outcome variable.
Column names of covariates.
Variables to be treated as factor.
A vector of selected metabolites to run. If both feature_name and random_select are NULL, will run regression for all features.
Column name of survival time, used in cox regression, see coxph for more details.
coxph
Print log information.
Number of CPUS for parallele job.
Adjust for P value method, see p.adjust.
p.adjust
Further arguments passed to regression model.
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.
# NOT RUN { data(df_plasma) fit_lm <- regression(object = df_plasma, phenoData = NULL, model = "lm", outcome = "BMI", covars = c("AGE", "GENDER", "ETHNICITY"), factors = "ETHNICITY") # }
Run the code above in your browser using DataLab