Skip to content

Proper way to test for nested effects within adonis2 #428

@tskretting

Description

@tskretting

I am an undergrad and new to R and vegan. Any help is greatly appreciated!!

My study involves community data of 3 quadrats at different distances per transect, and 4 transects per site. I am trying to see whether there are significant differences between quadrats nested within transect. My permutations are permuting quadrats within transects, keeping transect and site intact. Here is my code for how I am attempting this:

adonis2(samp ~group_transect/group_dist, data=df, permutations=perm, by="margin")

Is this the correct syntax to test the effects of distance class (group_dist) nested within transect (group_transect) or should the order of these variables be swapped?

#Marginal effects of terms
#Blocks: group_site
#Plots: group_transect, plot permutation: none
#Permutation: series
#Number of permutations: 999

#adonis2(formula = samp ~ group_transect/group_dist, data = df, #permutations = ctrl, by = "margin")

Df SumOfSqs R2 F Pr(>F)

#group_transect:group_dist 8 3.290 0.04915 1.5068 0.002 **
#Residual 232 63.312 0.94598
#Total 243 66.927 1.00000
#---
#Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘’ 0.05 ‘.’ 0.1 ‘ ’ 1

This is the output I get. Assuming I've got the nesting correct, am I correct then in interpreting this as a significant effect of distance class within transect? How can I tell whether there are significant differences between transects from this (running the model with site/transect/distanceclass does not give me an effect of transect within site)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions