Reference no: EM133370961
Using R, please assist with the questions below. All calculations must be done using R.
Using the New Haven data set in R. Load it with:
library(GISTools)
data(newhaven)
The SpatialPoints layer "burgres.n" contains a point pattern of non-forced-entry burglary incidents in New Haven. You can compute the mean nearest neighbor distance for this point pattern using the nndist function in the spatstat package:
library(spatstat)
mean(nndist(as.ppp(burgres.n)))
Questions
The mean nearest neighbor distance for the burgres.n point pattern is 1269.034 feet.
Consider the null hypothesis that the points in the burgres.n point pattern were generated by a completely random spatial process. Use a Monte Carlo simulation to calculate the probability of observing a mean nearest neighbor distance less than or equal to 1269.034 feet under complete spatial randomness. Do you have evidence to reject the null hypothesis of complete spatial randomness? Be sure that you appropriately account for the study region in your Monte Carlo simulation (i.e., the border of New Haven).
2. The New Haven police department also has a GIS layer representing a point pattern of>littering incidents. The mean nearest neighbor distance for this point pattern is 805.93 feet. From this information alone, can you reject a null hypothesis that this point pattern was generated by a completely random spatial process? Why or why not?