aic.nest {fossil} | R Documentation |
Test if two empirical samples are drwan from the same or different communities
aic.nest(comm1, comm2, base=exp(1))
comm1 , comm2 |
lists of abundance data from two empirical samples |
base |
base of the log used in the calculation of Shannon's diversity |
This function tests if two empirical samples are drawn from the same community, based on the AIC scores.
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
Matthew Vavrek
#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)