batchBoxplot | R Documentation |
batchBoxplot
function will plot residuals of linear mixed effects model for a single feature by batch to visualize additive and multiplicative batch effects. Data should be in "long" format. Depends on lme4
package.
batchBoxplot( idvar, batchvar, feature, formula, ranef, data, adjustBatch = FALSE, orderby = "mean", plotMeans = TRUE, colors = "grey", xlabel = "batch", ylabel = "residuals", title = "", verbose = TRUE, ... )
idvar |
character string that specifies name of ID variable. ID variable can be factor, numeric, or character. |
batchvar |
character string that specifies name of the batch variable. Batch variable should be a factor. |
feature |
character string that specifies name of the numeric feature variable, or the numeric index of the corresponding column. |
formula |
character string representing all fixed effects on the right side of the formula for the linear mixed effects model. This should be in the notation used by |
ranef |
character string representing formula for the random effects in the notation used by |
data |
name of the data frame that contains the variables above. Rows are different observations (subject/timepoints), columns are different variables. |
adjustBatch |
should residuals be adjusted for the fixed effect of batch? Logical |
orderby |
|
plotMeans |
should batch means be plotted on top of the boxplots? Logical |
colors |
vector of colors the same length and order as |
xlabel |
x-axis label (character string). Default is |
ylabel |
y-axis label (character string). Default is |
title |
main title for the plot, default is no title (character string). |
verbose |
prints messages. Logical |
... |
other graphical parameter arguments passed to |
Creates a boxplot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.