Learn R Programming

spatstat.model (version 3.6-1)

Parametric Statistical Modelling and Inference for the 'spatstat' Family

Description

Functionality for parametric statistical modelling and inference for spatial data, mainly spatial point patterns, in the 'spatstat' family of packages. (Excludes analysis of spatial data on a linear network, which is covered by the separate package 'spatstat.linnet'.) Supports parametric modelling, formal statistical inference, and model validation. Parametric models include Poisson point processes, Cox point processes, Neyman-Scott cluster processes, Gibbs point processes and determinantal point processes. Models can be fitted to data using maximum likelihood, maximum pseudolikelihood, maximum composite likelihood and the method of minimum contrast. Fitted models can be simulated and predicted. Formal inference includes hypothesis tests (quadrat counting tests, Cressie-Read tests, Clark-Evans test, Berman test, Diggle-Cressie-Loosmore-Ford test, scan test, studentised permutation test, segregation test, ANOVA tests of fitted models, adjusted composite likelihood ratio test, envelope tests, Dao-Genton test, balanced independent two-stage test), confidence intervals for parameters, and prediction intervals for point counts. Model validation techniques include leverage, influence, partial residuals, added variable plots, diagnostic plots, pseudoscore residual plots, model compensators and Q-Q plots.

Copy Link

Version

Install

install.packages('spatstat.model')

Monthly Downloads

20,935

Version

3.6-1

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

January 29th, 2026

Functions in spatstat.model (3.6-1)

DiggleGatesStibbard

Diggle-Gates-Stibbard Point Process Model
Extract.influence.ppm

Extract Subset of Influence Object
DiggleGratton

Diggle-Gratton model
Gcom

Model Compensator of Nearest Neighbour Function
Extract.leverage.ppm

Extract Subset of Leverage Object
Concom

The Connected Component Process Model
Geyer

Geyer's Saturation Point Process Model
Kmodel.dppm

K-function or Pair Correlation Function of a Determinantal Point Process Model
Kmodel

K Function or Pair Correlation Function of a Point Process Model
Gres

Residual G Function
Hardcore

The Hard Core Point Process Model
HierStrauss

The Hierarchical Strauss Point Process Model
HierStraussHard

The Hierarchical Strauss Hard Core Point Process Model
HierHard

The Hierarchical Hard Core Point Process Model
Hybrid

Hybrid Interaction Point Process Model
Kcom

Model Compensator of K Function
Kmodel.kppm

K Function or Pair Correlation Function of Cluster Model or Cox model
Kres

Residual K Function
LennardJones

The Lennard-Jones Potential
Ops.msr

Arithmetic Operations on Measures
MultiStraussHard

The Multitype/Hard Core Strauss Point Process Model
MultiStrauss

The Multitype Strauss Point Process Model
MultiHard

The Multitype Hard Core Point Process Model
Pairwise

Generic Pairwise Interaction model
Ord

Generic Ord Interaction model
Kmodel.ppm

K Function or Pair Correlation Function of Gibbs Point Process model
Penttinen

Penttinen Interaction
OrdThresh

Ord's Interaction model
PairPiece

The Piecewise Constant Pairwise Interaction Point Process Model
Poisson

Poisson Point Process Model
SatPiece

Piecewise Constant Saturated Pairwise Interaction Point Process Model
Softcore

The Soft Core Point Process Model
Strauss

The Strauss Point Process Model
addvar

Added Variable Plot for Point Process Model
Smooth.msr

Smooth a Signed or Vector-Valued Measure
as.function.leverage.ppm

Convert Leverage Object to Function of Coordinates
Saturated

Saturated Pairwise Interaction model
anova.slrm

Analysis of Deviance for Spatial Logistic Regression Models
addapply

Significance Tests or Effect Size for Single Term Additions to a Model
LambertW

Lambert's W Function
addROC

ROC Curves for Single Term Additions to a Model
Window.ppm

Extract Window of Spatial Object
cauchy.estK

Fit the Neyman-Scott cluster process with Cauchy kernel
berman.test.ppm

Berman's Tests for Point Process Model
StraussHard

The Strauss / Hard Core Point Process Model
Triplets

The Triplet Point Process Model
as.interact

Extract Interaction Structure
as.fv.kppm

Convert Fitted Model To Class fv
anova.ppm

ANOVA for Fitted Point Process Models
as.ppm

Extract Fitted Point Process Model
cdf.test.mppm

Spatial Distribution Test for Multiple Point Process Model
cauchy.estpcf

Fit the Neyman-Scott cluster process with Cauchy kernel
coef.mppm

Coefficients of Point Process Model Fitted to Multiple Point Patterns
as.tess.rppm

Convert Recursively Partitioned Point Process Model to a Tessellation
anova.mppm

ANOVA for Fitted Point Process Models for Replicated Patterns
cdf.test.ppm

Spatial Distribution Test for Point Pattern or Point Process Model
clusterfield.kppm

Field of clusters
auc.ppm

Area Under ROC Curve
bc.ppm

Bias Correction for Fitted Model
closepaircounts

Count Close Pairs of Points
clusterstrength

Cluster Strength Index
clusterfit

Fit Cluster or Cox Point Process Model via Minimum Contrast
dffit.ppm

Case Deletion Effect Measure of Fitted Model
dim.detpointprocfamily

Dimension of Determinantal Point Process Model
domain.ppm

Extract the Domain of any Spatial Object
compareFit

Residual Diagnostics for Multiple Fitted Models
data.ppm

Extract Original Data from a Fitted Point Process Model
clusterkernel.kppm

Extract Cluster Offspring Kernel
clusterradius.kppm

Compute or Extract Effective Range of Cluster Kernel
as.owin.ppm

Convert Data To Class owin
as.layered.msr

Convert Measure To Layered Object
coef.ppm

Coefficients of Fitted Point Process Model
diagnose.ppm

Diagnostic Plots for Fitted Point Process Model
dppapproxpcf

Approximate Pair Correlation Function of Determinantal Point Process Model
dppGauss

Gaussian Determinantal Point Process Model
coef.slrm

Coefficients of Fitted Spatial Logistic Regression Model
dppapproxkernel

Approximate Determinantal Point Process Kernel
dppPowerExp

Power Exponential Spectral Determinantal Point Process Model
dfbetas.ppm

Parameter Influence Measure
detpointprocfamilyfun

Construct a New Determinantal Point Process Model Family Function
dppBessel

Bessel Type Determinantal Point Process Model
dppCauchy

Generalized Cauchy Determinantal Point Process Model
dppMatern

Whittle-Matern Determinantal Point Process Model
dppkernel

Extract Kernel from Determinantal Point Process Model Object
dppm

Fit Determinantal Point Process Model
dppeigen

Internal function calculating eig and index
dppspecdenrange

Range of Spectral Density of a Determinantal Point Process Model
dummify

Convert Data to Numeric Values by Constructing Dummy Variables
dppparbounds

Parameter Bound for a Determinantal Point Process Model
dppspecden

Extract Spectral Density from Determinantal Point Process Model Object
effectfun

Compute Fitted Effect of a Spatial Covariate in a Point Process Model
dropROC

ROC Curves for all Single Term Deletions from a Model
eem

Exponential Energy Marks
dropply

Significance Tests for all Single Term Deletions from a Model
emend

Force Model to be Valid
dummy.ppm

Extract Dummy Points Used to Fit a Point Process Model
fitted.ppm

Fitted Conditional Intensity for Point Process Model
fitted.slrm

Fitted Probabilities for Spatial Logistic Regression
fitted.mppm

Fitted Conditional Intensity for Multiple Point Process Model
envelope.ppm

Simulation Envelopes of Summary Function
exactMPLEstrauss

Exact Maximum Pseudolikelihood Estimate for Stationary Strauss Process
fixef.mppm

Extract Fixed Effects from Point Process Model
fitin.ppm

Extract the Interaction from a Fitted Point Process Model
formula.ppm

Model Formulae for Gibbs Point Process Models
emend.slrm

Force Spatial Logistic Regression Model to be Valid
emend.ppm

Force Point Process Model to be Valid
improve.kppm

Improve Intensity Estimate of Fitted Cluster Point Process Model
inforder.family

Infinite Order Interaction Family
integral.msr

Integral of a Measure
harmonic

Basis for Harmonic Functions
harmonise.msr

Make Measures Compatible
hardcoredist

Extract the Hard Core Distance of a Point Process Model
ic.kppm

Model selection criteria for the intensity function of a point process
hierpair.family

Hierarchical Pairwise Interaction Process Family
influence.ppm

Influence Measure for Spatial Point Process Model
hybrid.family

Hybrid Interaction Family
intensity.slrm

Intensity of Fitted Spatial Logistic Regression Model
interactionorder

Determine the Order of Interpoint Interaction in a Model
ippm

Fit Point Process Model Involving Irregular Trend Parameters
is.multitype.ppm

Test Whether A Point Process Model is Multitype
is.dppm

Recognise Fitted Determinantal Point Process Models
intensity.dppm

Intensity of Determinantal Point Process Model
is.marked.ppm

Test Whether A Point Process Model is Marked
is.hybrid

Test Whether Object is a Hybrid
is.poissonclusterprocess

Recognise Poisson Cluster Process Models
intensity.ppm

Intensity of Fitted Point Process Model
isf.object

Interaction Structure Family Objects
leverage.slrm

Leverage and Influence Diagnostics for Spatial Logistic Regression
is.ppm

Test Whether An Object Is A Fitted Point Process Model
logLik.kppm

Log Likelihood and AIC for Fitted Cox or Cluster Point Process Model
is.stationary.ppm

Recognise Stationary and Poisson Point Process Models
logLik.dppm

Log Likelihood and AIC for Fitted Determinantal Point Process Model
kppm

Fit Cluster or Cox Point Process Model
leverage.ppm

Leverage Measure for Spatial Point Process Model
lgcp.estK

Fit a Log-Gaussian Cox Point Process by Minimum Contrast
lgcp.estpcf

Fit a Log-Gaussian Cox Point Process by Minimum Contrast
matclust.estK

Fit the Matern Cluster Point Process by Minimum Contrast
lurking.mppm

Lurking Variable Plot for Multiple Point Patterns
measureWeighted

Weighted Version of a Measure
measureContinuous

Discrete and Continuous Components of a Measure
logLik.ppm

Log Likelihood and AIC for Point Process Model
lurking

Lurking Variable Plot
measureVariation

Positive and Negative Parts, and Variation, of a Measure
matclust.estpcf

Fit the Matern Cluster Point Process by Minimum Contrast Using Pair Correlation
logLik.mppm

Log Likelihood and AIC for Multiple Point Process Model
methods.objsurf

Methods for Objective Function Surfaces
methods.zgibbsmodel

Methods for Gibbs Models
methods.kppm

Methods for Cluster Point Process Models
methods.leverage.ppm

Methods for Leverage Objects
methods.zclustermodel

Methods for Cluster Models
methods.fii

Methods for Fitted Interactions
methods.influence.ppm

Methods for Influence Objects
logLik.slrm

Loglikelihood of Spatial Logistic Regression
methods.dppm

Methods for Determinantal Point Process Models
methods.slrm

Methods for Spatial Logistic Regression Models
model.images

Compute Images of Constructed Covariates
mincontrast

Method of Minimum Contrast
methods.traj

Methods for Trajectories of Function Evaluations
model.matrix.mppm

Extract Design Matrix of Point Process Model for Several Point Patterns
model.frame.ppm

Extract the Variables in a Point Process Model
model.matrix.slrm

Extract Design Matrix from Spatial Logistic Regression Model
model.matrix.ppm

Extract Design Matrix from Point Process Model
model.depends

Identify Covariates Involved in each Model Term
npfun

Dummy Function Returns Number of Points
msr

Signed or Vector-Valued Measure
mppm

Fit Point Process Model to Several Point Patterns
panysib

Probability that a Point Has Any Siblings
panel.contour

Panel Plots using Colour Image or Contour Lines
pairsat.family

Saturated Pairwise Interaction Point Process Family
palmdiagnose

Diagnostic based on Palm Intensity
pairwise.family

Pairwise Interaction Process Family
parameters

Extract Model Parameters in Understandable Form
ord.family

Ord Interaction Process Family
objsurf

Objective Function Surface
persist

Spatial Persistence Index
parres

Partial Residuals for Point Process Model
plot.mppm

plot a Fitted Multiple Point Process Model
plot.msr

Plot a Signed or Vector-Valued Measure
plot.palmdiag

Plot the Palm Intensity Diagnostic
plot.plotppm

Plot a plotppm Object Created by plot.ppm
plot.kppm

Plot a fitted cluster point process
plot.leverage.ppm

Plot Leverage Function
plot.profilepl

Plot Profile Likelihood
plot.ppm

plot a Fitted Point Process Model
plot.dppm

Plot a fitted determinantal point process
plot.influence.ppm

Plot Influence Measure
plot.rppm

Plot a Recursively Partitioned Point Process Model
predict.dppm

Prediction from a Fitted Determinantal Point Process Model
polynom

Polynomial in One or Two Variables
predict.kppm

Prediction from a Fitted Cluster Point Process Model
predict.mppm

Prediction for Fitted Multiple Point Process Model
ppm.object

Class of Fitted Point Process Models
ppm

Fit Point Process Model to Data
ppm.ppp

Fit Point Process Model to Point Pattern Data
ppmInfluence

Leverage and Influence Measures for Spatial Point Process Model
plot.slrm

Plot a Fitted Spatial Logistic Regression
psst

Pseudoscore Diagnostic For Fitted Model against General Alternative
pseudoR2

Calculate Pseudo-R-Squared for Point Process Model
profilepl

Fit Models by Profile Maximum Pseudolikelihood or AIC
psstA

Pseudoscore Diagnostic For Fitted Model against Area-Interaction Alternative
psib

Sibling Probability of Cluster Point Process
prune.rppm

Prune a Recursively Partitioned Point Process Model
predict.slrm

Predicted or Fitted Values from Spatial Logistic Regression
print.ppm

Print a Fitted Point Process Model
predict.rppm

Make Predictions From a Recursively Partitioned Point Process Model
predict.ppm

Prediction from a Fitted Point Process Model
rdpp

Simulation of a Determinantal Point Process
quad.ppm

Extract Quadrature Scheme Used to Fit a Point Process Model
psstG

Pseudoscore Diagnostic For Fitted Model against Saturation Alternative
qqplot.ppm

Q-Q Plot of Residuals from Fitted Point Process Model
reach.dppm

Range of Interaction for a Determinantal Point Process Model
reach

Interaction Distance of a Point Process Model
quadrat.test.mppm

Chi-Squared Test for Multiple Point Process Model Based on Quadrat Counts
ranef.mppm

Extract Random Effects from Point Process Model
quadrat.test.ppm

Dispersion Test for Spatial Point Pattern Based on Quadrat Counts
reach.kppm

Range of Interaction for a Cox or Cluster Point Process Model
relrisk.ppm

Parametric Estimate of Spatially-Varying Relative Risk
residuals.mppm

Residuals for Point Process Model Fitted to Multiple Point Patterns
residuals.ppm

Residuals for Fitted Point Process Model
residuals.slrm

Residuals for Fitted Spatial Logistic Regression Model
residuals.kppm

Residuals for Fitted Cox or Cluster Point Process Model
response

Extract the Values of the Response from a Fitted Model
residuals.dppm

Residuals for Fitted Determinantal Point Process Model
residualMeasure

Residual Measure for an Observed Point Pattern and a Fitted Intensity
repul.dppm

Repulsiveness Index of a Determinantal Point Process Model
residuals.rppm

Residuals for Recursively Partitioned Point Process Model
rmh.ppm

Simulate from a Fitted Point Process Model
roc.ppm

Receiver Operating Characteristic For Fitted Point Process Model
rmhmodel.ppm

Interpret Fitted Model for Metropolis-Hastings Simulation.
rex

Richardson Extrapolation
simulate.mppm

Simulate a Point Process Model Fitted to Several Point Patterns
simulate.dppm

Simulation of Determinantal Point Process Model
simulate.ppm

Simulate a Fitted Gibbs Point Process Model
rppm

Recursively Partitioned Point Process Model
simulate.kppm

Simulate a Fitted Cluster Point Process Model
rhohat.ppm

Nonparametric Estimate of Intensity as Function of a Covariate
summary.ppm

Summarizing a Fitted Point Process Model
slrm

Spatial Logistic Regression
simulate.slrm

Simulate a Fitted Spatial Logistic Regression Model
summary.dppm

Summarizing a Fitted Determinantal Point Process Model
summary.kppm

Summarizing a Fitted Cox or Cluster Point Process Model
subfits

Extract List of Individual Point Process Models
suffstat

Sufficient Statistic of Point Process Model
split.msr

Divide a Measure into Parts
spatstat.model-package

The spatstat.model Package
spatstat.model-internal

Internal spatstat.model functions
traj

Extract trajectory of function evaluations
unitname

Name for Unit of Length
triplet.family

Triplet Interaction Family
update.detpointprocfamily

Set Parameter Values in a Determinantal Point Process Model
update.interact

Update an Interpoint Interaction
unstack.msr

Separate a Vector Measure into its Scalar Components
update.kppm

Update a Fitted Cluster Point Process Model
thomas.estK

Fit the Thomas Point Process by Minimum Contrast
update.dppm

Update a Fitted Determinantal Point Process Model
thomas.estpcf

Fit the Thomas Point Process by Minimum Contrast
valid.ppm

Check Whether Point Process Model is Valid
valid

Check Whether Point Process Model is Valid
vcov.kppm

Variance-Covariance Matrix for a Fitted Cluster Point Process Model
update.rppm

Update a Recursively Partitioned Point Process Model
valid.slrm

Check Whether Spatial Logistic Regression Model is Valid
varcount

Predicted Variance of the Number of Points
update.ppm

Update a Fitted Point Process Model
valid.detpointprocfamily

Check Validity of a Determinantal Point Process Model
vargamma.estpcf

Fit the Neyman-Scott Cluster Point Process with Variance Gamma kernel
vargamma.estK

Fit the Neyman-Scott Cluster Point Process with Variance Gamma kernel
zclustermodel

Cluster Point Process Model
vcov.mppm

Calculate Variance-Covariance Matrix for Fitted Multiple Point Process Model
zgibbsmodel

Gibbs Model
vcov.slrm

Variance-Covariance Matrix for a Fitted Spatial Logistic Regression
with.msr

Evaluate Expression Involving Components of a Measure
vcov.ppm

Variance-Covariance Matrix for a Fitted Point Process Model
Fiksel

The Fiksel Interaction
BadGey

Hybrid Geyer Point Process Model
AreaInter

The Area Interaction Point Process Model
Extract.msr

Extract Subset of Signed or Vector Measure