Description Usage Arguments Details Value Examples
Helper function that fits lm/lmm with covariates 'treatment' and 'batch' to
every feature in the data-set. Returns the fdr corrected significance value
for the "treatment" variable. The method 'lm' will fit the linear model
y ~ model.vars[1] + model.vars[2]
and the linear mixed model will
consider the second term as random effect, i.e.,
y ~ model.vars[1] + (1|model.vars[2])
.
1 2 3 4 5 6 7 |
input.obj |
MbecData object |
method |
Either 'lm' or 'lmm' for linear models and linear mixed models. |
model.vars |
Covariates of interest, first relates to batch and second to treatment. |
type |
Which abundance matrix to use, one of 'otu, tss, clr, cor'. DEFAULT is clr' and the use of 'cor' requires the parameter label to be set as well. |
label |
Which corrected abundance matrix to use for analysis in case 'cor' was selected as type. |
The function returns either a plot-frame or the finished ggplot object. Input for th data-set can be an MbecData-object, a phyloseq-object or a list that contains counts and covariate data. The covariate table requires an 'sID' column that contains sample IDs equal to the sample naming in the counts table. Correct orientation of counts will be handled internally.
A vector of fdr corrected p-values that show significance of treatment for every feature
1 2 3 | # This will return p-value for the linear model fit of every feature.
val.score <- mbecLM(input.obj=dummy.mbec, model.vars=c("batch","group"),
method="lm")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.