# Is a linear mixed-effects model appropriate for my nested dataset?

I'm not entirely confident in the statistical method I am using for my study design, and would like some feedback/advice.

I am primarily looking at the effect of land use on stream chemistry parameters, however, I also want to examine the significance of season and stream flow. To test this, I developed a nested design. I have three land cover types, and I sampled five streams within each land cover 20 times. These 20 samples at each stream were taken during each season, some at high and some at low flows.

The dataset is large, but one iteration of an individual stream's data would look something like this:

I understand (or think I do) that, as a nested design, it would make sense to use a mixed-effects model with land cover as a fixed effect:

land cover + (1|stream ID)

But I would like to add flow and season as variables and create more complex models before comparing them using AIC, but I'm not exactly sure what they would look like? Something like:

flow + season + land cover + (1|stream ID) ???

Any suggestions would be appreciated!

You could certainly try to fit a linear mixed effects model to your data, however, you have two levels of clustering: 20 observations are made per stream, of which there are 5. And streams are further nested in 3 land cover types. So you have observations nested in streams and streams nested within land cover type.

So, you could run a model such as:

flow + season + landcover + (1|landcover/streamID)


However, the immediate problem is the number of clusters, 5 and 3 respectively. While you might just get away with 5, 3 is not really sufficient for a mixed model, since one assumption is that the cluster residuals are normally distributed, and with only 3 residuals at the landcover level, this will be impossible. One alternative, sticking with a mixed model, is to not use landcover as a random effect, but retain it as a fixed effect.

flow + season + landcover + (1|streamID)


Moving away from linear mixed models, your design is factorial, so I would certainly want to compare the output with a three way repeated measures anova.