Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper way to test for nested effects within adonis2 #428

Open
tskretting opened this issue Jun 14, 2021 · 0 comments
Open

Proper way to test for nested effects within adonis2 #428

tskretting opened this issue Jun 14, 2021 · 0 comments

Comments

@tskretting
Copy link

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant