# The SPP Procedure

#### Fitted Model Validation That Uses Residuals

Residual diagnostics are tools for checking and examining the fitted model. Residual plots and influence diagnostics help you identify influential observations, assess model assumptions, and recognize departures from the model. Baddeley et al. (2005) define four types of residuals: raw residuals, inverse residuals, Pearson residuals, and score residuals. PROC SPP implements only raw residuals. Given a point pattern x and using a parameter estimate , the raw residuals can be defined as

In order to be able to compute the raw residual, Baddeley et al. (2005) suggest a discretization of this residual measure. According to Baddeley and Turner (2013), discretization of the raw residuals yields

at the quadrature points , where is an indicator equal to 1 if is a data point or 0 if is a dummy point, is the quadrature weight that is attached to , and is the conditional intensity of the fitted model at .

##### Smoothed Residuals

The smoothed raw residuals are defined as

where is a nonparametric kernel estimate of the intensity,

where is an edge correction and is a smoothed version of the parametric estimate of the intensity according to the fitted model:

If the fitted model is correct, the kernel estimate and the kernel smoothed estimate of the fitted intensity should be approximately equal. Positive values of suggest that the model underestimates the intensity (Baddeley and Turner 2005).

##### Lurking Variable Plots

Lurking variable plots help detect dependence on an unobserved covariate. Any systematic pattern in these plots indicate a departure from the model (Baddeley and Turner 2005). For point process models, you can plot the residuals against a spatial covariate or one of the coordinates to investigate the presence of a spatial trend and to assess whether the true trend differs from the trend that is specified by the fitted model. For a spatial covariate that is defined at each location , the residual on each sublevel set,

yields a cumulative residual function for the raw residuals as follows:

In addition to plotting the cumulative residual function, the lurking variable plot also shows limits based on the variance of the innovations under an inhomogeneous Poisson process (Baddeley et al. 2005). The variance of the innovations under an inhomogeneous Poisson process is

The limits can be interpreted as pointwise significance limits. A systematic violation of the limits suggests that the proposed model does not account for the dependence on the covariate under consideration (Baddeley et al. 2005).