[R-sig-Geo] density from spatstat less than zero
Christopher W. Ryan
cryan at binghamton.edu
Wed Oct 14 19:35:40 CEST 2015
Hello. I'm a longtime user of R and subscriber to R-help, but new to
R-sig-geo. I'm running R 3.1.3 and spatstat 1.41-1 on Windows XP.
I have a point pattern consisting of about 26,000 points, in an area as
follows:
Window: polygonal boundary
single connected closed polygon with 133 vertices
enclosing rectangle: [370698.1, 476022.1] x [4649777, 4732634] units
Window area = 6525710000 square units
It is clearly inhomogeneous, with most points clustered in the region's
central city, and very few of them in the vast rural areas.
The density() command from spatstat with all default values gives a
density that is overly-smoothed for my purposes. Using density()
command, with all default values except sigma=bw.diggle or sigma=bw.ppl,
yields densities that are, to the eye, a better match for the point
pattern, but some of the density values are less than zero, although
this is not apparent when I plot() the density. The same happens if I
use the default sigma and set adjust to much of anything less than 1.
Any ideas why, and how to avoid the negative values?
My apologies for not including a minimal working example. Including the
entire point pattern would be cumbersome. Whittling it down to 100 or so
points still yields the same problem, but I think that changes the game
and would not be a true reflection of my situation.
Thanks.
--Chris
--
Christopher W. Ryan, MD, MS
cryanatbinghamtondotedu
https://www.linkedin.com/in/ryancw
Early success is a terrible teacher. You’re essentially being rewarded
for a lack of preparation, so when you find yourself in a situation
where you must prepare, you can’t do it. You don’t know how.
--Chris Hadfield, An Astronaut's Guide to Life on Earth
More information about the R-sig-Geo
mailing list