kdfun {ads} | R Documentation |
Multiscale second-order neighbourhood analysis of a spatial phylogenetic or functional community pattern from fully mapped data
Description
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).
Usage
kdfun(p, upto, by, dis, nsim=0, alpha = 0.01)
Arguments
p |
a |
upto |
maximum radius of the sample circles (see Details). |
by |
interval length between successive sample circles radii (see Details). |
dis |
a |
nsim |
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 |
alpha |
if |
Details
Function kdfun
computes Shen et al. (2014) and gd-functions. For a multivariate point pattern consisting of
species with intensity
p, such functions can be estimated from the bivariate
-functions between each pair of different species
and
.
Function
kdfun
is thus a simple wrapper of k12fun
(P?Pelissier & Goreaud 2014):
.
.
where and
are distance-dependent versions of Simpson's diversity index,
(see
ksfun
), and
are distance-dependent versions of Rao's diversity coefficient (see
krfun
);
is the distance between species
and
defined by matrix
dis
, typically a taxonomic, phylogenetic or functional distance. The advantage here is that as the edge effects vanish between and
,
implementation is fast for a sampling window of any shape.
provides the expected phylogenetic or functional distance of two heterospecific individuals a distance less than r apart (Shen et al. 2014), while
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 ,
by randomizing the between-species distances, keeping the point locations and distribution of species labels unchanged. The theoretical expectations of
and
are thus
.
Value
A list of class "fads"
with essentially the following components:
r |
a vector of regularly spaced out distances ( |
gd |
a data frame containing values of the function |
kd |
a data frame containing values of the function |
Each component except r
is a data frame with the following variables:
obs |
a vector of estimated values for the observed point pattern. |
theo |
a vector of theoretical values expected under the null hypothesis of species equivalence. |
sup |
(optional) if |
inf |
(optional) if |
pval |
(optional) if |
Note
There are printing and plotting methods for "fads"
objects.
Author(s)
References
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.
See Also
plot.fads
,
spp
,
ksfun
,
krfun
,
divc
.
Examples
data(Paracou15)
P15<-Paracou15
## Not run: spatial point pattern in a rectangle sampling window of size 125 x 125
swmr <- spp(P15$trees, win = c(175, 175, 250, 250), marks = P15$species)
## Not run: testing the species equivalence hypothesis
kdswmr <- kdfun(swmr, dis = P15$spdist, 50, 2, 100)
## Not run: running more simulations is slow
kdswmr <- kdfun(swmr, dis = P15$spdist, 50, 2, 500)
plot(kdswmr)
## Not run: spatial point pattern in a circle with radius 50 centred on (125,125)
swmc <- spp(P15$trees, win = c(125,125,50), marks = P15$species)
kdswmc <- kdfun(swmc, dis = P15$spdist, 50, 2, 100)
## Not run: running more simulations is slow
kdswmc <- kdfun(swmc, dis = P15$spdist, 50, 2, 500)
plot(kdswmc)
## Not run: spatial point pattern in a complex sampling window
swrt <- spp(P15$trees, win = c(125,125,250,250), tri = P15$tri, marks = P15$species)
kdswrt <- kdfun(swrt, dis = P15$spdist, 50, 2, 100)
## Not run: running simulations is slow
kdswrt <- kdfun(swrt, dis = P15$spdist, 50, 2, 500)
plot(kdswrt)