Computes distance-dependent estimates of Shen et al. (2014) phylogenetic or functional mark correlation functions from a multivariate spatial point pattern in a simple (rectangular or circular) or complex sampling window. Computes optionally local confidence limits of the functions under the null hypothesis of species equivalence (see Details).
kdfun(p, upto, by, dis, nsim=0, alpha = 0.01)
A list of class "fads"
with essentially the following components:
a vector of regularly spaced out distances (seq(by,upto,by)
).
a data frame containing values of the function \(gd(r)\).
a data frame containing values of the function \(Kd(r)\).
Each component except r
is a data frame with the following variables:
a vector of estimated values for the observed point pattern.
a vector of theoretical values expected under the null hypothesis of species equivalence.
(optional) if nsim>0
a vector of the upper local confidence limits of a random distribution of the null hypothesis at a significant level \(\alpha\).
(optional) if nsim>0
a vector of the lower local confidence limits of a random distribution of the null hypothesis at a significant level \(\alpha\).
(optional) if nsim>0
a vector of local p-values of departure from the null hypothesis.
a "spp"
object defining a spatial point pattern in a given sampling window (see spp
).
maximum radius of the sample circles (see Details).
interval length between successive sample circles radii (see Details).
a "dist"
object defining Euclidean distances between species.
number of Monte Carlo simulations to estimate local confidence limits of the null hypothesis of a random allocation of species distances (species equivalence; see Details).
By default nsim = 0
, so that no confidence limits are computed.
if nsim>0
, significant level of the confidence limits. By default \(\alpha = 0.01\).
Function kdfun
computes Shen et al. (2014) \(Kd\) and gd-functions. For a multivariate point pattern consisting of \(S\) species with intensity \(\lambda\)p, such functions can be estimated from the bivariate \(Kpq\)-functions between each pair of different species \(p\) and \(q\).
Function kdfun
is thus a simple wrapper of k12fun
(P?Pelissier & Goreaud 2014):
\(Kd(r) = D * Kr(r) / HD * Ks(r) = D * sum(\lambda p * \lambda q * Kpq(r) * dpq) / HD * sum(\lambda p * \lambda q * Kpq(r))\).
\(gd(r) = D * g(r) / HD * gs(r) = D * sum(\lambda p * \lambda q * gpq(r) * dpq) / HD * sum(\lambda p * \lambda q * gpq(r))\).
where \(Ks(r)\) and \(gs(r)\) are distance-dependent versions of Simpson's diversity index, \(D\) (see ksfun
), \(Kr(r)\) and \(gr(r)\) are distance-dependent versions of Rao's diversity coefficient (see krfun
);
\(dpq\) is the distance between species \(p\) and \(q\) defined by matrix dis
, typically a taxonomic, phylogenetic or functional distance. The advantage here is that as the edge effects vanish between \(Kr(r)\) and \(Ks(r)\),
implementation is fast for a sampling window of any shape. \(Kd(r)\) provides the expected phylogenetic or functional distance of two heterospecific individuals a distance less than r apart (Shen et al. 2014), while \(gd(r)\)
provides the same within an annuli between two consecutive distances of r and r-by.
Theoretical values under the null hypothesis of species equivalence as well as local Monte Carlo confidence limits and p-values of departure from the null hypothesis (Besag & Diggle 1977) are estimated at each distance \(r\), by randomizing the between-species distances, keeping the point locations and distribution of species labels unchanged. The theoretical expectations of \(gd(r)\) and \(Kd(r)\) are thus \(1\).
Shen, G., Wiegand, T., Mi, X. & He, F. (2014). Quantifying spatial phylogenetic structures of fully stem-mapped plant communities. Methods in Ecology and Evolution, 4, 1132-1141.
P?Pelissier, R. & Goreaud, F. ads package for R: A fast unbiased implementation of the K-function family for studying spatial point patterns in irregular-shaped sampling windows. Journal of Statistical Software, in press.
plot.fads
,
spp
,
ksfun
,
krfun
,
divc
.