How to do a point pattern analysis in spatstat?

How to do a point pattern analysis in spatstat?

Many point pattern analyses such as the average nearest neighbor analysis should have their study boundaries explicitly defined. This can be done in spatstat by “binding” the Massachusetts boundary polygon to the Starbucks point feature object using the Window () function. Note that the function name starts with an upper case W.

How to calculate the average nearest neighbor distance?

The observed average nearest neighbor distance is 3.28 km. Next, we will generate the distribution of expected ANN values given a homogeneous (CSR/IRP) point process using Monte Carlo methods.

How to calculate quadrat count and intensity in spatstat?

You can compute the quadrat count and intensity using spatstat’s quadratcount() and intensity() functions. The following code chunk divides the state of Massachusetts into a grid of 3 rows and 6 columns then tallies the number of points falling in each quadrat.

How to get the second nearest neighbor between two neighbours?

The function nndist in the spatstat package has an argument k that determines the order of neighbours. To get the second nearest neighbour distance, use k=2. To get both the first and the second neighbours, use k=1:2. Thanks for contributing an answer to Geographic Information Systems Stack Exchange!

How is rescale function used in spatial analysis?

Such a small length unit is not practical at this scale of analysis. It’s therefore desirable to rescale the spatial objects to a larger length unit such as the kilometer. The second argument to the rescale function divides the current unit (meter) to get the new unit (kilometer). This gives us more sensible density values to work with.

What are the outputs of point pattern analysis?

The outputs include a plot of ρ ρ vs. population density and a raster map of ρ ρ controlled for population density. It’s important to note that we are not fitting a parametric model to the data. Instead, a non-parametric curve is fit to the data. Its purpose is to describe/explore the shape of the relationship between point density and covariate.

What’s the maximum intensity of a point pattern?

The predicted intensity values range from 0 to about 5 stores per square kilometer. You’ll note that this maximum value does not match the maximum value of ~3 shown in the rho vs population density plot. This is because the plot did not show the full range of population density values (the max density value shown was 10).