PermanovaG: Permutational multivariate analysis of variance using...

Description Usage Arguments Value Author(s) References See Also Examples

Description

In practice, we do not know a priori which type of change happens in the microbiome. Each distance measure is most powerful in detecting only a certain scenario. When multiple distance matrices are available, separate tests using each distance matrix will lead to loss of power due to multiple testing correction. Combing the distance matrices in a single test will improve power. PermanovaG combines multiple distance matrices by taking the minimum of the P values for individual distance matrices. Significance is assessed by permutation.

Usage

1

Arguments

formula

FORMULA Left side of the formula (Y ~ X) is a three dimensional ARRAY containing the supplied distance matrices as produced by GUniFrac function. Or it could be a list of distance matrices.

dat

DATA.FRAME containing the covariates

...

Parameter passing to adonis function

Value

Return a LIST containing:

p.tab

DATA.FRAME (columns - p.values for individual distance matrices and the omnibus test (Note: sequential P values, put the variable of interest in the end), rows - covariates)

aov.tab.list

LIST of adonis AOV tables for individual distance matrices

Author(s)

Jun Chen <chen.jun2@mayo.edu>

References

Jun Chen et al. (2012). Associating microbiome composition with environmental covariates using generalized UniFrac distances. 28(16): 2106–2113.

See Also

Rarefy, GUniFrac

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(throat.otu.tab)
data(throat.tree)
data(throat.meta)

groups <- throat.meta$SmokingStatus

# Rarefaction
otu.tab.rff <- Rarefy(throat.otu.tab)$otu.tab.rff

# Calculate the UniFracs
unifracs <- GUniFrac(otu.tab.rff, throat.tree, alpha=c(0, 0.5, 1))$unifracs

#	Combine unweighted and weighted UniFrac for testing
PermanovaG(unifracs[, , c("d_1", "d_UW")] ~ groups)
# Combine d(0), d(0.5), d(1) for testing
PermanovaG(unifracs[, , c("d_0", "d_0.5", "d_1")] ~ groups)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
Loading required package: ape
$aov.tab
        F.Model p.value
groups 3.112225   0.005

$aov.tab
        F.Model p.value
groups 3.112225   0.004

GUniFrac documentation built on May 2, 2019, 2:08 a.m.