splancs (version 2.01-42)

# Kenv.csr: Envelope of Khat from simulations of complete spatial randomness

## Description

Compute envelope of Khat from simulations of complete spatial randomness.

## Usage

`Kenv.csr(nptg,poly,nsim,s,quiet=FALSE)`

## Arguments

nptg

Number of points to generate in each simulation.

poly

Polygon in which to generate the points.

nsim

Number of simulations to do.

s

Vector of distances at which to calculate the envelope.

quiet

If FALSE, print a message after every simulation for progress monitoring. If TRUE, print no messages.

## Value

A list with two components, called `\$upper` and `\$lower`. Each component is a vector like `s`. The two components contain the upper and lower bound of the Khat envelope.

## References

Rowlingson, B. and Diggle, P. 1993 Splancs: spatial point pattern analysis code in S-Plus. Computers and Geosciences, 19, 627-655; the original sources can be accessed at: https://www.maths.lancs.ac.uk/~rowlings/Splancs/. See also Bivand, R. and Gebhardt, A. 2000 Implementing functions for spatial statistical analysis using the R language. Journal of Geographical Systems, 2, 307-317.

## See Also

`csr`, `khat`

## Examples

```# NOT RUN {
data(cardiff)
UL.khat <- Kenv.csr(length(cardiff\$x), cardiff\$poly, nsim=29, seq(2,30,2))
plot(seq(2,30,2), sqrt(khat(as.points(cardiff), cardiff\$poly,
seq(2,30,2))/pi)-seq(2,30,2), type="l", xlab="Splancs - polygon boundary",
ylab="Estimated L", ylim=c(-1,1.5))
lines(seq(2,30,2), sqrt(UL.khat\$upper/pi)-seq(2,30,2), lty=2)
lines(seq(2,30,2), sqrt(UL.khat\$lower/pi)-seq(2,30,2), lty=2)
# }
```