In this question we fit a Strauss point process model to the
swedishpines
data.
We need a guess at the interaction distance \(R\). Compute and plot the \(K\)-function of the dataset and choose the value \(r\) which maximises the discrepancy \(|K(r)-\pi r^2|\).
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))
.
In Question 1 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 \([5, 12]\), then type
rvals <- seq(5, 12, 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)
Modify Question 1 by using the Huang-Ogata approximate maximum
likelihood algorithm (method="ho"
) instead of maximum
pseudolikelihood (the default, method="mpl"
).
Repeat Question 2 for the inhomogeneous Strauss process with
log-quadratic trend. The corresponding call to profilepl
is
fitp <- profilepl(D, Strauss, swedishpines ~ polynom(x,y,2))
Fit a stationary Gaussian DPP model to the
swedishpines
data using the dppm()
command.
Generate 39 simulations of the fitted model (simulations may take some time to generate).
Make pointwise envelopes for a summary statistic of your choice
(e.g. Kest()
) using the generated 39 simulations (see the
simulate
argument in envelope.ppp()
)
Plot the envelopes and consider whether you find the fitted model to be reasonable.