syrjala.test {ecespa} | R Documentation |
Computes a two-sample Cramer-von Mises type test for a difference between the spatial distribution of two populations. It is designed to be sensitive to differences in the way the populations are distributed across the study area but insensitive to a difference in abundance between the two populations.
syrjala.test(ppp1, ppp2, nsim = 999) #S3 method for class 'ecespa.syrjala' plot.ecespa.syrjala(x, ...)
ppp1 |
A marked point pattern, with the ppp format of spatstat,
representing the values of some parameter measured on the corresponding sampling locations. |
ppp2 |
A marked point pattern, with the ppp format of spatstat,
representing the values of some other parameter measured on the same locations than ppp1 . |
nsim |
Number of permutations. |
x |
An object of class 'ecespa.syrjala ' resulting from syrjala.test |
... |
Graphical parameters passed to hist . |
The null hypothesis of Syrjala's test is that across the study area, the normalized distributions of the two populations are the same (Syrjala, 1996). Population density data are collected at K sampling locations on two populations. Let (xk, yk) denote the coordinates of the kth sampling location ( k= 1,...,K ); let d.i(xk, yk) denote the sample density at the Kth sampling location of the ith population. To construct a test that is independent of the population sizes, the observed density data is first normalized:
gamma.i(xk, yk) = di(xk, yk)/Di,
where Di is the sum of d.i(xk, yk) observations across the K sampling locations. The value of the cumulative distribution function at the location (xk, yk) for the ith population, denoted GAMMA.i(xk, yk), is the sum of all normalized density observations, gamma.i(xk, yk), whose location (x, y) is such that x <= xk and y <= yk. The statistic proposed by Syrjala to test the null hypothesis is the square of the difference between the cumulative distribution functions of the two populations, summed over all sampling locations, that is
psi = sum{GAMMA.1(xk, yk) - GAMMA.2(xk, yk)}^2.
As psi is not invariant with respect to the 'corner' of the rectangle enclosing the study area that is chosen as the origin of the coordinate sytem, psi is computed four times, one with each corner as the origin, and the average psi is employed as the test statistic. The level of significance of the observed psi is determined from its position in the ordered set of test statistic values from all 2^K pairwise permutations (that is approximated from a large number of randomly selected permutations).
syrjala.test
returns an object of class 'ecespa.syrjala
', basically a list with the following elements:
psi.obs |
The observed (averaged) psi statistic. |
psi.sim |
A vector with the nsim simulated psi's statistics. |
datanames |
A vector with the names of the two point patterns whose spatial congruence is been analyzed. |
nsim |
The number of permutations employed in the test. |
The S3 plot method plots an histogram with the distribution of the simulated psi's statistics and draws the observed psi as a vertical line.
The test requires both populations being sampled in exactly the same sampling locations.
Althoug this implementation employs ppp
's as the supporting data format, this kind of data are not spatial point patterns.
They cannot be analysed with the usual tools employed for marked point patterns.
One can use function haz.ppp
to easily build the ppp
objects from a data.frame
with only three columns (x-coordinate,
y-coordinate and abundance).
This function has been employed to compute Syrjala's test in Rey-Benayas et al. (2008).
Marcelino de la Cruz Rot marcelino.delacruz@upm.es
Rey-Benayas, J.M., de la Montaña, E., Pérez-Camacho, L., de la Cruz, M., Moreno, D., Parejo, J.L. and Suárez-Seoane, S. 2008. Inter-annual dynamics and spatial congruence of a nocturnal bird assemblage inhabiting a Mediterranean agricultural mosaic. Submitted.
Syrjala, S. E. 1996. A statistical test for a difference between the spatial distributions of two populations. Ecology 77: 75-80.
## Not run: data(syr1); data(syr2); data(syr3) plot(syrjala.test(syr1, syr2, nsim=999)) #non-significant difference of distributions plot(syrjala.test(syr1, syr3, nsim=999)) #significant difference of distributions ## End(Not run)