Learn R Programming

spatstat.model (version 3.4-2)

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

38,089

Version

3.4-2

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

September 28th, 2025

Functions in spatstat.model (3.4-2)

Concom

The Connected Component Process Model
Fiksel

The Fiksel Interaction
Extract.leverage.ppm

Extract Subset of Leverage Object
BadGey

Hybrid Geyer Point Process Model
DiggleGatesStibbard

Diggle-Gates-Stibbard Point Process Model
DiggleGratton

Diggle-Gratton model
AreaInter

The Area Interaction Point Process Model
Extract.msr

Extract Subset of Signed or Vector Measure
Gcom

Model Compensator of Nearest Neighbour Function
Extract.influence.ppm

Extract Subset of Influence Object
Kmodel.dppm

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

Model Compensator of K Function
Hardcore

The Hard Core Point Process Model
Kmodel

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

The Hierarchical Strauss Point Process Model
HierHard

The Hierarchical Hard Core Point Process Model
Geyer

Geyer's Saturation Point Process Model
Hybrid

Hybrid Interaction Point Process Model
Gres

Residual G Function
HierStraussHard

The Hierarchical Strauss Hard Core Point Process Model
Kmodel.kppm

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

Lambert's W Function
Kres

Residual K Function
Kmodel.ppm

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

The Multitype Hard Core Point Process Model
Ops.msr

Arithmetic Operations on Measures
MultiStraussHard

The Multitype/Hard Core Strauss Point Process Model
LennardJones

The Lennard-Jones Potential
MultiStrauss

The Multitype Strauss Point Process Model
Ord

Generic Ord Interaction model
Poisson

Poisson Point Process Model
OrdThresh

Ord's Interaction model
Saturated

Saturated Pairwise Interaction model
Penttinen

Penttinen Interaction
PairPiece

The Piecewise Constant Pairwise Interaction Point Process Model
Strauss

The Strauss Point Process Model
Smooth.msr

Smooth a Signed or Vector-Valued Measure
SatPiece

Piecewise Constant Saturated Pairwise Interaction Point Process Model
Softcore

The Soft Core Point Process Model
Pairwise

Generic Pairwise Interaction model
addapply

Significance Tests or Effect Size for Single Term Additions to a Model
Window.ppm

Extract Window of Spatial Object
addROC

ROC Curves for Single Term Additions to a Model
anova.mppm

ANOVA for Fitted Point Process Models for Replicated Patterns
addvar

Added Variable Plot for Point Process Model
anova.slrm

Analysis of Deviance for Spatial Logistic Regression Models
StraussHard

The Strauss / Hard Core Point Process Model
as.function.leverage.ppm

Convert Leverage Object to Function of Coordinates
Triplets

The Triplet Point Process Model
anova.ppm

ANOVA for Fitted Point Process Models
bc.ppm

Bias Correction for Fitted Model
berman.test.ppm

Berman's Tests for Point Process Model
as.fv.kppm

Convert Fitted Model To Class fv
as.interact

Extract Interaction Structure
auc.ppm

Area Under ROC Curve
cauchy.estpcf

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

Extract Fitted Point Process Model
cauchy.estK

Fit the Neyman-Scott cluster process with Cauchy kernel
clusterkernel.kppm

Extract Cluster Offspring Kernel
clusterfit

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

Spatial Distribution Test for Point Pattern or Point Process Model
cdf.test.mppm

Spatial Distribution Test for Multiple Point Process Model
clusterradius.kppm

Compute or Extract Effective Range of Cluster Kernel
coef.mppm

Coefficients of Point Process Model Fitted to Multiple Point Patterns
dppBessel

Bessel Type Determinantal Point Process Model
clusterfield.kppm

Field of clusters
as.layered.msr

Convert Measure To Layered Object
closepaircounts

Count Close Pairs of Points
as.owin.ppm

Convert Data To Class owin
coef.slrm

Coefficients of Fitted Spatial Logistic Regression Model
dim.detpointprocfamily

Dimension of Determinantal Point Process Model
coef.ppm

Coefficients of Fitted Point Process Model
detpointprocfamilyfun

Construct a New Determinantal Point Process Model Family Function
diagnose.ppm

Diagnostic Plots for Fitted Point Process Model
dffit.ppm

Case Deletion Effect Measure of Fitted Model
dfbetas.ppm

Parameter Influence Measure
compareFit

Residual Diagnostics for Multiple Fitted Models
dppPowerExp

Power Exponential Spectral Determinantal Point Process Model
dppapproxkernel

Approximate Determinantal Point Process Kernel
dppCauchy

Generalized Cauchy Determinantal Point Process Model
dppm

Fit Determinantal Point Process Model
dppparbounds

Parameter Bound for a Determinantal Point Process Model
domain.ppm

Extract the Domain of any Spatial Object
dppspecden

Extract Spectral Density from Determinantal Point Process Model Object
dppkernel

Extract Kernel from Determinantal Point Process Model Object
data.ppm

Extract Original Data from a Fitted Point Process Model
dppGauss

Gaussian Determinantal Point Process Model
dppapproxpcf

Approximate Pair Correlation Function of Determinantal Point Process Model
dppeigen

Internal function calculating eig and index
dummify

Convert Data to Numeric Values by Constructing Dummy Variables
dropply

Significance Tests for all Single Term Deletions from a Model
eem

Exponential Energy Marks
dummy.ppm

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

Force Point Process Model to be Valid
emend.slrm

Force Spatial Logistic Regression Model to be Valid
dppspecdenrange

Range of Spectral Density of a Determinantal Point Process Model
dppMatern

Whittle-Matern Determinantal Point Process Model
dropROC

ROC Curves for all Single Term Deletions from a Model
effectfun

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

Force Model to be Valid
hardcoredist

Extract the Hard Core Distance of a Point Process Model
fitin.ppm

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

Fitted Conditional Intensity for Point Process Model
exactMPLEstrauss

Exact Maximum Pseudolikelihood Estimate for Stationary Strauss Process
fixef.mppm

Extract Fixed Effects from Point Process Model
envelope.ppm

Simulation Envelopes of Summary Function
fitted.mppm

Fitted Conditional Intensity for Multiple Point Process Model
harmonic

Basis for Harmonic Functions
inforder.family

Infinite Order Interaction Family
integral.msr

Integral of a Measure
improve.kppm

Improve Intensity Estimate of Fitted Cluster Point Process Model
intensity.dppm

Intensity of Determinantal Point Process Model
intensity.ppm

Intensity of Fitted Point Process Model
fitted.slrm

Fitted Probabilities for Spatial Logistic Regression
influence.ppm

Influence Measure for Spatial Point Process Model
is.multitype.ppm

Test Whether A Point Process Model is Multitype
ic.kppm

Model selection criteria for the intensity function of a point process
harmonise.msr

Make Measures Compatible
is.ppm

Test Whether An Object Is A Fitted Point Process Model
is.stationary.ppm

Recognise Stationary and Poisson Point Process Models
formula.ppm

Model Formulae for Gibbs Point Process Models
intensity.slrm

Intensity of Fitted Spatial Logistic Regression Model
ippm

Fit Point Process Model Involving Irregular Trend Parameters
hybrid.family

Hybrid Interaction Family
hierpair.family

Hierarchical Pairwise Interaction Process Family
is.marked.ppm

Test Whether A Point Process Model is Marked
is.hybrid

Test Whether Object is a Hybrid
interactionorder

Determine the Order of Interpoint Interaction in a Model
is.poissonclusterprocess

Recognise Poisson Cluster Process Models
leverage.slrm

Leverage and Influence Diagnostics for Spatial Logistic Regression
is.dppm

Recognise Fitted Determinantal Point Process Models
lgcp.estK

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

Fit a Log-Gaussian Cox Point Process by Minimum Contrast
leverage.ppm

Leverage Measure for Spatial Point Process Model
logLik.ppm

Log Likelihood and AIC for Point Process Model
logLik.mppm

Log Likelihood and AIC for Multiple Point Process Model
isf.object

Interaction Structure Family Objects
kppm

Fit Cluster or Cox Point Process Model
measureVariation

Positive and Negative Parts, and Variation, of a Measure
measureContinuous

Discrete and Continuous Components of a Measure
matclust.estpcf

Fit the Matern Cluster Point Process by Minimum Contrast Using Pair Correlation
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
methods.dppm

Methods for Determinantal Point Process Models
methods.fii

Methods for Fitted Interactions
logLik.kppm

Log Likelihood and AIC for Fitted Cox or Cluster Point Process Model
logLik.dppm

Log Likelihood and AIC for Fitted Determinantal Point Process Model
lurking

Lurking Variable Plot
logLik.slrm

Loglikelihood of Spatial Logistic Regression
methods.kppm

Methods for Cluster Point Process Models
methods.influence.ppm

Methods for Influence Objects
methods.objsurf

Methods for Objective Function Surfaces
methods.leverage.ppm

Methods for Leverage Objects
methods.traj

Methods for Trajectories of Function Evaluations
methods.zclustermodel

Methods for Cluster Models
objsurf

Objective Function Surface
model.depends

Identify Covariates Involved in each Model Term
methods.zgibbsmodel

Methods for Gibbs Models
model.frame.ppm

Extract the Variables in a Point Process Model
model.images

Compute Images of Constructed Covariates
mincontrast

Method of Minimum Contrast
ord.family

Ord Interaction Process Family
model.matrix.slrm

Extract Design Matrix from Spatial Logistic Regression Model
methods.slrm

Methods for Spatial Logistic Regression Models
mppm

Fit Point Process Model to Several Point Patterns
model.matrix.mppm

Extract Design Matrix of Point Process Model for Several Point Patterns
plot.kppm

Plot a fitted cluster point process
model.matrix.ppm

Extract Design Matrix from Point Process Model
palmdiagnose

Diagnostic based on Palm Intensity
msr

Signed or Vector-Valued Measure
panel.contour

Panel Plots using Colour Image or Contour Lines
plot.plotppm

Plot a plotppm Object Created by plot.ppm
pairwise.family

Pairwise Interaction Process Family
plot.dppm

Plot a fitted determinantal point process
pairsat.family

Saturated Pairwise Interaction Point Process Family
npfun

Dummy Function Returns Number of Points
plot.influence.ppm

Plot Influence Measure
parres

Partial Residuals for Point Process Model
polynom

Polynomial in One or Two Variables
parameters

Extract Model Parameters in Understandable Form
plot.slrm

Plot a Fitted Spatial Logistic Regression
panysib

Probability that a Point Has Any Siblings
plot.palmdiag

Plot the Palm Intensity Diagnostic
plot.msr

Plot a Signed or Vector-Valued Measure
plot.leverage.ppm

Plot Leverage Function
plot.profilepl

Plot Profile Likelihood
plot.rppm

Plot a Recursively Partitioned Point Process Model
plot.mppm

plot a Fitted Multiple Point Process Model
plot.ppm

plot a Fitted Point Process Model
ppm

Fit Point Process Model to Data
predict.mppm

Prediction for Fitted Multiple Point Process Model
predict.ppm

Prediction from a Fitted Point Process Model
ppm.object

Class of Fitted Point Process Models
predict.rppm

Make Predictions From a Recursively Partitioned Point Process Model
ppmInfluence

Leverage and Influence Measures for Spatial Point Process Model
ppm.ppp

Fit Point Process Model to Point Pattern Data
predict.slrm

Predicted or Fitted Values from Spatial Logistic Regression
predict.kppm

Prediction from a Fitted Cluster Point Process Model
predict.dppm

Prediction from a Fitted Determinantal Point Process Model
psst

Pseudoscore Diagnostic For Fitted Model against General Alternative
pseudoR2

Calculate Pseudo-R-Squared for Point Process Model
psib

Sibling Probability of Cluster Point Process
quad.ppm

Extract Quadrature Scheme Used to Fit a Point Process Model
print.ppm

Print a Fitted Point Process Model
psstG

Pseudoscore Diagnostic For Fitted Model against Saturation Alternative
qqplot.ppm

Q-Q Plot of Residuals from Fitted Point Process Model
psstA

Pseudoscore Diagnostic For Fitted Model against Area-Interaction Alternative
prune.rppm

Prune a Recursively Partitioned Point Process Model
profilepl

Fit Models by Profile Maximum Pseudolikelihood or AIC
rdpp

Simulation of a Determinantal Point Process
repul.dppm

Repulsiveness Index of a Determinantal Point Process Model
reach.dppm

Range of Interaction for a Determinantal Point Process Model
reach.kppm

Range of Interaction for a Cox or Cluster Point Process Model
quadrat.test.mppm

Chi-Squared Test for Multiple Point Process Model Based on Quadrat Counts
quadrat.test.ppm

Dispersion Test for Spatial Point Pattern Based on Quadrat Counts
reach

Interaction Distance of a Point Process Model
ranef.mppm

Extract Random Effects from Point Process Model
residualMeasure

Residual Measure for an Observed Point Pattern and a Fitted Intensity
relrisk.ppm

Parametric Estimate of Spatially-Varying Relative Risk
residuals.mppm

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

Residuals for Fitted Determinantal Point Process Model
response

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

Residuals for Fitted Spatial Logistic Regression Model
rhohat.ppm

Nonparametric Estimate of Intensity as Function of a Covariate
residuals.kppm

Residuals for Fitted Cox or Cluster Point Process Model
residuals.ppm

Residuals for Fitted Point Process Model
rex

Richardson Extrapolation
residuals.rppm

Residuals for Recursively Partitioned Point Process Model
rmh.ppm

Simulate from a Fitted Point Process Model
rppm

Recursively Partitioned Point Process Model
simulate.kppm

Simulate a Fitted Cluster Point Process Model
spatstat.model-internal

Internal spatstat.model functions
roc.ppm

Receiver Operating Characteristic For Fitted Point Process Model
simulate.ppm

Simulate a Fitted Gibbs Point Process Model
simulate.dppm

Simulation of Determinantal Point Process Model
simulate.slrm

Simulate a Fitted Spatial Logistic Regression Model
slrm

Spatial Logistic Regression
rmhmodel.ppm

Interpret Fitted Model for Metropolis-Hastings Simulation.
simulate.mppm

Simulate a Point Process Model Fitted to Several Point Patterns
subfits

Extract List of Individual Point Process Models
traj

Extract trajectory of function evaluations
summary.dppm

Summarizing a Fitted Determinantal Point Process Model
thomas.estK

Fit the Thomas Point Process by Minimum Contrast
suffstat

Sufficient Statistic of Point Process Model
summary.kppm

Summarizing a Fitted Cox or Cluster Point Process Model
thomas.estpcf

Fit the Thomas Point Process by Minimum Contrast
spatstat.model-package

The spatstat.model Package
summary.ppm

Summarizing a Fitted Point Process Model
split.msr

Divide a Measure into Parts
triplet.family

Triplet Interaction Family
unstack.msr

Separate a Vector Measure into its Scalar Components
update.rppm

Update a Recursively Partitioned Point Process Model
unitname

Name for Unit of Length
update.ppm

Update a Fitted Point Process Model
update.dppm

Update a Fitted Determinantal Point Process Model
update.detpointprocfamily

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

Update an Interpoint Interaction
valid

Check Whether Point Process Model is Valid
update.kppm

Update a Fitted Cluster Point Process Model
valid.detpointprocfamily

Check Validity of a Determinantal Point Process Model
varcount

Predicted Variance of the Number of Points
valid.slrm

Check Whether Spatial Logistic Regression Model is Valid
vcov.kppm

Variance-Covariance Matrix for a Fitted Cluster Point Process Model
vcov.ppm

Variance-Covariance Matrix for a Fitted Point Process Model
vcov.mppm

Calculate Variance-Covariance Matrix for Fitted Multiple Point Process Model
valid.ppm

Check Whether Point Process Model is Valid
vcov.slrm

Variance-Covariance Matrix for a Fitted Spatial Logistic Regression
vargamma.estK

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

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

Evaluate Expression Involving Components of a Measure
zgibbsmodel

Gibbs Model
zclustermodel

Cluster Point Process Model