Introduction to Ants Dataset

We begin by examining the ants dataset and running a quadrat test.

mytest <- quadrat.test(ants)
## Warning: Some expected counts are small; chi^2 approximation may be inaccurate
summary(ants)
## Marked planar point pattern:  97 points
## Average intensity 0.0002261486 points per square unit (one unit = 0.5 feet)
## 
## Coordinates are integers
## i.e. rounded to the nearest unit (one unit = 0.5 feet)
## 
## Multitype:
##             frequency proportion    intensity
## Cataglyphis        29  0.2989691 6.761144e-05
## Messor             68  0.7010309 1.585372e-04
## 
## Window: polygonal boundary
## single connected closed polygon with 11 vertices
## enclosing rectangle: [-25, 803] x [-49, 717] units
##                      (828 x 766 units)
## Window area = 428922 square units
## Unit of length: 0.5 feet
## Fraction of frame area: 0.676

Ants Quadrat Test Plot

1.2. This data set consists of two different types of ants, cataglyphis and messor. There are 97 points. 2.2 This data set is marked, and the marks represent the ant type (cataglyphis or messor) The p-value was 0.5417. Because this is greater than 0.05, I would not reject the null hypothesis.

Histogram

Next, we make a histogram of the residuals.

resids <- mytest$residuals
hist(resids)

Quadrat Tests on Ant Categories

Next, we will split the ants data set and run a couple qudrat tests.

ants_split <- split.ppp(ants)
names(ants_split)
## [1] "Cataglyphis" "Messor"
cata <- ants_split[["Cataglyphis"]]
quadrat.test(cata)
## Warning: Some expected counts are small; chi^2 approximation may be inaccurate
## 
##  Chi-squared test of CSR using quadrat counts
## 
## data:  cata
## X2 = 33.133, df = 23, p-value = 0.1575
## alternative hypothesis: two.sided
## 
## Quadrats: 24 tiles (irregular windows)
mess <- ants_split[["Messor"]]
quadrat.test(mess)
## Warning: Some expected counts are small; chi^2 approximation may be inaccurate
## 
##  Chi-squared test of CSR using quadrat counts
## 
## data:  mess
## X2 = 15.153, df = 23, p-value = 0.2219
## alternative hypothesis: two.sided
## 
## Quadrats: 24 tiles (irregular windows)

The p-value for the cataglyphis is 0.1575. Because this value is greater than 0.05, it is not enough to reject the null hypothesis (it is possible it could be random.)

The p-value for messor is 0.2219. This value is even larger than 0.05, perhaps indicating it is even more likely that this could possibly be random, because we do not have enough evidence to reject the null hypothesis.

Gest

Next, we will do a significance test not based on density, but distance.

Ants_G_env <- envelope(ants, Gest, nsim=95, alpha = 0.05)
## Generating 95 simulations of CSR  ...
## 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
## 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
## 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
## 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
## 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 
## 95.
## 
## Done.
plot(Ants_G_env)

This plot shows that it neither goes above or below the 95% confidence interval, indicating neither clumping nor over-regularity. This data is likely truly random.

Multi-type and Bivariate Point Pattern Analysis

Next, we’ll do a Gcross, Kcross, and pcfcross test.

envelope(lansing, Gcross, nsim = 99, i = 'maple', j = 'hickory') |> plot()
## Generating 99 simulations of CSR  ...
## 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
## 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
## 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
## 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
## 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 
## 99.
## 
## Done.

The empirical estimate (observed data) goes below the theoretical curve, indicating that there is cross-type repulsion, or that hickory and maple trees avoid each other, because each tree is, on average, further away from a neighbor of opposite type than would be expected randomly.

envelope(lansing, Kcross, nsim = 99, i = 'maple', j = 'hickory') |> plot()
## Generating 99 simulations of CSR  ...
## 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
## 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
## 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
## 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
## 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 
## 99.
## 
## Done.

The Kij(r) function line for our data goes below the theoretical line. This means that there is likely aversion on inhibition between hickory and maple trees, because given a randomly selected maple tree, the number of hickory trees within r distance is lower than would be expected randomly.

envelope(lansing, pcfcross, nsim = 99, i = 'maple', j = 'hickory') |> plot()
## Generating 99 simulations of CSR  ...
## 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
## 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
## 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
## 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
## 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 
## 99.
## 
## Done.

Here, the giij(r) is less than one, as seen on the graph, indicating that maple and hickory trees are repelling each other at a distance r.

All three of these functions share consistant findings that indicate hickory and maple trees are averse to each other.

##Ants! Let’s do the same thing, but with ants!

envelope(ants, Gcross, nsim = 99, i = 'Cataglyphis', j = 'Messor') |> plot()
## Generating 99 simulations of CSR  ...
## 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
## 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
## 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
## 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
## 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 
## 99.
## 
## Done.

Here, we see that the observed data is neither above or below the theoretical curve, indicating the spatial arrangement is consistent with independence.

envelope(ants, Kcross, nsim = 99, i = 'Cataglyphis', j = 'Messor') |> plot()
## Generating 99 simulations of CSR  ...
## 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
## 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
## 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
## 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
## 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 
## 99.
## 
## Done.

Similarly, the observed data closely follows the theoretical curve. The expected number of messor ant hills at a given distance away from a random cataglyphis ant hill is what you would expect under random conditions.

envelope(ants, pcfcross, nsim = 99, i = 'Cataglyphis', j = 'Messor') |> plot()
## Generating 99 simulations of CSR  ...
## 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
## 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
## 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
## 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
## 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 
## 99.
## 
## Done.

Finally, the observed data is close to 1, meaning the probability of finding a messor ant hill or a cataglyphis ant hill at a given distance r is the same as would be observed under random conditions. These are likely spatially independent ant types.

##Longleaf Data Set I would hypothesize that the further away a tree is from its nearest neighbor, the larger its size is likely to be. This is because younger, smaller trees are still competing for resources with each other, whereas a larger tree has “beat” its competition and grown large.

plot(E)

9.2Where r values (distance) is smaller, there is a deviation from the null expectation. The value is less than one, meaning trees with different diameters are found close to each other. This differs from my hypothesis.

As r increases, the data gets closer to 1, but always stays a little bit below it. I wonder if this is because trees are dropping seeds, so small saplings may sprout up near bigger trees, but fail to develop fully.

There are some smaller deviations around 30-40 meters away, and I am uncertain what would explain this.

10.2 The deviation suggests a negative association. Trees with different diameters tend to be found close to one another.

11.2 This could mean that trees do not tend to be near other trees of similar sizes, but are more often found near trees of different sizes, for the reasons explained in 9.2 above.

##Anemones! Let’s do similar things for anemones!

plot(A)

This graph is similar to the longleaf data when distances are short: anemones with different sizes tend to be found closer to each other. However, as the distance gets longer, anemones with similar sizes tend to be found closer to one another.

12.6 To explain this, I might hypothesize that smaller anemones are likely to grow as offshoots of larger ones, but they are unlikely to develop to maturity due to competition for resources. However, larger anemones do not interfere with each other’s growth, and may even be helpful in cultivating a steady fish supply, which is likely important to the anemones.