compareModules: compareModules

Description Usage Arguments Value Examples

View source: R/compareModules.R

Description

This takes a correlation matrix or 3D landmark array, a model definition, and then two module numbers or names to compare. It plots (if plot = TRUE) a figure of three boxplots - the first two are the correltions within each of the two modules, and the third is the between-module correlations. These boxes are coloured such that matching colours are not significantly different according to a Tukey HSD test. The results of the anova and tukey HSD test are also returned.

Usage

1
compareModules(corr, model, test_modules, plot = TRUE)

Arguments

corr

A correlation matrix or a 3D array of landmarks. If 3D then a correlation matrix is calculated with dotcorr

model

Either a vector of numbers describing a model of modules, or a 2 column dataframe with the first bein landmark names and the second being the module definitions.

test_modules

A vector of two module numbers to compare, or if the modules are named, the names of those two modules.

plot

Logical - if TRUE the plot is drawn.

Value

A list with two elements - the first is the result of an ANOVA compaing the mean correlations within- and between-modules, and the second is the results of a TukeyHSD test on that ANOVA. If plot = TRUE a plot showing these results is called.

Examples

1
2
3
4
5
6
7
8
9
data(macacaCorrel)
data(macacaModels)
# Pick a model to draw modules from - as a vector.
model <- macacaModels$Goswami
compareModules(corr = macacaCorrel, model = model, test_modules = c(2, 5))

# Or as a 2 column dataframe...
model <- macacaModels[ , c(1, 4)]
compareModules(corr = macacaCorrel, model = model, test_modules = c(2, 5))

hferg/EMMLiv2 documentation built on Nov. 30, 2017, 4:35 p.m.