# presence/absence tables for longhorn beetles of South and North Europe
data(ceram.s)
data(ceram.n)
# spatial coordinates of territories in South and North Europe
data(coords.s)
data(coords.n)
# dissimilarity matrices
ceram.s.sim<-beta.pair(ceram.s)$beta.sim
ceram.n.sim<-beta.pair(ceram.n)$beta.sim
# spatial distances in km
distgeo.s<-dist(coords.s[,1:2])
distgeo.n<-dist(coords.n[,1:2])
# Negative exponential distance decay models
decay.south<-decay.model(y=1-ceram.s.sim, x=distgeo.s, y.type="sim", model.type="exp")
decay.north<-decay.model(y=1-ceram.n.sim, x=distgeo.n, y.type="sim", model.type="exp")
# Plot the decay models
plot.decay(decay.south, col="red")
plot.decay(decay.north, col="blue", add=TRUE)
# Assess North-South difference between intercepts and slopes
zdep(decay.south, decay.north, resamples=1000)
Run the code above in your browser using DataLab