Description Usage Arguments Value Author(s) References See Also Examples

`spdensity`

computes a kernel smoothed spatial density function from a point pattern. This is essentially a slight modification of the `density.ppp`

function from the `spatstat`

package, which computes the spatial intensity of a point pattern.

1 2 3 |

`x` |
Point pattern (object of class "ppp"). |

`sigma` |
Standard deviation of isotropic Gaussian smoothing kernel. Either a numerical value, or a function that computes an appropriate value of sigma. |

`...` |
Additional arguments passed to pixellate.ppp and as.mask to determine the pixel resolution, or passed to sigma if it is a function. |

`weights` |
Optional weights to be attached to the points. A numeric vector, numeric matrix, or an expression. |

`edge` |
Logical flag: if TRUE, apply edge correction. |

`varcov` |
Variance-covariance matrix of anisotropic Gaussian kernel. Incompatible with sigma. |

`at` |
String specifying whether to compute the intensity values at a grid of pixel locations (at="pixels") or only at the points of x (at="points"). |

`leaveoneout` |
Logical value indicating whether to compute a leave-one-out estimator. Applicable only when at="points". |

`adjust` |
Optional. Adjustment factor for the smoothing parameter. |

`diggle` |
Logical. If TRUE, use Diggle's edge correction, which is more accurate but slower to compute than the correction described under Details. |

This function produces an object of class `im`

from the `spatstat`

package, in nearly the exact same way as `spatstat::density.ppp`

. The difference is that the values are scaled so that a true spatial density function is produced (i.e., the function integrates to 1).

Joshua French

Waller, L.A. and Gotway, C.A. (2005). Applied Spatial Statistics for Public Health Data. Hoboken, NJ: Wiley.

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.