[R] Quadratcount problem in spatstat
Rolf Turner
r.turner at auckland.ac.nz
Tue Dec 8 22:07:38 CET 2009
Sebastian: Can you send me (off-list) your point pattern (ppp_cameroon)
so that I can experiment with it and try to figure out what's
going wrong? (I am one of the maintainers of spatstat.)
Save the point pattern using dput(), e.g.
dput(ppp_cameroon,"cameroon.dput")
and then attach ``cameroon.dput'' to your email.
Thanks.
cheers,
Rolf Turner
On 9/12/2009, at 9:38 AM, Sebastian Schutte wrote:
> Hi,
>
> I know there are older threads discussing the quadratcount function in
> spatstat. Unfortunately, I could not find a solution to my problem
> there.
>
> I'm analyzing a point pattern in an irregular polygonal window.
> Both the
> window (an entire country) and the points are projected using WGS84.
> When I do quadratcount with only one quadrat for the entire country it
> holds all my 154 points:
>
> test <- quadratcount(ppp_cameroon, nx=1, ny=1)
> plot(test)
> sum(test)
> [1] 154
>
> But when I split the country up into several quadrats (which is the
> only
> thing that makes sense for the statistics), the function returns
> results
> that are plainly wrong. The counts always add up to 154, but when
> overlaid with the actual points it looks like some points are not
> at all
> counted (0 count quadrats where points are) and some count values are
> much higher than they should be (empty quadrats with 20 points).
>
> The problem does not occur with the humberside example data. I can
> also
> reproduce everything in example(quadratcount) correctly with
> humberside,
> but not with my own data set.
>
> Quadrat.test and quadrat.test.ppp lead to the same problem.
>
> I'm out of ideas, so thank you very much for any suggestions!
> Sebastian
>
> P.S:
> I'm running R 2.10.0 under Ubuntu Linux 9.10 with spatstat 1.17-2
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
More information about the R-help
mailing list