I, and three additional parameters (h, A and $\sigma$) describing the way traits determine species competitive ability.
The model additionnally requires two fixed variables: the total number of individuals in the local community J and the number of traits used n_t.
The model outputs four summary statistics: the species richness of the community S, its Shannon's index H, the mean of the trait value among individuals MTV and the skewness of the trait value distribution STV.
The simulation code trait_model reads sequentially J, I, A, n_t, h and $\sigma$.trait_model(input=c(1,500,1,1,1,1))Run the code above in your browser using DataLab