spatstat (version 1.60-1)

rmhexpand: Specify Simulation Window or Expansion Rule

Description

Specify a spatial domain in which point process simulations will be performed. Alternatively, specify a rule which will be used to determine the simulation window.

Usage

rmhexpand(x = NULL, ..., area = NULL, length = NULL, distance = NULL)

Arguments

x

Any kind of data determining the simulation window or the expansion rule. A window (object of class "owin") specifying the simulation window, a numerical value specifying an expansion factor or expansion distance, a list containing one numerical value, an object of class "rmhexpand", or NULL.

Ignored.

area

Area expansion factor. Incompatible with other arguments.

length

Length expansion factor. Incompatible with other arguments.

distance

Expansion distance (buffer width). Incompatible with other arguments.

Value

An object of class "rmhexpand" specifying the expansion rule. There is a print method for this class.

Undetermined expansion

If expand=NULL, this is interpreted to mean that the expansion rule is “not yet decided”. Expansion will be decided later, by the simulation algorithm rmh. If the model cannot be expanded (for example if the covariate data in the model are not available on a larger domain) then expansion will not occur. If the model can be expanded, then if the point process model has a finite interaction range r, the default is rmhexpand(distance=2*r), and otherwise rmhexpand(area=2).

Details

In the Metropolis-Hastings algorithm rmh for simulating spatial point processes, simulations are usually carried out on a spatial domain that is larger than the original window of the point process model, then subsequently clipped to the original window.

The command rmhexpand can be used to specify the simulation window, or to specify a rule which will later be used to determine the simulation window from data.

The arguments are all incompatible: at most one of them should be given.

If the first argument x is given, it may be any of the following:

  • a window (object of class "owin") specifying the simulation window.

  • an object of class "rmhexpand" specifying the expansion rule.

  • a single numerical value, without attributes. This will be interpreted as the value of the argument area.

  • either c(area=v) or list(area=v), where v is a single numeric value. This will be interpreted as the value of the argument area.

  • either c(length=v) or list(length=v), where v is a single numeric value. This will be interpreted as the value of the argument length.

  • either c(distance=v) or list(distance=v), where v is a single numeric value. This will be interpreted as the value of the argument distance.

  • NULL, meaning that the expansion rule is not yet determined.

If one of the arguments area, length or distance is given, then the simulation window is determined from the original data window as follows.

area

The bounding box of the original data window will be extracted, and the simulation window will be a scalar dilation of this rectangle. The argument area should be a numerical value, greater than or equal to 1. It specifies the area expansion factor, i.e. the ratio of the area of the simulation window to the area of the original point process window's bounding box.

length

The bounding box of the original data window will be extracted, and the simulation window will be a scalar dilation of this rectangle. The argument length should be a numerical value, greater than or equal to 1. It specifies the length expansion factor, i.e. the ratio of the width (height) of the simulation window to the width (height) of the original point process window's bounding box.

distance

The argument distance should be a numerical value, greater than or equal to 0. It specifies the width of a buffer region around the original data window. If the original data window is a rectangle, then this window is extended by a margin of width equal to distance around all sides of the original rectangle. The result is a rectangle. If the original data window is not a rectangle, then morphological dilation is applied using dilation.owin so that a margin or buffer of width equal to distance is created around all sides of the original window. The result is a non-rectangular window, typically of a different shape.

See Also

expand.owin to apply the rule to a window.

will.expand to test whether expansion will occur.

rmh, rmhcontrol for background details.

Examples

Run this code
# NOT RUN {
  rmhexpand()
  rmhexpand(2)
  rmhexpand(1)
  rmhexpand(length=1.5)
  rmhexpand(distance=0.1)
  rmhexpand(letterR)
# }

Run the code above in your browser using DataCamp Workspace