psstA(object, r = NULL, breaks = NULL, ...,
        trend = ~1, interaction = Poisson(),
        rbord = reach(interaction), ppmcorrection = "border",
        correction = "all",
        truecoef = NULL, hi.res = NULL,
        nr=spatstat.options("psstA.nr"),
        ngrid=spatstat.options("psstA.ngrid"))"ppm")
    or a point pattern (object of class "ppp")
    or quadrature scheme (object of class "quad").r for advanced use.ppm."all" and "best".
    The default is to compute all diagnostic quantities.hi.res.quadscheme.
    If this argument is present, the model will be
    re-fitted at high resolution as specified by these parameters.
    The coefficients
    of the rer values to be used
    if r is not specified."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.
  To shorten the computation time, choose smaller values of the
  arguments nr and ngrid, or reduce the values of their
  defaults spatstat.options("psstA.nr")
  and spatstat.options("psstA.ngrid").
  Computation time is roughly proportional to
  nr * npoints * ngrid^2 where npoints is the number
  of points in the point pattern.
Fpseudo)
  computes the pseudoscore test statistic
  which can be used as a diagnostic for goodness-of-fit of a fitted
  point process model.
  
  Let $x$ be a point pattern dataset consisting of points
  $x_1,\ldots,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.
  The alternative hypothesis is a family of
  hybrid models obtained by combining 
  the fitted model with the area-interaction process
  (see AreaInter). The family of alternatives includes
  models that are slightly more regular than the fitted model,
  and others that are slightly more clustered than the fitted model.The pseudoscore, evaluated at the null model, is $$V(r) = \sum_i A(x_i, x, r) - \int_W A(u,x, r) \lambda(u,x) {\rm d} u$$ where $$A(u,x,r) = B(x\cup{u},r) - B(x\setminus u, r)$$ where $B(x,r)$ is the area of the union of the discs of radius $r$ centred at the points of $x$ (i.e. $B(x,r)$ is the area of the dilation of $x$ by a distance $r$). Thus $A(u,x,r)$ is the unclaimed area associated with $u$, that is, the area of that part of the disc of radius $r$ centred at the point $u$ that is not covered by any of the discs of radius $r$ centred at points of $x$.
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.
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.
psstG,
  psst,
  spatstat.optionspso <- spatstat.options(psstA.ngrid=16,psstA.nr=10)
   X <- rStrauss(200,0.1,0.05)
   plot(psstA(X))
   plot(psstA(X, interaction=Strauss(0.05)))
   spatstat.options(pso)Run the code above in your browser using DataLab