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, y = "yield".

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 prop = c("p1","p2","p3","p4"). Alternatively, the column numbers can be specified, for example, prop = 4:7, where the species proportions are in the 4th to 7th columns.

data

Specify the dataset, for example, data = Switzerland. The dataset name should not appear in quotes.

extra_formula

Additional terms can be added using extra_formula. A ~ must be included before specifying the terms. For example, extra_formula = ~ treatment:AV will add a treatment effect. Any variable included directly in extra_formula must already be contained in the dataset (interaction variables can be created using the function DI_data, if required).

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

DI autoDI

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)
  

[Package DImodels version 1.3 Index]