0
$\begingroup$

I am using 'adonis' from the vegan package in R to perform a permanova on butterfly species composition in tropical forest. I have two independent variables: Habitat (Undisturbed, Logged, Burnt) and Month (August-April) and want to see how they impact the composition and if there's an interaction.

butterfly_1 <- butterfly[,3:21]
butterfly_2 <- butterfly[,1:2]
butterfly.Mat <- vegdist(butterfly_1, method = "bray")
B.Ado <- adonis(butterfly.Mat ~ Habitat*Month, data=butterfly_2, method = "bray", permutations = 999)
B.Ado

If the coding above is right, which I'm not 100% sure it is, I don't understand why the output is has zero value for the F value and 1 for every p value, I'm assuming this isn't correct? Is it something to do with the zeros degrees of freedom for the residuals?

Call:
adonis(formula = butterfly.Mat ~ Habitat * Month, data = butterfly_2,      permutations = 999, method = "bray") 

Permutation: free
Number of permutations: 999

Terms added sequentially (first to last)

              Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)
Habitat        2    3.9615       2       0 0.59769      1
Month          8    1.3748       0       0 0.20743      1
Habitat:Month 16    1.2916       0       0 0.19488      1
Residuals      0    0.0000     Inf         0.00000       
Total         26    6.6279                 1.00000       

This is the output from dput(butterfly) if it helps to recreate the same the data.

structure(list(Month = structure(c(2L, 2L, 2L, 9L, 9L, 9L, 8L, 
8L, 8L, 7L, 7L, 7L, 3L, 3L, 3L, 5L, 5L, 5L, 4L, 4L, 4L, 6L, 6L, 
6L, 1L, 1L, 1L), .Label = c("April", "August", "December", "February", 
"January", "March", "November", "October", "September"), class = "factor"), 
    Habitat = structure(c(1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 
    1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L, 
    1L, 2L, 3L), .Label = c("B", "L", "U"), class = "factor"), 
    Agatasa.calydonia = c(0L, 5L, 2L, 0L, 9L, 5L, 0L, 12L, 6L, 
    0L, 12L, 13L, 0L, 9L, 12L, 0L, 15L, 19L, 0L, 2L, 6L, 0L, 
    12L, 14L, 0L, 24L, 26L), Charaxes.bernardus = c(0L, 1L, 2L, 
    0L, 3L, 3L, 0L, 2L, 4L, 0L, 2L, 4L, 0L, 3L, 0L, 0L, 7L, 6L, 
    0L, 3L, 1L, 0L, 2L, 5L, 0L, 15L, 15L), Charaxes.borneensis = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L), Charaxes.solon = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L), Dophla.evelina = c(0L, 
    10L, 16L, 0L, 3L, 6L, 0L, 6L, 6L, 0L, 24L, 38L, 0L, 1L, 9L, 
    0L, 12L, 13L, 0L, 2L, 3L, 0L, 1L, 5L, 0L, 8L, 10L), Euthalia.monina = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L), Lexias.canescens = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L), Lexias.cyanipardus = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 2L), Lexias.pardalis = c(0L, 
    0L, 4L, 0L, 4L, 1L, 0L, 6L, 10L, 0L, 2L, 1L, 0L, 2L, 0L, 
    0L, 2L, 2L, 0L, 6L, 5L, 0L, 1L, 3L, 0L, 14L, 14L), Melanitis.leda = c(0L, 
    17L, 17L, 1L, 5L, 9L, 2L, 5L, 1L, 2L, 1L, 1L, 0L, 0L, 0L, 
    0L, 0L, 0L, 2L, 1L, 4L, 3L, 4L, 3L, 0L, 2L, 2L), Mycalesis.patiana = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 1L, 0L), Mycalesis.pitana = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 2L, 0L, 0L, 2L, 0L, 
    1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L), Paunis.stompiax = c(0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 2L, 0L), Polyura.hebe = c(0L, 
    0L, 0L, 0L, 1L, 3L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), Prothoe.franck = c(0L, 
    7L, 9L, 0L, 3L, 6L, 0L, 0L, 6L, 0L, 4L, 6L, 0L, 4L, 0L, 0L, 
    3L, 5L, 0L, 1L, 5L, 0L, 5L, 7L, 0L, 11L, 19L), Tanaecia.clathrata = c(0L, 
    1L, 0L, 0L, 3L, 1L, 0L, 4L, 2L, 0L, 4L, 7L, 0L, 5L, 3L, 0L, 
    0L, 1L, 0L, 0L, 4L, 0L, 1L, 0L, 0L, 8L, 11L), Tanaecia.munda = c(0L, 
    0L, 1L, 0L, 0L, 5L, 0L, 2L, 7L, 0L, 8L, 0L, 1L, 0L, 0L, 0L, 
    0L, 1L, 0L, 0L, 0L, 0L, 0L, 3L, 0L, 9L, 8L), Zeuxidia.aurelius = c(0L, 
    4L, 4L, 0L, 5L, 1L, 0L, 2L, 8L, 1L, 2L, 2L, 0L, 1L, 0L, 0L, 
    3L, 2L, 0L, 1L, 4L, 0L, 1L, 2L, 0L, 5L, 3L), Dummy = c(1L, 
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L)), class = "data.frame", row.names = c(NA, 
-27L))

Thanks in advance.

$\endgroup$
  • 1
    $\begingroup$ Indeed it looks like you're trying to test the effects of too many variables with only 27 individuals. You only have one replicate for each modality of Month:Habitat so you cannot perform any statistical test I think. $\endgroup$ – Circus pygargus Jun 16 at 15:15
  • 1
    $\begingroup$ Circus pygargus is right. Perhaps you could code Month as a continuous variable instead of categorical - have August as 1, September as 2 etc. On the one hand, this makes sense as September is likely to be more similar to October than to February for example. On the other hand, it won't take into account the annual cycle - April will be more distant from September than March, although the cyclical nature means maybe it shouldn't be. Alternatively, you could find some other variable (temperature, precipitation) that accounts for the changes you expect to see between months. $\endgroup$ – rw2 Jun 22 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.