I'm trying to determine how plant trait_a and trait_b affect insect community composition. There are two levels of trait_a and trait_b that make up four treatment groups: a1b1, a1b2, a2b1, and a2b2. For each treatment group there were five unique plant genotypes but for this example I chose three/treatment. All plant genotypes were planted in two planting blocks in a randomized complete block design. In this example I selected 2 samples from each genotype x block . Each row of the data contains species abundances/counts of insect taxa in one sample. Here is the full data frame that includes sample metadata (block, treatment, etc.): library(vegan) library(dplyr) library(tidyverse) fulldf And here is the same data without the additional sample metadata columns (formatted for vegan): specabund % unite(col = "group", sample_id, block, treatment, trait_a, trait_b, genotype, sep = "; ")%>% column_to_rownames(var="group") I want to compare my treatments across both planting blocks with PERMANOVA. I read online (Univ. Washington Multivariate Statistics Text Chapters: PERMANOVA , Restricting Permutations ) that with randomized complete block design and other complex experimental designs, permutations need to be restricted for PERMANOVA. So I created a permutation object to shuffle my data by genotype. Then I used this permutation object for PERMANOVA with the species abundance matrix as the response and trait_a * trait_b as explanatory variables: perm Is this correct? I am mostly con…

Full article content could not be extracted automatically. Read the original below.