Learn R Programming

fossil (version 0.4.0)

aic.nest: Nestedness of samples using AIC

Description

Test if two empirical samples are drwan from the same or different communities

Usage

aic.nest(comm1, comm2, base=exp(1))

Arguments

comm1, comm2

lists of abundance data from two empirical samples

base

base of the log used in the calculation of Shannon's diversity

Value

returns two AIC scores, the first assuming the two empirical samples are drawn from the same distribution, the other assuming the two empirical samples are from different distributions

Details

This function tests if two empirical samples are drawn from the same community, based on the AIC scores.

See Also

simpson

Examples

Run this code
# NOT RUN {
#for example, two different communities
a<-c(12,4,12,1,4,0,6,5,0,0,0)
b<-c(0,11,4,3,6,7,7,2,23,5,8)

#if the aic score is lower, it is the better model
aic.nest(a,b)

#from the same community
a<-c(5,6,5,6,5,6,5,6,5,2,1,1)
b<-c(2,3,2,3,2,3,2,3,2,1,0,0)
aic.nest(a,b)
# }

Run the code above in your browser using DataLab