[R-sig-Geo] (no subject)

adrian at maths.uwa.edu.au adrian at maths.uwa.edu.au
Fri Dec 21 02:05:56 CET 2007


Markus Loecher <loecher at eden.rutgers.edu> writes:

> I am trying to compute a spatial density estimator where the samples are
> not points but lines. The usual kernel density estimators will not work
> very well, because of their fixed xy orientation. I am imagining adding up
> many "ridge" like density contributions that are aligned with the line.
> (instead of Gaussian blobs).
> Does anyone know about algorithms or maybe even R functions that would
>  compute such a density ?

This is implemented in the R package 'spatstat' as the function
'density.psp'.

It computes the convolution between the line segment pattern and a
Gaussian kernel. That means that each point on each line segment
contributes a Gaussian kernel. Summing these contributions over all the
points on a line segment, the total contribution from a line segment is a
kind of ridge surface, aligned with the line segment. The final density
estimate is the sum of such contributions from each line segment.

Adrian Baddeley




More information about the R-sig-Geo mailing list