Connolly et al. (2013; Appendix 1) shows that there is an equivalence between DI models and different types of richness models (linear and nonlinear predictors using richness in different scales).
This function fits four models and compares them using AIC. The four models are:
1. The richness model
$$y = Intercept + Slope * Richness + \epsilon;$$
2. The average pairwise interactions (AV) DI model with common identity effects and theta equal to 0.5 (which is equivalent to model 1 when communities are all equi-proportional);
3. The average pairwise interactions (AV) DI model with common identity effects and estimating theta;
4. The average pairwise interactions (AV) DI model allowing for unique identity effects, but maintaining theta equal to 0.5;
5. The average pairwise interactions (AV) DI model allowing for unique identity effects, and estimating theta.
The function prints a table with AIC, AICc, BIC, and associated degrees of freedom for each of the four models above, and returns the model with the smallest AIC.