ECAS2019

Lab 3: Dependence

This session covers tools for investigating dependence between points.

Exercise 1

The swedishpines dataset was recorded in a study plot in a large forest. We shall assume the pattern is stationary.

  1. Calculate the estimate of the K-function using Kest.

  2. Plot the estimate of K(r) against r

  3. Plot the estimate of K(r) -
\pi\!r^2 against r (Hint: look at the fmla argument in plot.fv).

  4. Calculate and plot an estimate of the pair correlation function using pcf.

  5. Draw tentative conclusions from these plots about interpoint interaction in the data.

Exercise 2

The command rThomas generates simulated realisations of the Thomas model (‘modified Thomas cluster process’).

  1. Read the help file.

  2. Type plot(rThomas(10, 0.05, 8)) a few times, and interpret the results.

  3. Experiment with the arguments of rThomas to obtain point patterns that

    1. consist of a few, well-separated, very tight clusters of points;
    2. look similar to realisations of a uniform Poisson process.

Exercise 3

  1. Read the help file for kppm.

  2. Fit the Thomas model to the redwood data by the method of minimum contrast:

    fit <- kppm(redwood ~ 1, clusters="Thomas")
    fit
    plot(fit)
    
  3. Read off the parameters of the fitted model, and generate a simulated realisation of the fitted model using rThomas.

  4. Type plot(simulate(fit)) to generate a simulated realisation of the fitted model automatically.

  5. Try the command

    fit2 <- kppm(redwood ~ 1, clusters="Thomas", startpar=c(kappa=10, scale=0.1))
    

    and briefly explore the fitting algorithm’s sensitivity to the initial guesses at the parameter values kappa and scale.

  6. Generate and plot several simulated realisations of the fitted model, to assess whether it is plausible.

  7. Extract and plot the fitted pair correlation function by

    pcffit <- pcfmodel(fit)
    plot(pcffit, xlim = c(0, 0.3))
    
  8. 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?

Exercise 4

  1. Fit a Matern cluster process to the redwood data.

  2. Use vcov to estimate the covariance matrix of the parameter estimates.

  3. Compare with the covariance matrix obtained when fitting a homogeneous Poisson model.

Exercise 5

In this question we fit a Strauss point process model to the swedishpines data.

  1. 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|.

  2. Fit the stationary Strauss model with the chosen interaction distance using

    ppm(swedishpines ~ 1, Strauss(R))
    

    where R is your chosen value.

  3. Interpret the printout: how strong is the interaction?

  4. Plot the fitted pairwise interaction function using plot(fitin(fit)).

Exercise 6

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

  1. Look again at the plot of the L-function of swedishpines and determine a plausible range of possible values for the interaction distance.

  2. 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)
    
  3. 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)
    
  4. Execute

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

    to find the maximum profile pseudolikelihood fit.

  5. Print and plot the object fitp.

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

  7. Extract the fitted Gibbs point process model from the object fitp as

    bestfit <- as.ppm(fitp)
    

Exercise 7

Modify Question 5 by using the Huang-Ogata approximate maximum likelihood algorithm (method="ho") instead of maximum pseudolikelihood (the default, method="mpl").

Exercise 8

Repeat Question 6 for the inhomogeneous Strauss process with log-quadratic trend. The corresponding call to profilepl is

fitp <- profilepl(D, Strauss, swedishpines ~ polynom(x,y,2))