Fit Point Process Model to Several Point Patterns
Fits a Gibbs point process model to several point patterns simultaneously.
mppm(formula, data, interaction=Poisson(), ..., iformula=NULL, use.gam = FALSE)
- A formula describing the systematic part of the model.
Variables in the formula are names of columns in
- A hyperframe (object of class
hyperframe) containing the point pattern responses and the explanatory variables.
- Interpoint interaction(s) appearing in the model.
Either an object of class
"interact"describing the point process interaction structure, or a hyperframe (with the same number of rows as
data) whose entries are o
- Arguments passed to
ppmcontrolling the fitting procedure.
- Optional. A formula (with no left hand side)
describing the interaction to be applied to each case.
Each variable name in the formula should either be the name of a column
in the hyperframe
interaction, or the name of a column
- Logical flag indicating whether to fit the model
This function fits a common point process model to a dataset
containing several different point patterns.
It extends the capabilities of the function
to deal with data such as
- replicated observations of spatial point patterns
- two groups of spatial point patterns
- a designed experiment in which the response from each unit is a point pattern.
glm. The first argument
formulais an Rformula describing the systematic part of the model. The second argument
datacontains the responses and the explanatory variables. Other arguments determine the stochastic structure of the model.
the data are regarded as the results of a designed experiment
involving $n$ experimental units. Each unit has a
mppm, a spatial covariate must be stored
as a pixel image (object of class
"im") which gives the values
of the covariate at a fine grid of locations.
data is a hyperframe (a generalisation of
a data frame, see
hyperframe). This is like a data frame
except that the entries can be objects of any class.
The hyperframe has one row for each experimental unit,
and one column for each variable (response or explanatory variable).
formula should be an Rformula.
The left hand side of
formula determines the
The right hand side of
formula determines the
spatial trend of the model. It specifies the linear predictor,
and effectively represents the logarithm
of the spatial trend.
Variables in the formula must be the names of columns of
data, or one of the reserved names
[object Object],[object Object],[object Object]
The column of responses in
must consist of point patterns (objects of class
The individual point pattern responses
can be defined in different spatial windows.
If some of the point patterns are marked, then they must all be
marked, and must have the same type of marks.
The scope of models that can be fitted to each pattern is the same as the
ppm, that is, Gibbs point processes with
interaction terms that belong to a specified list, including
for example the Poisson process, Strauss process, Geyer's saturation
model, and piecewise constant pairwise interaction models.
The stochastic part of the model is determined by
interaction and (optionally)
- In the simplest case,
interactionis an object of class
"interact", determining the interpoint interaction structure of the point process model, for all experimental units.
interactionmay be a hyperframe, whose entries are objects of class
"interact". It should have the same number of rows as
interactionconsists of only one column, then the entry in row
iis taken to be the interpoint interaction for the
ith experimental unit (corresponding to the
ith row of
interactionhas more than one column, then the argument
iformulais also required. Each row of
interactiondetermines several interpoint interaction structures that might be applied to the corresponding row of
data. The choice of interaction is determined by
iformula; this should be anRformula, without a left hand side. For example if
interactionhas two columns called
iformula = ~Bindicates that the interpoint interactions are taken from the second column.
iformulatypically refer to column names of
interaction. They can also be names of columns in
data, but only for columns of numeric, logical or factor values. For example
iformula = ~B * group(where
groupis a column of
datathat contains a factor) causes the model with interpoint interaction
Bto be fitted with different interaction parameters for each level of
- An object of class
"mppm"representing the fitted model.
There are methods for
coeffor this class.
Baddeley, A. and Turner, R. Practical maximum pseudolikelihood for spatial point patterns. Australian and New Zealand Journal of Statistics 42 (2000) 283--322. Baddeley, A., Bischof, L., Sintorn, I.-M., Haggarty, S., Bell, M. and Turner, R. Analysis of a designed experiment where the response is a spatial point pattern. In preparation.
# Waterstriders data H <- hyperframe(Y = waterstriders) mppm(Y ~ 1, data=H) mppm(Y ~ 1, data=H, Strauss(7)) mppm(Y ~ id, data=H) mppm(Y ~ x, data=H) # Synthetic data from known model n <- 10 H <- hyperframe(V=1:n, U=runif(n, min=-1, max=1), M=factor(letters[1 + (1:n) %% 3])) H$Z <- setcov(square(1)) H$U <- with(H, as.im(U, as.rectangle(Z))) H$Y <- with(H, rpoispp(eval.im(exp(2+3*Z)), win=as.rectangle(Z))) fit <- mppm(Y ~Z + U + V, data=H)