Learn R Programming

labdsv (version 2.1-0)

ccm: Community Composition Modeling

Description

Compares the composition of modeled communities to real data using Bray-Curtis similarity

Usage

ccm(model,data)

Value

A list object with two components:

sim

a vector of similarities of modeled communities to actual data

diverse

Shannon-Weaver diversity values for modeled and real data

Arguments

model

fitted data from a predictive model

data

actual data from the modeled communities

Author

David W. Roberts droberts@montana.edu

Details

The algorithm sweeps through the fitted values and data one sample unit at time calculating the similarity to the simulated community to the real community. The calculation is similarity, not dissimilarity, and results in a vector of length equal to the number of sample units.

The diverse matrix has the diversity of the data in the first column, and the diversity of the simulated or fitted data in the second column.

Examples

Run this code
data(bryceveg) 
bryceveg <- dropspc(bryceveg,4)
bryce.bc <- dsvdis(bryceveg,'bray')
bryce.nmds <- nmds(bryce.bc)
if (FALSE) bryce.preds <- predict(bryce.nmds,bryceveg)
if (FALSE) bryce.ccm <- ccm(bryceveg,bryce.preds$fitted)
if (FALSE) summary(bryce.ccm$sim)
if (FALSE) boxplot(bryce.ccm$diverse)

Run the code above in your browser using DataLab