myobj = rpoispp(500)
plot(myobj)
rpoispp(500)|>
plot()
pp <- rpoispp(500)
plot(density(pp))
contour(density(pp), add=T)
plot(pp, add=T)
add=T means the changes are not being applied to a new plot and being applied to the existing plot instead.
The numbers within the squares are the number of circles that are within each quadrat.
# of points | # of grid cells | P-values | Interpretation |
---|---|---|---|
500 | 400 | 0.2591 | random |
200 | 200 | 0.8081 | random |
700 | 900 | 0.682 | random |
{quadrat.test(rpoispp(500), nx = 20, ny = 20)}
quadrat.test(rpoispp(200), nx = 10, ny = 10)
quadrat.test(rpoispp(700), nx = 30, ny = 30)
pp <- rpoispp(function(x,y) {200*x + 200*y})
quadrat.test(pp, nx=8, ny=8)
plot(density(pp))
plot(pp, pch=1, add=TRUE)
p-value = 0.008854; It is not random
pp <- rpoispp(function(x,y) {200*x + 100*y})
quadrat.test(pp, nx=8, ny=8)
plot(density(pp))
plot(pp, pch=1, add=TRUE)
p-value = 0.04826; It is not random
pp <- rpoispp(function(x,y) {20*x + 200*y})
quadrat.test(pp, nx=8, ny=8)
plot(density(pp))
plot(pp, pch=1, add=TRUE)
p-value = 0.01451; It is not random.
Yes, the grid size can effect the interpretation of p-values. The smaller the grid size, the easier it is to detect trends because the bigger grid sizes with more points could mask trends and could slightly change the p-value. However, on the more extreme p-values, a trend is detected no matter what the grid size so the interpretation would not change.
The study area is 853,776 square feet.
There are 2251 trees in the Lansing data set.
The most abundant tree is the hickory and the least abundant tree is black oak.
Yes, the interpretation of the results are robust to variation in quadrat size.
pp <- rpoispp(500)
nn_means <- apply(nndist(pp, k=1:500), 2, mean)
plot(nn_means, type = "l")
rpoispp(500) |>
nndist(k=1:500) |>
apply(2, mean) |>
plot(type = "b")
The plot suggests that the maple trees are aggregated because the line falls below the random line meaning it has a shorter nearest neighbor distance.
The plot suggests that the cells are dispersed because the cells line is above the random line meaning they have a longer nearest neighbor distance.
The data somewhat wanders above the bounds of the confidence band in the middle of the graph This suggests the hickory trees are mostly random and sightly aggregated during those middle distances.
The data wanders above the bounds of the confidence band. This suggests that black oak tress are aggregated.
The data wanders below the the confidence band. This suggests the cells dataset is dispersed.
The data wanders above the bounds of the confidence band. This suggests the long leaf trees are aggregated.