Applied Spatial Statistics: Problem Set # 2

Mike Patterson

date()
## [1] "Tue Mar 19 20:01:45 2013"

Due Date: March 20, 2013

Total Points: 40

Using the ants data set

  1. Plot the nest locations.
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)

plot of chunk unnamed-chunk-2

## Cataglyphis      Messor 
##           1           2
  1. Create separate ppp objects for the two types of ants.
Cataglyphis = ants[ants$marks == "Cataglyphis"]
Messor = ants[ants$marks == "Messor"]
  1. Plot the G function for the Cataglyphis and Messor ants separately. What do you find?
GCat = Gest(Cataglyphis)
plot(GCat)

plot of chunk unnamed-chunk-4

##      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)

plot of chunk unnamed-chunk-4

##      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.

  1. Plot the Kcross function and describe the evidence for inter-species clustering.
plot(Kcross(SP, "Cataglyphis", "Messor"))

plot of chunk unnamed-chunk-5

##        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.

  1. Create an umarked ppp object and model the nests using a Strauss process with interaction distance of 100 and border correction distance of 100. Interpret the first order term and interaction parameter.
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.