Learn R Programming

Traitspace (version 1.1)

TraitspaceMod: Modified Traitspace Model

Description

Implements the modified version of the Traitspace model of community assembly.

Usage

TraitspaceMod(level_1, level_2, level_3, site, N = 100)

Arguments

level_1
The data column containing species names.
level_2
The data column/s containing the trait values for one/multiple traits. One column per trait.
level_3
The data column/s containing the value of the enviroment gradient/s. One column per gradient.
site
The data column containing names of the sites
N
Size of the simulated trait sample per site

Value

A list which is an object of the "traitspace" class.
BIC_TE
The BIC value for the best gaussian mixture model fitted (using package mcluse) to the trait data in step 1A. A separate model is fitted for each trait.
BIC_TS
The BIC value for the best gaussian mixture model fitted (using package mclust) for each species in step 1B.
Predicted relative abundances
A matrix containing the predicted relative abundances
Predicted species distribution
A matrix containing the predicted species distribution

References

Laughlin, D. C., Joshi, C., Richardson, S. J., Peltzer, D. A., Mason, N. W. H., & Wardle, D. A. (2015). Quantifying multimodal trait distributions improves trait-based predictions of species abundances and functional diversity. Journal of Vegetation Science, 26(1), 45-57.

Laughlin, D. C., Joshi, C., Bodegom, P. M., Bastow, Z. A., & Fule, P. Z. (2012). A predictive model of community assembly that incorporates intraspecific trait variation. Ecology Letters, 15(11), 1291-1299.

See Also

Traitspace, TraitspaceMod

Examples

Run this code
data(spdata)
species<-spdata$species  #species column
trt<-cbind(spdata$t1,spdata$t2) #two traits
env<-spdata$env     #one env gradient
site<-spdata$site   #site information
result2<-TraitspaceMod(species, trt, env, site)
result2

Run the code above in your browser using DataLab