Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

psst

Pseudoscore Diagnostic For Fitted Model against General Alternative


Description

Given a point process model fitted to a point pattern dataset, and any choice of functional summary statistic, this function computes the pseudoscore test statistic of goodness-of-fit for the model.

Usage

psst(object, fun, r = NULL, breaks = NULL, ...,
     model=NULL,
     trend = ~1, interaction = Poisson(), rbord = reach(interaction),
     truecoef=NULL, hi.res=NULL, funargs = list(correction="best"),
     verbose=TRUE)

Arguments

object

Object to be analysed. Either a fitted point process model (object of class "ppm") or a point pattern (object of class "ppp") or quadrature scheme (object of class "quad").

fun

Summary function to be applied to each point pattern.

r

Optional. Vector of values of the argument r at which the function S(r) should be computed. This argument is usually not specified. There is a sensible default.

breaks

Optional alternative to r for advanced use.

...

Ignored.

model

Optional. A fitted point process model (object of class "ppm") to be re-fitted to the data using update.ppm, if object is a point pattern. Overrides the arguments trend,interaction,rbord.

trend,interaction,rbord

Optional. Arguments passed to ppm to fit a point process model to the data, if object is a point pattern. See ppm for details.

truecoef

Optional. Numeric vector. If present, this will be treated as if it were the true coefficient vector of the point process model, in calculating the diagnostic. Incompatible with hi.res.

hi.res

Optional. List of parameters passed to quadscheme. If this argument is present, the model will be re-fitted at high resolution as specified by these parameters. The coefficients of the resulting fitted model will be taken as the true coefficients. Then the diagnostic will be computed for the default quadrature scheme, but using the high resolution coefficients.

funargs

List of additional arguments to be passed to fun.

verbose

Logical value determining whether to print progress reports during the computation.

Details

Let x be a point pattern dataset consisting of points x[1],...,x[n] in a window W. Consider a point process model fitted to x, with conditional intensity lambda(u,x) at location u. For the purpose of testing goodness-of-fit, we regard the fitted model as the null hypothesis. Given a functional summary statistic S, consider a family of alternative models obtained by exponential tilting of the null model by S. The pseudoscore for the null model is

V(r) = sum( Delta S(x[i], x, r)) - integral( Delta S(u,x, r) lambda(u,x) du)

where the Delta operator is

Delta S(u,x, r) = S(x union u, r) - S(x setminus u, r)

the difference between the values of S for the point pattern with and without the point u.

According to the Georgii-Nguyen-Zessin formula, V(r) should have mean zero if the model is correct (ignoring the fact that the parameters of the model have been estimated). Hence V(r) can be used as a diagnostic for goodness-of-fit.

This algorithm computes V(r) by direct evaluation of the sum and integral. It is computationally intensive, but it is available for any summary statistic S(r).

The diagnostic V(r) is also called the pseudoresidual of S. On the right hand side of the equation for V(r) given above, the sum over points of x is called the pseudosum and the integral is called the pseudocompensator.

Value

A function value table (object of class "fv"), essentially a data frame of function values.

Columns in this data frame include dat for the pseudosum, com for the compensator and res for the pseudoresidual.

There is a plot method for this class. See fv.object.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Ege Rubak rubak@math.aau.dk and Jesper Moller.

References

Baddeley, A., Rubak, E. and Moller, J. (2011) Score, pseudo-score and residual diagnostics for spatial point process models. Statistical Science 26, 613–646.

See Also

Special cases: psstA, psstG.

Alternative functions: Kres, Gres.

Examples

data(cells)
    fit0 <- ppm(cells, ~1) # uniform Poisson
    
    G0 <- psst(fit0, Gest)
    G0
    if(interactive()) plot(G0)

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.