plotContrasts {variancePartition}R Documentation

Plot representation of contrast matrix

Description

Plot contrast matrix to clarify interpretation of hypothesis tests with linear contrasts

Usage

plotContrasts(L)

Arguments

L

contrast matrix

Value

ggplot2 object

Examples


# 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 )


[Package variancePartition version 1.23.3 Index]