# quadscheme.logi

##### Generate a Logistic Regression Quadrature Scheme from a Point Pattern

Generates a logistic regression quadrature scheme (an object of class
`"logiquad"`

inheriting from `"quad"`

)
from point patterns of data and dummy points.

##### Usage

```
quadscheme.logi(data, dummy, dummytype = "stratrand",
nd = NULL, mark.repeat = FALSE, …)
```

##### Arguments

- data
The observed data point pattern. An object of class

`"ppp"`

or in a format recognised by`as.ppp()`

- dummy
The pattern of dummy points for the quadrature. An object of class

`"ppp"`

or in a format recognised by`as.ppp()`

. If missing a sensible default is generated.- dummytype
The name of the type of dummy points to use when

`"dummy"`

is missing. Currently available options are:`"stratrand"`

(default),`"binomial"`

,`"poisson"`

,`"grid"`

and`"transgrid"`

.- nd
Integer, or integer vector of length 2 controlling the intensity of dummy points when

`"dummy"`

is missing.- mark.repeat
Repeating the dummy points for each level of a marked data pattern when

`"dummy"`

is missing. (See details.)- …
Ignored.

##### Details

This is the primary method for producing a quadrature schemes
for use by `ppm`

when the logistic regression
approximation (Baddeley et al. 2013) to the pseudolikelihood of the
model is applied (i.e. when `method="logi"`

in `ppm`

).

The function `ppm`

fits a point process model to an
observed point pattern. When used with the option `method="logi"`

it requires a quadrature scheme consisting of
the original data point pattern and an additional pattern of dummy points.
Such quadrature schemes are represented by objects of class
`"logiquad"`

.

Quadrature schemes are created by the function
`quadscheme.logi`

.
The arguments `data`

and `dummy`

specify the data and dummy
points, respectively. There is a sensible default for the dummy
points.
Alternatively the dummy points
may be specified arbitrarily and given in any format recognised by
`as.ppp`

.

The quadrature region is the region over which we are
integrating, and approximating integrals by finite sums.
If `dummy`

is a point pattern object (class `"ppp"`

)
then the quadrature region is taken to be `Window(dummy)`

.
If `dummy`

is just a list of \(x, y\) coordinates
then the quadrature region defaults to the observation window
of the data pattern, `Window(data)`

.

If `dummy`

is missing, then a pattern of dummy points will be
generated, taking account of the optional arguments `dummytype`

,
`nd`

, and `mark.repeat`

.

The currently accepted values for `dummytype`

are:

`"grid"`

where the frame of the window is divided into a`nd * nd`

or`nd[1] * nd[2]`

regular grid of tiles and the centers constitutes the dummy points.`"transgrid"`

where a regular grid as above is translated by a random vector.`"stratrand"`

where each point of a regular grid as above is randomly translated within its tile.`"binomial"`

where`nd * nd`

or`nd[1] * nd[2]`

points are generated uniformly in the frame of the window.`"poisson"`

where a homogeneous Poisson point process with intensity`nd * nd`

or`nd[1] * nd[2]`

is generated within the frame of observation window.

Then if the window is not rectangular, any dummy points lying outside it are deleted.

If `data`

is a multitype point pattern the dummy points should also
be marked (with the same levels of the marks as `data`

). If
`dummy`

is missing and the dummy pattern is generated by
`quadscheme.logi`

the default behaviour is to attach a uniformly
distributed mark (from the levels of the marks) to each dummy
point. Alternatively, if `mark.repeat=TRUE`

each dummy point is
repeated as many times as there are levels of the marks with a distinct
mark value attached to it.

Finally, each point (data and dummy) is assigned the weight 1. The
weights are never used and only appear to be compatible with the class
`"quad"`

from which the `"logiquad"`

object inherits.

##### Value

An object of class `"logiquad"`

inheriting from `"quad"`

describing the quadrature scheme
(data points, dummy points, and quadrature weights)
suitable as the argument `Q`

of the function `ppm()`

for
fitting a point process model.

The quadrature scheme can be inspected using the
`print`

and `plot`

methods for objects
of class `"quad"`

.

##### References

Baddeley, A., Coeurjolly, J.-F., Rubak, E. and Waagepetersen, R. (2014)
Logistic regression for spatial Gibbs point processes.
*Biometrika* **101** (2) 377--392.

##### See Also

##### Examples

```
# NOT RUN {
data(simdat)
Q <- quadscheme.logi(simdat)
# }
```

*Documentation reproduced from package spatstat, version 1.64-1, License: GPL (>= 2)*