Learn R Programming

spatstat.explore (version 3.3-1)

envelopeArray: Array of Simulation Envelopes of Summary Function

Description

Compute an array of simulation envelopes using a summary function that returns an array of curves.

Usage

envelopeArray(X, fun, ..., dataname = NULL, verb = FALSE, reuse = TRUE)

Value

An object of class "fasp" representing an array of envelopes.

Arguments

X

Object containing point pattern data. A point pattern (object of class "ppp", "lpp", "pp3" or "ppx") or a fitted point process model (object of class "ppm", "kppm" or "lppm").

fun

Function that computes the desired summary statistic for a point pattern. The result of fun should be a function array (object of class "fasp").

...

Arguments passed to envelope to control the simulations, or passed to fun when evaluating the function.

dataname

Optional character string name for the data.

verb

Logical value indicating whether to print progress reports.

reuse

Logical value indicating whether the envelopes in each panel should be based on the same set of simulated patterns (reuse=TRUE, the default) or on different, independent sets of simulated patterns (reuse=FALSE).

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.

Details

This command is the counterpart of envelope when the function fun that is evaluated on each simulated point pattern will return an object of class "fasp" representing an array of summary functions.

Simulated point patterns are generated according to the rules described for envelope. In brief, if X is a point pattern, the algorithm generates simulated point patterns of the same kind, according to complete spatial randomness. If X is a fitted model, the algorithm generates simulated point patterns according to this model.

For each simulated point pattern Y, the function fun is invoked. The result Z <- fun(Y, ...) should be an object of class "fasp" representing an array of summary functions. The dimensions of the array Z should be the same for each simulated pattern Y.

This algorithm finds the simulation envelope of the summary functions in each cell of the array.

See Also

envelope, alltypes.

Examples

Run this code
  if(interactive()) {
    Nsim <- 19
    X <- finpines
    co <- "best"
  } else {
    ## smaller task to reduce check time
    Nsim <- 3
    X <- finpines[c(FALSE, TRUE)]
    co <- "none"
  }
  A <- envelopeArray(X, markcrosscorr, nsim=Nsim, correction=co)
  plot(A)

Run the code above in your browser using DataLab