# Kmodel

From spatstat v1.24-1
by Adrian Baddeley

##### K function of a model

Returns the theoretical $K$ function or the pair correlation function of a point process model.

##### Usage

```
Kmodel(model, ...)
pcfmodel(model, ...)
## S3 method for class 'kppm':
Kmodel(model, \dots)
## S3 method for class 'kppm':
pcfmodel(model, \dots)
```

##### Arguments

- model
- A fitted cluster point process model, typically obtained from
the model-fitting algorithm
`kppm`

. An object of class`"kppm"`

. - ...
- Ignored.

##### Details

For certain types of point process models, it is possible to
write down a mathematical expression for the $K$ function
or the pair correlation function of the model. In particular this
is possible for a fitted cluster point process model (object of
class `"kppm"`

obtained from `kppm`

).
The functions `Kmodel`

and `pcfmodel`

are generic.
Currently the only method is for the class `"kppm"`

.
The return value is a `function`

in the Rlanguage,
which takes one argument `r`

.
Evaluation of this function, on a numeric vector `r`

,
yields values of the desired $K$ function or pair correlation
function at these distance values.

##### Value

- A
`function`

in the Rlanguage, which takes one argument`r`

.

##### See Also

##### Examples

```
data(redwood)
fit <- kppm(redwood, ~x, "MatClust")
K <- Kmodel(fit)
K(c(0.1, 0.2))
curve(K(x), from=0, to=0.25)
```

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

### Community examples

Looks like there are no examples yet.