Permanova between a otutab and a variable
Permanova between a otutab and a variable (added two
)
permanova(
otutab,
envs,
norm = TRUE,
each = TRUE,
method = "adonis",
dist = "bray",
two = FALSE,
nperm = 999,
...
)
permanova(
otutab,
envs,
norm = TRUE,
each = TRUE,
method = "adonis",
dist = "bray",
two = FALSE,
nperm = 999,
...
)
an otutab data.frame, samples are columns, taxs are rows.
factors need to test
should normalize?(default:TRUE)
test factor one by one, rather than whole
adonis/mrpp/anosim/mantel
if use pcoa or nmds, your can choose a dist method (default: bray)
two by two adonis test
numbers of permutations to perform
additional
a g_test object with these columns
the test group or factor
relationship
model R-square
model test p_value
whether significant
data(otutab, package = "pcutils")
permanova(otutab, metadata[, c(2:10)]) -> adonis_res
print(adonis_res)
#> group r2 p_value sig
#> 1 Group 0.1843 0.001 TRUE
#> 2 env1 0.0769 0.044 TRUE
#> 3 env2 0.0624 0.304 FALSE
#> 4 env3 0.0766 0.041 TRUE
#> 5 env4 0.1157 0.001 TRUE
#> 6 env5 0.0966 0.007 TRUE
#> 7 env6 0.0600 0.371 FALSE
#> 8 lat 0.0582 0.449 FALSE
#> 9 long 0.0529 0.760 FALSE
plot(adonis_res)