This session is concerned with fitting non-Poisson point process models.

The lecturerâ€™s R script is available here (right click and save).

Fit the Thomas model to the

`redwood`

data by the method of minimum contrast:`fit <- kppm(redwood ~ 1, clusters="Thomas") fit plot(fit)`

Read off the parameters of the fitted model, and generate a simulated realisation of the fitted model using

`rThomas`

.Type

`plot(simulate(fit))`

to generate a simulated realisation of the fitted model automatically.Generate and plot several simulated realisations of the fitted model, to assess whether it is plausible.

Extract and plot the fitted pair correlation function by

`pcffit <- pcfmodel(fit) plot(pcffit, xlim = c(0, 0.3))`

Type

`plot(envelope(fit, Lest, nsim=39))`

to generate simulation envelopes of the \(L\) function from this fitted model. Do they suggest the model is plausible?

Fit a Matern cluster process to the

`redwood`

data.Use

`vcov`

to estimate the covariance matrix of the parameter estimates.Compare with the covariance matrix obtained when fitting a homogeneous Poisson model.

In this exercise we fit a Strauss point process model to the `swedishpines`

data.

We need a guess at the interaction distance \(R\). Compute and plot the \(L\)-function of the dataset and choose the value \(r\) which maximises the discrepancy \(|L(r)-r|\).

Fit the stationary Strauss model with the chosen interaction distance using

`ppm(swedishpines ~ 1, Strauss(R))`

where

`R`

is your chosen value.Interpret the printout: how strong is the interaction?

Plot the fitted pairwise interaction function using

`plot(fitin(fit))`

.

For the Strauss model fitted in Exercise 3,

Generate and plot a simulated realisation of the fitted model using

`simulate`

.Plot the \(L\)-function of the data along with the global simulation envelopes from 19 realisations of the fitted model.

In Exercise 3 we guesstimated the Strauss interaction distance parameter. Alternatively this parameter could be estimated by profile pseudolikelihood.

Look again at the plot of the \(L\)-function of

`swedishpines`

and determine a plausible range of possible values for the interaction distance.Generate a sequence of values equally spaced across this range, for example, if your range of plausible values was \([3, 15]\), then type

`rvals <- seq(3, 15, by=0.5)`

Construct a data frame, with one column named

`r`

(matching the argument name of`Strauss`

), containing these values. For example`D <- data.frame(r = rvals)`

Execute

`fitp <- profilepl(D, Strauss, swedishpines ~ 1)`

to find the maximum profile pseudolikelihood fit.

Print and plot the object

`fitp`

.Compare the computed estimate of interaction distance \(r\) with your guesstimate. Compare the corresponding estimates of the Strauss interaction parameter \(\gamma\).

Extract the fitted Gibbs point process model from the object

`fitp`

as`bestfit <- as.ppm(fitp)`