The two different ways I found to rewrite the command with different syntax are as follows:
poisson_plot <- rpoispp(500)
plot(poisson_plot)
rpoispp(500)|>
plot()
According to the ?contour help page, the ‘add’ argument adds to the current plot if set to true.
The numbers within the squares refer to the amount of points present in each square; it is the density of points within the squares.
Number of Points | Number of Grid Cells | P-Values | P-Value Interpretation |
---|---|---|---|
500 | 400 | 0.01038 | Below 0.05 threshold, reject the null |
500 | 400 | 0.05973 | Above the 0.05 threshold, do not reject the null |
500 | 400 | 0.00437 | Below the 0.05 threshold, reject the null |
P-Value | P-Value Interpretation |
---|---|
0.03288 | Below the 0.05 threshold, likely reject the null |
0.8199 | Very much above the 0.05 threshold, do not reject the null |
0.1554 | Above the 0.05 threshold, do not reject the null |
When experimenting with higher grid numbers, I received results with higher p-values on average, and when I tried lower grid numbers, I received lower p-values on average.
As found in summary(lansing), the study area for the lansing data is 924 sq. ft.
summary(lansing)
## Marked planar point pattern: 2251 points
## Average intensity 2251 points per square unit (one unit = 924 feet)
##
## *Pattern contains duplicated points*
##
## Coordinates are given to 3 decimal places
## i.e. rounded to the nearest multiple of 0.001 units (one unit = 924 feet)
##
## Multitype:
## frequency proportion intensity
## blackoak 135 0.05997335 135
## hickory 703 0.31230560 703
## maple 514 0.22834300 514
## misc 105 0.04664594 105
## redoak 346 0.15370950 346
## whiteoak 448 0.19902270 448
##
## Window: rectangle = [0, 1] x [0, 1] units
## Window area = 1 square unit
## Unit of length: 924 feet
There are a total of 2,251 trees in the lansing data.
The most abundant tree is hickory and the least abundant tree is black oak.
When increasing the quadrat size, the chi squared increases and the p-value remains the same; the earlier interpretation appears to be robust to variation in quadrat size.
The two other ways I found to write the command are as follows:
rpoispp(500)|>
nndist(k=1:500)|>
apply(2, FUN= mean)|>
plot()
nn_curve <- apply(nndist(rpoispp(500), k=1:500), 2, FUN = mean)
plot(nn_curve)
The plot suggests that maples are more clumped in the landscape; compared to the random line, the maples have lower average nearest neighbor values than the expected random outcome line.
This plot for cells suggest that they are more dispersed; the cells have higher average nearest neighbor values than the random expected outcome line.
The data for hickory wanders above the confidence band; this graph suggests slight clumping in the hickory data.
The data for black oak goes above the confidence band; this graph suggests clumping in the black oak set.
The data for cells goes below the confidence band; this graph suggests aversion in the cells data.
The data for the longleaf goes above the confidence band; this graph suggests clumping in the longleaf data.