Other packages > Find by keyword >

spatstat  

Spatial Point Pattern Analysis, Model-Fitting, Simulation, Tests
View on CRAN: Click here


Download and install spatstat package within the R console
Install from CRAN:
install.packages("spatstat")

Install from Github:
library("remotes")
install_github("cran/spatstat")

Install by package version:
library("remotes")
install_version("spatstat", "3.5-0")



Attach the package and use:
library("spatstat")
Maintained by
Adrian Baddeley
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2002-01-21
Latest Update: 2025-07-25
Description:
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.
How to cite:
Adrian Baddeley (2002). spatstat: Spatial Point Pattern Analysis, Model-Fitting, Simulation, Tests. R package version 3.5-0, https://cran.r-project.org/web/packages/spatstat. Accessed 26 Jun. 2026.
Previous versions and publish date:
1.0-1 (2002-01-21 08:56), 1.1-3 (2002-05-20 14:51), 1.2-1 (2002-08-07 09:24), 1.3-1 (2003-03-24 12:27), 1.3-2 (2003-05-06 19:06), 1.3-3 (2003-10-14 17:55), 1.3-4 (2003-11-13 16:33), 1.4-3 (2004-02-03 10:22), 1.4-4 (2004-02-13 23:22), 1.4-5 (2004-03-26 08:51), 1.4-6 (2004-05-24 22:01), 1.5-1 (2004-06-17 13:50), 1.5-3 (2004-09-11 09:20), 1.5-4 (2004-09-25 11:09), 1.5-5 (2004-11-08 09:15), 1.5-6 (2004-11-16 09:54), 1.5-7 (2004-11-30 13:02), 1.5-8 (2005-01-25 11:04), 1.5-9 (2005-02-08 07:44), 1.5-10 (2005-02-21 09:25), 1.6-1 (2005-03-14 09:57), 1.6-2 (2005-03-30 13:37), 1.6-3 (2005-04-12 10:41), 1.6-4 (2005-04-19 10:17), 1.6-5 (2005-04-21 10:08), 1.6-6 (2005-05-10 10:03), 1.6-7 (2005-05-25 13:12), 1.6-8 (2005-06-14 09:42), 1.6-9 (2005-07-01 12:49), 1.6-11 (2005-07-28 14:51), 1.6-12 (2005-09-14 09:38), 1.7-11 (2005-07-28 15:54), 1.7-12 (2005-10-06 12:58), 1.7-13 (2005-10-27 19:07), 1.8-1 (2005-11-24 10:14), 1.8-2 (2005-12-05 12:58), 1.8-3 (2005-12-21 10:48), 1.8-4 (2006-01-09 13:01), 1.8-5 (2006-01-19 11:29), 1.8-6 (2006-02-23 19:08), 1.8-7 (2006-03-02 18:15), 1.8-8 (2006-04-21 09:44), 1.8-9 (2006-04-19 13:18), 1.9-0 (2006-05-03 09:43), 1.9-1 (2006-05-30 10:00), 1.9-2 (2006-06-06 16:10), 1.9-3 (2006-06-21 09:55), 1.9-4 (2006-08-03 12:35), 1.9-5 (2006-08-22 09:58), 1.9-6 (2006-09-29 13:16), 1.10-1 (2006-10-19 19:06), 1.10-2 (2006-11-09 11:14), 1.10-3 (2006-11-20 10:20), 1.11-0 (2007-01-12 09:29), 1.11-1 (2007-02-01 11:09), 1.11-2 (2007-03-12 11:18), 1.11-3 (2007-03-20 10:38), 1.11-4 (2007-04-16 22:02), 1.11-5 (2007-05-14 09:59), 1.11-6 (2007-05-18 13:12), 1.11-7 (2007-06-11 14:42), 1.11-8 (2007-07-28 18:50), 1.12-0 (2007-08-25 18:50), 1.12-1 (2007-09-28 11:22), 1.12-2 (2007-10-27 17:31), 1.12-3 (2007-11-03 19:43), 1.12-4 (2007-12-19 11:45), 1.12-5 (2008-01-10 16:35), 1.12-6 (2008-02-04 11:13), 1.12-7 (2008-02-11 21:26), 1.12-8 (2008-02-26 09:03), 1.12-9 (2008-03-21 20:27), 1.13-0 (2008-04-14 08:44), 1.13-1 (2008-04-24 11:07), 1.13-2 (2008-05-16 23:07), 1.13-3 (2008-06-23 09:55), 1.13-4 (2008-07-18 09:39), 1.14-0 (2008-07-28 08:19), 1.14-1 (2008-07-29 07:01), 1.14-2 (2008-09-08 17:59), 1.14-3 (2008-09-28 20:27), 1.14-4 (2008-10-16 18:53), 1.14-5 (2008-10-23 19:21), 1.14-6 (2008-11-07 09:42), 1.14-7 (2008-11-17 12:05), 1.14-8 (2008-12-10 09:37), 1.14-9 (2008-12-17 10:10), 1.14-10 (2009-02-03 21:05), 1.15-0 (2009-03-02 12:25), 1.15-1 (2009-04-01 13:44), 1.15-2 (2009-04-16 10:23), 1.15-3 (2009-05-14 08:58), 1.15-4 (2009-06-16 15:13), 1.16-0 (2009-07-02 15:38), 1.16-1 (2009-07-27 21:55), 1.16-2 (2009-08-23 17:42), 1.16-3 (2009-10-13 10:56), 1.17-0 (2009-10-22 20:40), 1.17-1 (2009-11-06 11:19), 1.17-2 (2009-11-10 11:16), 1.17-4 (2009-12-17 18:19), 1.17-5 (2010-01-06 13:13), 1.17-6 (2010-02-09 12:08), 1.18-0 (2010-03-10 11:21), 1.18-1 (2010-03-19 08:32), 1.18-2 (2010-04-10 08:35), 1.18-3 (2010-04-19 14:25), 1.18-4 (2010-05-02 09:05), 1.19-0 (2010-05-16 18:22), 1.19-1 (2010-05-25 19:10), 1.19-2 (2010-06-09 14:30), 1.19-3 (2010-06-17 11:17), 1.20-1 (2010-07-26 11:32), 1.20-2 (2010-08-10 16:18), 1.20-3 (2010-08-24 12:49), 1.20-5 (2010-10-25 12:42), 1.21-0 (2010-11-05 21:04), 1.21-1 (2010-11-11 14:11), 1.21-2 (2010-11-29 09:25), 1.21-3 (2011-01-17 09:13), 1.21-4 (2011-01-20 14:09), 1.21-5.1 (2011-03-21 16:00), 1.21-5 (2011-02-10 09:24), 1.21-6 (2011-03-26 16:46), 1.22-0 (2011-04-28 10:32), 1.22-1 (2011-05-19 12:07), 1.22-2 (2011-06-15 20:13), 1.22-3 (2011-06-17 10:37), 1.23-0 (2011-07-24 16:31), 1.23-1 (2011-08-01 12:38), 1.23-2 (2011-08-11 09:01), 1.23-3 (2011-08-12 16:33), 1.23-4 (2011-09-09 15:10), 1.23-5 (2011-09-23 14:20), 1.23-6 (2011-10-11 17:26), 1.24-1 (2011-10-23 17:42), 1.24-2 (2011-11-11 12:20), 1.25-0 (2011-12-06 08:01), 1.25-1 (2011-12-21 09:54), 1.25-2 (2012-01-19 21:43), 1.25-3 (2012-02-05 08:54), 1.25-4 (2012-02-29 14:07), 1.25-5 (2012-03-14 08:10), 1.26-0 (2012-04-08 07:34), 1.26-1 (2012-04-19 10:15), 1.27-0 (2012-05-16 14:45), 1.28-0 (2012-06-11 10:52), 1.28-1 (2012-06-29 12:24), 1.28-2 (2012-08-23 14:08), 1.29-0 (2012-10-14 12:48), 1.30-0 (2012-12-23 13:16), 1.31-0 (2013-01-17 07:33), 1.31-1.1 (2013-04-25 18:55), 1.31-1 (2013-03-01 12:29), 1.31-2 (2013-04-26 07:29), 1.31-3 (2013-05-27 07:55), 1.32-0 (2013-08-13 12:43), 1.33-0 (2013-09-05 11:41), 1.34-0 (2013-10-24 11:53), 1.34-1 (2013-11-03 10:35), 1.35-0 (2013-12-12 17:48), 1.36-0 (2014-02-18 08:45), 1.37-0 (2014-05-09 11:25), 1.38-0 (2014-08-15 17:40), 1.38-1 (2014-08-28 07:24), 1.39-0 (2014-10-23 08:44), 1.39-1 (2014-10-24 10:53), 1.40-0 (2014-12-31 10:18), 1.41-1 (2015-02-27 07:33), 1.42-0 (2015-06-01 07:47), 1.42-1 (2015-06-05 20:06), 1.42-2 (2015-06-29 07:39), 1.43-0 (2015-10-08 13:44), 1.44-0 (2015-12-23 06:10), 1.44-1 (2015-12-29 22:09), 1.45-0 (2016-03-10 17:56), 1.45-2 (2016-05-09 10:09), 1.46-1 (2016-07-08 17:24), 1.47-0 (2016-10-13 01:02), 1.48-0 (2016-12-22 10:54), 1.49-0 (2017-02-08 19:57), 1.50-0 (2017-03-23 14:38), 1.51-0 (2017-05-08 16:32), 1.52-1 (2017-08-16 11:02), 1.53-2 (2017-10-09 00:08), 1.54-0 (2017-11-21 09:41), 1.55-0 (2018-01-29 20:46), 1.55-1 (2018-04-05 14:35), 1.56-0 (2018-06-15 09:49), 1.56-1 (2018-08-01 17:51), 1.57-1 (2018-11-04 18:11), 1.58-2 (2019-01-10 17:31), 1.59-0 (2019-03-22 14:41), 1.60-1 (2019-06-23 16:41), 1.61-0 (2019-09-22 20:20), 1.62-2 (2019-12-10 12:50), 1.63-0 (2020-01-23 15:00), 1.63-2 (2020-02-23 18:40), 1.63-3 (2020-03-01 17:00), 1.64-1 (2020-05-12 19:11), 2.0-1 (2021-03-14 00:50), 2.1-0 (2021-04-03 12:40), 2.2-0 (2021-06-23 09:40), 2.3-0 (2021-12-12 11:40), 2.3-3 (2022-02-21 04:30), 2.3-4 (2022-04-01 10:30), 3.0-2 (2022-11-10 14:00), 3.0-3 (2023-01-28 14:40), 3.0-5 (2023-04-22 23:30), 3.0-6 (2023-05-17 09:40), 3.0-7 (2023-10-30 10:10), 3.0-8 (2024-03-26 16:20), 3.1-1 (2024-07-15 21:11), 3.2-1 (2024-09-22 06:20), 3.3-0 (2024-11-20 02:10), 3.3-1 (2025-01-23 17:40), 3.3-2 (2025-03-22 10:10), 3.3-3 (2025-05-24 08:00), 3.4-0 (2025-07-25 07:00), 3.4-1 (2025-09-28 12:50), 3.5-0 (2025-12-01 07:10), 3.5-1 (2026-02-01 07:10), 3.6-0 (2026-04-02 10:10)
Other packages that cited spatstat R package
View spatstat citation profile
Other R packages that spatstat depends, imports, suggests or enhances
Complete documentation for spatstat
Functions, R codes and Examples using the spatstat R package
Some associated functions: beginner . bugfixes . foo . latest.news . spatstat-internal . spatstat-package . spatstat.family . 
Some associated R codes: First.R . beginner.R . bugtable.R . news.R .  Full spatstat package functions and examples
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

infotheo  
Information-Theoretic Measures
Implements various measures of information theory based on several entropy estimators. ...
Download / Learn more Package Citations See dependency  
quickcode  
Quick and Essential 'R' Tricks for Better Scripts
The NOT functions, 'R' tricks and a compilation of some simple quick plus often used 'R' codes to im ...
Download / Learn more Package Citations See dependency  
tactile  
New and Extended Plots, Methods, and Panel Functions for 'lattice'
Extensions to 'lattice', providing new high-level functions, methods for existing functions, panel f ...
Download / Learn more Package Citations See dependency  
ggblanket  
Simplify 'ggplot2' Visualisation
Simplify 'ggplot2' visualisation with 'ggblanket' wrapper functions. ...
Download / Learn more Package Citations See dependency  
poptrend  
Estimate Smooth and Linear Trends from Population Count Survey Data
Functions to estimate and plot smooth or linear population trends, or population indices, from anim ...
Download / Learn more Package Citations See dependency  
colormap  
Color Palettes using Colormaps Node Module
Allows to generate colors from palettes defined in the colormap module of 'Node.js'. (see ...
Download / Learn more Package Citations See dependency  

27,535

R Packages

236,180

Dependencies

73,223

Author Associations

27,536

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA