change significant figures in adonis in R?

1.3k views Asked by At

The adonis function in R apparently defaults to 3 sig-figs in the output p-values. Can this be altered such that higher sig-figs are output?

1

There are 1 answers

4
Peter Ellis On

I think looking at p-values to more than three significant digits is a very bad idea. However, adonis already gives you this, for number of permutations other than 999:

# Code
library(vegan)
data(dune)
data(dune.env)
## default test by terms
adonis(dune ~ Management*A1, data = dune.env, permutations = 1000)

# Results
Permutation test for adonis under reduced model
Terms added sequentially (first to last)
Permutation: free
Number of permutations: 1000

Call:
adonis(formula = dune ~ Management * A1, data = dune.env, permutations = 1000) 

Permutation: free
Number of permutations: 1000

Terms added sequentially (first to last)

              Df SumsOfSqs MeanSqs F.Model      R2   Pr(>F)   
Management     3    1.4686 0.48953  3.2629 0.34161 0.001998 **
A1             1    0.4409 0.44089  2.9387 0.10256 0.016983 * 
Management:A1  3    0.5892 0.19639  1.3090 0.13705 0.228771   
Residuals     12    1.8004 0.15003         0.41878            
Total         19    4.2990                 1.00000