SPATSTAT VERSION 2
Preliminary Announcement
6th revision, 9th February 2010

We expect that spatstat version 2 will be released in mid-2010.
Here is an overview of the changes that are planned.
This page will be kept up-to-date with plans.

RELEASES

Spatstat version 2 will be released as a separate R package called spatstat2.

The existing spatstat package will still be maintained, and available on CRAN, but will not be developed much further when spatstat2 is released.

WHY A NEW PACKAGE?

Some of the new features that we are developing are incompatible with the existing spatstat or its documentation. To ensure forward compatibility, such features will not be added to spatstat. Instead we will create a new package.

During the development phase, features of spatstat2 that are compatible with the existing spatstat will be added to spatstat. This process is now under way.

EXTENSIONS

The main extensions will be as follows.

Point patterns

The structure of point pattern datasets will be much more flexible. The new class pp of point patterns will support: The coordinates and marks will be stored as a hyperframe.

Summary statistics

The computation of summary statistics such as the K function has been completely re-designed and its functionality has been extended. A summary function will really be a function (as well as belonging to the special class fv with its own methods). You will be able to type
K <- Kest(cells)
K(0.1)
plot(K)
The package will provide

Point process models

The model-fitting function ppm will be able to fit Poisson cluster processes and Cox processes, as well as the current models (Poisson and Gibbs). The type of model will be determined by arguments to ppm. The class ppm of fitted point process models will be divided into four sub-classes: The function ppm will support

Simulation

To generate simulated realisations of a fitted point process model, the user will call the generic R function simulate (replacing rmh). New functionality will include A new class ppr of point processes will be defined. Objects of this class represent a stochastic point process model that is capable of being simulated. For example, the Matern Cluster Process with parameters kappa=30, R=1 and mu=10 will be represented by an object of this class. To generate a simulated realisation of such processes, the user will call the generic function simulate. (It will still be possible to call the function rMatClust, etc). The package will support the manipulation and modification of these point processes.

Other spatial data

The package will support It will be possible to split a spatial dataset with respect to a tessellation. For example, splitting a point pattern over a tessellation means that we segregate the points according to which tile of the tessellation they fall into, yielding a list of point patterns, one pattern inside each tile. Splitting a pixel image over a tessellation means chopping up the pixel domain according to the tessellation, yielding a list of pixel images. After splitting the spatial data over a tessellation, it will then be possible to compute summaries for each tile separately. Some of this functionality falls under the heading of spatial statistics for regional data. For example, the division of France into Departements can be represented as a tessellation. Regional data, such as the total number of births for each Departement, can be treated as marks attached to the tessellation.

COMPATIBILITY WITH VERSION 1

Data

Datasets created in spatstat version 1 will NOT be compatible with spatstat version 2.
However, it should be straightforward to convert them.

There will be changes to the internal format of many data types, including

The coercion functions as.pp, as.ow, as.im etc will be able to convert your data from the old format to the new format, provided your data were created in spatstat 1.10-0 or later.

The datasets supplied in the package will also be changed to conform to the new formats.

Function calls

Most existing library functions in spatstat will be used in the same way as they are now. The main incompatibilities will be in:
  1. the summary functions Kest, Gest, Fest, pcf etc.

    The argument r, containing a vector of distance values, will be deleted from these functions. It caused too much confusion!

    The value returned by Kest (for example) will be a function (as well as belonging to class "fv") so that you will be able to type

    K <- Kest(cells)
    plot(K)
    K(0.1)
    to plot the K function and then to evaluate K(r) at r=0.1

  2. the model-fitting function ppm().
    Currently a model is fitted by a call like
    ppm(X, ~term1+term2, Strauss(...), covariates=list(....))
    In spatstat version 2, ppm will be re-engineered to behave almost exactly like lm and glm. The equivalent call will be
    ppm(X ~ term1+term2, Strauss(...), data=list(...))
    where the first argument is a formula in the same style as lm() and glm() would use.

Components of objects

Code that extracts or alters one of the components inside an object of class ppp, psp, im, owin, ppm, fv or fasp will probably cease to work.

WARNING

User code that goes into the internals of spatstat code (basically, anything that is not documented in the help files) will probably cease to work.


Adrian Baddeley and Rolf Turner