# Mixed model in R with paired design and covariates

I make habitat suitability models for animal species. The purpose of my research is to investigate the accuracy of different models.

I clearly have a nested design:

• accuracy_measure -> response variable
• 2 model types (model_type) -> fixed effect
• 230 species (species) -> random effect
• 10 replicates/species (replicate) -> random effect
• 10 subreplicate/replicate -> observation

So I have: $10\times 10\times 230$ observations/model, identified as speciesID-replicate-subreplicate (species_ID ranging 1:230, replicate 1:10 and subreplicate 1:10)

One could think about such mixed-effect model:

my.model <- lme(fixed = accuracy_measure~model_type, random = ~1|species/replicate)


I do not expand here into model simplification, yet... but here are my questions:

1. my replicates & subreplicates are paired in the sense that they come from the same split of the data. As an example for species X, the 20 observations of replicate1 of model A and B (10 for A and 10 for B) are linked by a same data split which is likely to influence my accuracy measure. In the same way the 2 observations replicate1-subreplicate2 of model A and B (1 for A and 1 for B) are also linked. Is there a way to introduce such pairing in a mixed effect model?

2. several continuous covariates, attributes of species (number of points for modelization, size in km2 of the range) may influence the measures of accuracy and I may be interested in investigating those effects. How could I include a covariate in such model? How should I strucutre it given that there are species covariates (high order of nesting)?

I hope that my questions are relevant!

-