decay.model: Fitting distance decay models to pair-wise assemblage...

decay.modelR Documentation

Fitting distance decay models to pair-wise assemblage similarity

Description

Fits a nonlinear model describing (i) the decay of assemblage similarity with spatial (or any other) distance, or, equivalently, (ii) the increase of assemblage dissimilarity with distance. Nonlinear models are fitted via the nls.lm function in the minpack.lm package (which uses the Levenberg-Marquardt Nonlinear Least-Squares Algorithm). Implemented functional forms are either the (i) negative exponential, (ii) power law, or (iii) Gompertz models.

Usage

decay.model(y, x, model.type = "exponential", y.type = "similarities", 
perm = 100, st.val = c(1, 0))

Arguments

y

codedist object, either containing similarities or dissimilarities between pairs of assemblages.

x

codedist object, containing distances (spatial or other) between pairs of assemblages.

model.type

functional form of the model, either negative exponential, power law, or Gompertz, partial match of "exponential", "power", or "gompertz".

y.type

polarity of the codedist object (i.e. 1 means total similarity or total dissimilarity), partial match of "similarities" or "dissimilarities".

perm

number of permutations to assess significance.

st.val

starting values for the nonlinear model.

Value

The function returns a list with:

data.y

original y data, codedist object, either containing similarities or dissimilarities between pairs of assemblages.

data.x

original x data, codedist object, containing distances (spatial or other) between pairs of assemblages.

model

the fitted nonlinear model.

model.type

functional form of the model, either negative exponential, power law, or Gompertz.

y.type

similarties or dissimilarities.

first.parameter

first parameter of the model. It can be either the intercept, i.e. similarity or dissimilarity at distance=0, in negative exponential or power law models, or the position parameter in Gompertz models.

second.parameter

slope of the model, i.e. rate at which similarity decreases with distance, or dissimilarity increases with distance in a negative exponential, power law or Gompertz model.

aic

AIC of the model.

pseudo.r.squared

proportion of the variation in the dependent variable that the model accounts for.

p.value

significance of the model, as estimated from a permutation test.

Author(s)

Sara Martínez-Santalla, Ramiro Martín-Devasa, Carola Gómez-Rodríguez, Rosa M. Crujeiras, Andrés Baselga

References

Gómez-Rodríguez C, Baselga A. 2018. Variation among European beetle taxa in patterns of distance decay of similarity suggests a major role of dispersal processes. Ecography 41: 1825-1834

Martínez-Santalla S, Martín-Devasa R, Gómez-Rodríguez C, Crujeiras RM, Baselga A. 2022. Assessing the non-linear decay of community similarity: permutation and site-block resampling significance tests. Journal of Biogeography 49: 968-978

Martín-Devasa R, Martínez-Santalla S, Gómez-Rodríguez C, Crujeiras RM, Baselga A. 2022. Species range size shapes distance decay in community similarity. Diversity and Distributions 28: 1348-1357

See Also

beta.pair, beta.pair.abund, plot.decay, boot.coefs.decay, zdep

Examples


# 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 models for the decay of similarity with spatial distance
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)

# Equivalent models for the increase of dissimilarity with spatial distance
increase.south<-decay.model(y=ceram.s.sim, x=distgeo.s, y.type="dissim", model.type="exp")
increase.north<-decay.model(y=ceram.n.sim, x=distgeo.n, y.type="dissim", model.type="exp")

# Plot the decay models
plot.decay(increase.south, col="red")
plot.decay(increase.north, col="blue", add=TRUE)


betapart documentation built on March 31, 2023, 10:29 p.m.