Applied Spatial Statistics: Problem Set # 2

Sarah Strazzo

date()
## [1] "Tue Mar 19 17:54:22 2013"

Due Date: March 20, 2013

Total Points: 40

require(spatstat)

Using the ants data set

1. Plot the nest locations.

plot(ants)

plot of chunk PlotNests

## Cataglyphis      Messor 
##           1           2

2. Create separate ppp objects for the two types of ants.

CAT = unmark(ants[ants$marks == "Cataglyphis"])
MES = unmark(ants[ants$marks == "Messor"])

3. Plot the G function for the Cataglyphis and Messor ants separately. What do you find?

plot(Gest(CAT))

plot of chunk GFunctions

##      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)
plot(Gest(MES))

plot of chunk GFunctions

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

For the Cataglyphis ants, for a given radius greater than 30 units (15 ft), the observed value of G is less than the theoretical value of G (blue line). This indicates spatial regularity - there are fewer nests in the vicinity of other nests than is expected by chance. For the Messor ants, the observed value of G is almost always less than the theoretical value of G, with the exception of very large radii. This again indicated spatial regularity.

4. Plot the Kcross function and describe the evidence for inter-species clustering.

plot(Kcross(ants, "Cataglyphis", "Messor"))

plot of chunk KCross

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

The estimates closely follow the theoretical poisson function, but are slightly higher than the theoretical curve. If the estimates follow the poisson curve, it indicates that the two types are independent of one another. At larger radii, the estimates fall slightly above the theoretical curve, which would indicate some inter-species clustering.

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

ants2 = unmark(ants)
ants.model = ppm(ants2, interaction = Strauss(r = 100), rbord = 100)
ants.model
## Stationary Strauss process
## 
## First order term:
##      beta 
## 0.0009962 
## 
## Interaction: Strauss process 
## interaction distance:    100
## Fitted interaction parameter gamma:  0.8189
## 
## Relevant coefficients:
## Interaction 
##     -0.1998 
## 
## For standard errors, type coef(summary(x))

The first order term, which gives the intensity of the proposal events, is 0.000996. The actual intensity is 97/[(803+25)*(717+49)], or 0.000153. Therefore, the first order term is about 9 times greater than the actual intensity, which would indicate an inhibition process. The interaction paramter is 0.8102. The interaction parameter is less than 1, indicating that events inhibit other nearby events.