I have a dataset of fish species abundances collected from 6 different habitats over the course of 30 years. Fish were collected multiple times per year and environmental variables were recorded at the time of sampling. I am running a multivariate GLM through the R package mvabund because I want to include the whole species matrix. How do I control for the fact that the samples are not independent from each other (i.e. are part of a time series data set collected at the same locations over 30 years)?. Mvabund doesn't have the ability to run the model with random factors. Would running the model with site included as a fixed factor and year included as a blocking variable be a valid approach?
mvabund does not support random effects, so you can't fit random intercepts as you would with a mixed effects model to handle repeated measures. I can think of a two suggestions:
as you suggest you could fit fixed effects for the grouping IDs that you would otherwise have fitted random intercepts for. It sounds as though you may have 6 sites nested within 30 years, so this will entail 30 estimates for year, and 6 x 30 = 180 estimates for the interaction, which should be avoided if possible.
you can adopt a Bayesian approach using, for example, MCMCglmm or R.