profilepl {spatstat}R Documentation

Profile Maximum Pseudolikelihood

Description

Fits point process models by profile maximum pseudolikelihood

Usage

profilepl(s, f, ..., rbord = NULL, verbose = TRUE)

Arguments

s

Data frame containing values of the irregular parameters over which the profile pseudolikelihood will be computed.

f

Function (such as Strauss) that generates an interpoint interaction object, given values of the irregular parameters.

...

Data passed to ppm to fit the model.

rbord

Radius for border correction (same for all models). If omitted, this will be computed from the interactions.

verbose

Logical flag indicating whether to print progress reports.

Details

The model-fitting function ppm fits point process models to point pattern data. However, only the ‘regular’ parameters of the model can be fitted by ppm. The model may also depend on ‘irregular’ parameters that must be fixed in any call to ppm.

This function profilepl is a wrapper which finds the values of the irregular parameters that give the best fit. It uses the method of maximum profile pseudolikelihood.

The argument s must be a data frame whose columns contain values of the irregular parameters over which the maximisation is to be performed.

An irregular parameter may affect either the interpoint interaction or the spatial trend.

interaction parameters:

in a call to ppm, the argument interaction determines the interaction between points. It is usually a call to a function such as Strauss. The arguments of this call are irregular parameters. For example, the interaction radius parameter r of the Strauss process, determined by the argument r to the function Strauss, is an irregular parameter.

trend parameters:

in a call to ppm, the spatial trend may depend on covariates, which are supplied by the argument covariates. These covariates may be functions written by the user, of the form function(x,y,...), and the extra arguments ... are irregular parameters.

The argument f determines the interaction for each model to be fitted. It would typically be one of the functions Poisson, AreaInter, BadGey, DiggleGatesStibbard, DiggleGratton, Fiksel, Geyer, Hardcore, LennardJones, OrdThresh, Softcore, Strauss or StraussHard. Alternatively it could be a function written by the user.

Columns of s which match the names of arguments of f will be interpreted as interaction parameters. Other columns will be interpreted as trend parameters.

To apply the method of profile maximum pseudolikelihood, each row of s will be taken in turn. Interaction parameters in this row will be passed to f, resulting in an interaction object. Then ppm will be applied to the data ... using this interaction. Any trend parameters will be passed to ppm through the argument covfunargs. This results in a fitted point process model. The value of the log pseudolikelihood from this model is stored. After all rows of s have been processed in this way, the row giving the maximum value of log pseudolikelihood will be found.

The object returned by profilepl contains the profile pseudolikelihood function, the best fitting model, and other data. It can be plotted (yielding a plot of the log pseudolikelihood values against the irregular parameters) or printed (yielding information about the best fitting values of the irregular parameters).

In general, f may be any function that will return an interaction object (object of class "interact") that can be used in a call to ppm. Each argument of f must be a single value.

Value

An object of class "profilepl". There are methods for plot and print for this class.

The components of the object include

fit

Best-fitting model

param

The data frame s

iopt

Row index of the best-fitting parameters in s

Author(s)

Adrian Baddeley Adrian.Baddeley@csiro.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz

Examples

    data(cells)

    # one irregular parameter
    s <- data.frame(r=seq(0.05,0.15, by=0.01))
    
    ps <- profilepl(s, Strauss, cells)
    ps
    if(interactive()) plot(ps)

    # two irregular parameters
    s <- expand.grid(r=seq(0.05,0.15, by=0.01),sat=1:3)
    
    pg <- profilepl(s, Geyer, cells)
    pg
    if(interactive()) plot(pg)
    ## Not run: 
    pg$fit
    
## End(Not run)

    # multitype pattern with a common interaction radius
    data(betacells)
    s <- data.frame(R=seq(65,85,by=5))
    
    MS <- function(R) { MultiStrauss(radii=diag(c(R,R))) }
    pm <- profilepl(s, MS, betacells, ~marks)

[Package spatstat version 1.25-3 Index]