date()
## [1] "Tue Mar 19 20:01:45 2013"
Using the ants data set
require("spatstat")
## Loading required package: spatstat
## Warning: package 'spatstat' was built under R version 2.15.2
## Loading required package: mgcv
## This is mgcv 1.7-18. For overview type 'help("mgcv-package")'.
## Loading required package: deldir
## Warning: package 'deldir' was built under R version 2.15.2
## deldir 0.0-21
## spatstat 1.29-0 Type 'help(spatstat)' for an overview of spatstat
## 'latest.news()' for news on latest version 'licence.polygons()' for
## licence information on polygon calculations
data(ants)
SP = ants
plot(SP)
## Cataglyphis Messor
## 1 2
Cataglyphis = ants[ants$marks == "Cataglyphis"]
Messor = ants[ants$marks == "Messor"]
GCat = Gest(Cataglyphis)
plot(GCat)
## lty col key label meaning
## km 1 1 km hat(G)[km](r) Kaplan-Meier estimate of G(r)
## rs 2 2 rs hat(G)[bord](r) border corrected estimate of G(r)
## han 3 3 han hat(G)[han](r) Hanisch estimate of G(r)
## theo 4 4 theo G[pois](r) theoretical Poisson G(r)
GMes = Gest(Messor)
plot(GMes)
## lty col key label meaning
## km 1 1 km hat(G)[km](r) Kaplan-Meier estimate of G(r)
## rs 2 2 rs hat(G)[bord](r) border corrected estimate of G(r)
## han 3 3 han hat(G)[han](r) Hanisch estimate of G(r)
## theo 4 4 theo G[pois](r) theoretical Poisson G(r)
We find that for the Messor nests the observed G value is less than the theoretical value. This indicates spatial regularity. This is different from the Cataglyphis nests, which have observed G values greater than those estimated at distances less than approximately 15 feet. This indicates that their spacing could be described as random.
plot(Kcross(SP, "Cataglyphis", "Messor"))
## lty col key
## iso 1 1 iso
## trans 2 2 trans
## border 3 3 border
## theo 4 4 theo
## label
## iso hat(K[list(Cataglyphis, Messor)]^{ iso})(r)
## trans hat(K[list(Cataglyphis, Messor)]^{ trans})(r)
## border hat(K[list(Cataglyphis, Messor)]^{ bord})(r)
## theo { K[list(Cataglyphis, Messor)]^{ pois }}(r)
## meaning
## iso Ripley isotropic correction estimate of Kcross["Cataglyphis", "Messor"](r)
## trans translation-corrected estimate of Kcross["Cataglyphis", "Messor"](r)
## border border-corrected estimate of Kcross["Cataglyphis", "Messor"](r)
## theo theoretical Poisson Kcross["Cataglyphis", "Messor"](r)
Reading this graph, we see that the observed value is greater than the theoretical value. This means that we find more instances of the other species of nests at each distance than would be expected if it were distributed by purely random means. This would indicate that one species of nest does not affect the location of other nests, they are independant.
SP.model = ppm(SP, trend = ~1, interaction = Strauss(r = 100), rbord = 100)
SP.model
## Stationary Strauss process
## Possible marks:
## Cataglyphis Messor
##
## First order terms:
## beta_Cataglyphis beta_Messor
## 0.0005393 0.0005393
##
## Interaction: Strauss process
## interaction distance: 100
## Fitted interaction parameter gamma: 0.8102
##
## Relevant coefficients:
## Interaction
## -0.2105
##
## For standard errors, type coef(summary(x))
The first order term for both beta cataglyphis and beta Messor are larger than the actual intensity (6.76e-05 and 1.59e-04 respectively). This indicates that both are inhibiting processes, though the Cataglyphis is much greater of an inhibitor than the Messor. This shows that when it comes to nests, there is a very strong inhibiting factor of existant Cataglyphis nests which reduce the number of nests from 5.3e-04 to 6.76e-05. We also see that Messor nests are inhibited from 5.4e-04 to 1.59e-04. Addtionally, we also see that the fitted interaction parameter gamma and interaction coefficients are less than 1 (.8102) and less than zero (-0.21) respectively, which both indicate inhibition processes.