richness_vs_DI {DImodels} | R Documentation |
Comparing the Richness Model with DI Alternatives
Description
This function provides an automated way to fit the richness model and a (limited) range of Diversity-Interactions (DI) models.
Usage
richness_vs_DI(y, prop, data, extra_formula)
Arguments
y |
The column name of the response vector, which must be in quotes, for example, |
prop |
A vector of s column names identifying the species proportions in each row in the dataset. For example, if the species proportions columns are labelled p1 to p4, then |
data |
Specify the dataset, for example, |
extra_formula |
Additional terms can be added using |
Details
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.
Value
The function returns the final selected model, an object of class DI
or lm
.
Author(s)
Rafael A. Moral, John Connolly, Rishabh Vishwakarma and Caroline Brophy
References
Connolly J, T Bell, T Bolger, C Brophy, T Carnus, JA Finn, L Kirwan, F Isbell, J Levine, A Lüscher, V Picasso, C Roscher, MT Sebastia, M Suter and A Weigelt (2013) An improved model to predict the effects of changing biodiversity levels on ecosystem function. Journal of Ecology, 101, 344-355.
See Also
Examples
## Load the Switzerland data
data(Switzerland)
## compare the richness model with DI alternatives
richness_vs_DI(y = "yield", prop = 4:7, data = Switzerland)
## include the density effects in the linear predictors of the four models
richness_vs_DI(y = "yield", prop = 4:7, data = Switzerland, extra_formula = ~ density)