spatstat

Spatial Point Pattern Analysis, Model-Fitting, Simulation, Tests

CRAN Package

Comprehensive open-source toolbox for analysing Spatial Point Patterns. Focused mainly on two-dimensional point patterns, including multitype/marked points, in any spatial region. Also supports three-dimensional point patterns, space-time point patterns in any number of dimensions, point patterns on a linear network, and patterns of other geometrical objects. Supports spatial covariate data such as pixel images. Contains over 3000 functions for plotting spatial data, exploratory data analysis, model-fitting, simulation, spatial sampling, model diagnostics, and formal inference. Data types include point patterns, line segment patterns, spatial windows, pixel images, tessellations, and linear networks. Exploratory methods include quadrat counts, K-functions and their simulation envelopes, nearest neighbour distance and empty space statistics, Fry plots, pair correlation function, kernel smoothed intensity, relative risk estimation with cross-validated bandwidth selection, mark correlation functions, segregation indices, mark dependence diagnostics, and kernel estimates of covariate effects. Formal hypothesis tests of random pattern (chi-squared, Kolmogorov-Smirnov, Monte Carlo, Diggle-Cressie-Loosmore-Ford, Dao-Genton, two-stage Monte Carlo) and tests for covariate effects (Cox-Berman-Waller-Lawson, Kolmogorov-Smirnov, ANOVA) are also supported. Parametric models can be fitted to point pattern data using the functions ppm(), kppm(), slrm(), dppm() similar to glm(). Types of models include Poisson, Gibbs and Cox point processes, Neyman-Scott cluster processes, and determinantal point processes. Models may involve dependence on covariates, inter-point interaction, cluster formation and dependence on marks. Models are fitted by maximum likelihood, logistic regression, minimum contrast, and composite likelihood methods. A model can be fitted to a list of point patterns (replicated point pattern data) using the function mppm(). The model can include random effects and fixed effects depending on the experimental design, in addition to all the features listed above. Fitted point process models can be simulated, automatically. Formal hypothesis tests of a fitted model are supported (likelihood ratio test, analysis of deviance, Monte Carlo tests) along with basic tools for model selection (stepwise(), AIC()) and variable selection (sdr). Tools for validating the fitted model include simulation envelopes, residuals, residual plots and Q-Q plots, leverage and influence diagnostics, partial residuals, and added variable plots.


Documentation


Team


Insights

Last 30 days

This package has been downloaded 21,757 times in the last 30 days. The downloads are officially high enough to crash an underfunded departmental server. Quite an accomplishment! The following heatmap shows the distribution of downloads per day. Yesterday, it was downloaded 543 times.

Sun
Mon
Tue
Wed
Thu
Fri
Sat
0 downloadsFeb 9, 2025
0 downloadsFeb 10, 2025
0 downloadsFeb 11, 2025
0 downloadsFeb 12, 2025
755 downloadsFeb 13, 2025
910 downloadsFeb 14, 2025
312 downloadsFeb 15, 2025
570 downloadsFeb 16, 2025
901 downloadsFeb 17, 2025
934 downloadsFeb 18, 2025
863 downloadsFeb 19, 2025
1,351 downloadsFeb 20, 2025
650 downloadsFeb 21, 2025
405 downloadsFeb 22, 2025
420 downloadsFeb 23, 2025
844 downloadsFeb 24, 2025
764 downloadsFeb 25, 2025
971 downloadsFeb 26, 2025
1,297 downloadsFeb 27, 2025
541 downloadsFeb 28, 2025
293 downloadsMar 1, 2025
366 downloadsMar 2, 2025
769 downloadsMar 3, 2025
766 downloadsMar 4, 2025
1,254 downloadsMar 5, 2025
783 downloadsMar 6, 2025
610 downloadsMar 7, 2025
305 downloadsMar 8, 2025
365 downloadsMar 9, 2025
655 downloadsMar 10, 2025
900 downloadsMar 11, 2025
875 downloadsMar 12, 2025
785 downloadsMar 13, 2025
543 downloadsMar 14, 2025
0 downloadsMar 15, 2025
293
1,351

The following line graph shows the downloads per day. You can hover over the graph to see the exact number of downloads per day.

Last 365 days

This package has been downloaded 210,138 times in the last 365 days. That's a whole lot of downloads. Somewhere, a librarian is trying to figure out why more bandwidth is needed. The day with the most downloads was Feb 12, 2025 with 2,972 downloads.

The following line graph shows the downloads per day. You can hover over the graph to see the exact number of downloads per day.

Data provided by CRAN


Binaries


Dependencies

  • Depends7 packages
  • Imports1 package
  • Reverse Depends19 packages
  • Reverse Imports8 packages
  • Reverse Suggests20 packages