I have a question going in the same direction as this one: Restricted Permutations
However, I have a dataset of multiple Locations from which I have samples of sometimes 5 sometimes only 3 years. Not all locations were sampled in every year. I ended up having a dataset with observations e.g. several allel frequncies and a dataset with explanatory variables for every location. The second dataset contains information about soil characteristics, ownership of the fields and other agronomicaly relevant factors.
I want to use the second dataframe to explain the variance of my observations and came across RDA which seems appropriate. However, I don't know whether I can account for the repeated measures design in RDA or whether to use other statistical approaches in that regard.
I would like to control for the repeated measures design, while being aware of the missing data. I don't know whether this matters.
Second part of the question: I would like to do the analysis in R
. Is the vegan
package the best choice for this or are there alternative options? Also, do the observations need to be sorted by site within every year and do I need to put Location
as a conditional factor? I know I can add conditional variables in RDA together with constrained variables but would it be sufficient to account for Year and Location as conditional variable?
I was approaching the problem with R and package vegan in the following way but is this the correct application?
rda("MyObservation"~"some-Constrained-Variables"+Condition("Location"+"Year"),"dataset")