plotContrasts {variancePartition} | R Documentation |
Plot contrast matrix to clarify interpretation of hypothesis tests with linear contrasts
plotContrasts(L)
L |
contrast matrix |
ggplot2 object
# load library # library(variancePartition) # load simulated data: # geneExpr: matrix of gene expression values # info: information/metadata about each sample data(varPartData) # 1) get contrast matrix testing if the coefficient for Batch2 is zero # 2) get contrast matrix testing if the coefficient for Batch2 is different from Batch3 form <- ~ Batch + (1|Individual) + (1|Tissue) L = makeContrastsDream(form, info, contrasts=c("Batch2", Batch_3_vs_2 = "Batch3 - Batch2")) # plot contrasts plotContrasts( L )