# update.ppm

##### Update a Fitted Point Process Model

`update`

method for class `"ppm"`

.

- Keywords
- spatial

##### Usage

```
update.ppm(object, ...,
Q, trend, interaction, covariates,
correction, rbord, use.gam)
```

##### Arguments

- object
- An existing fitted point process model,
typically produced by
`ppm`

. - ...
- Unnamed arguments - see Details.
- Q
- a new point pattern dataset or quadrature scheme
to which the model should be fitted. An object of class
`"ppp"`

or`"quad"`

. - trend
- a new
`formula`

for the spatial trend of the model. - interaction
- a new interpoint interaction structure (object of class
`"interact"`

) for the model. - covariates
- a new data frame of spatial covariates,
or
`NULL`

to remove all spatial covariates. - correction
- character string giving a new type of edge correction,
or
`NULL`

to return to the default. - rbord
- numerical value of the distance for the `border' edge correction,
or
`NULL`

to suppress the border correction. - use.gam
- logical value indicating whether to fit the model using
`gam`

. See`ppm`

.

##### Details

This is a method for the generic function `update`

for the class `"ppm"`

. An object of class `"ppm"`

describes a fitted point process model. See `ppm.object`

)
for details of this class.

`update.ppm`

will modify the point process model
specified by `object`

according to the new arguments given,
then re-fit it.
The actual re-fitting is performed by the model-fitting
function `ppm`

.

If you are comparing several model fits to the same data,
or fits of the same model to different data, it is
strongly advisable to use `update.ppm`

rather than trying to fit them by hand.
This is because `update.ppm`

re-fits the model
in a way which is comparable to the original fit.

The named arguments `Q`

, `trend`

,
`interaction`

, `covariates`

, `correction`

,
`rbord`

, `use.gam`

are passed to `ppm`

.
Use `name=NULL`

to remove the argument `name`

from the
call.

The unnamed arguments `...`

may include

- exactly one argument of class
`"ppp"`

or`"quad"`

, which will be interpreted as the named argument`Q`

; - exactly one argument of class
`"formula"`

, which will be interpreted as the named argument`trend`

; - exactly one argument of class
`"interact"`

, which will be interpreted as the named argument`interaction`

; - exactly one argument of class
`"data.frame"`

, which will be interpreted as the named argument`covariates`

.

##### Value

- Another fitted point process model (object of class
`"ppm"`

).

##### Examples

```
data(nztrees)
data(cells)
# fit the stationary Poisson process
fit <- ppm(nztrees, ~ 1)
# fit a nonstationary Poisson process
fitP <- update(fit, trend=~x)
fitP <- update(fit, ~x)
# fit a stationary Strauss process
fitS <- update(fit, interaction=Strauss(13))
fitS <- update(fit, Strauss(13))
# oops, forgot the edge correction
fitS <- update(fitS, rbord=13)
# re-fit the model to a subset
# of the original point pattern
nzw <- owin(c(0,148),c(0,95))
nzsub <- nztrees[,nzw]
fut <- update(fitS, Q=nzsub)
fut <- update(fitS, nzsub)
# WARNING: the point pattern argument is called 'Q'
```

*Documentation reproduced from package spatstat, version 1.5-9, License: GPL version 2 or newer*