[R-sig-Geo] Large dataset on Ripley's K function

Roger Bivand Roger.Bivand at nhh.no
Sat Nov 24 07:55:07 CET 2007

On Sat, 24 Nov 2007, Sisi wrote:

> Dear all,
> It seems from the previous mails that you require the objective of the study
> in order to give approprate suggestions.

No. Like all the R lists, this list expects posters to follow the posting 
guide, which involves providing reproducable examples where the poster 
implies that software "does not work". This does not mean that there is 
any requirement to say what you are actually doing, only that you have a 
problem doing something - which can very well be a simple example.

Of course, it is a good idea to mention what the substantive research 
question is if it has significance for the posting. It is also useful to 
indicate an affiliation if posting from a non-informative email address 
like yours. It is polite to use one's name, not a nickname, especially if 
your questions involve those replying in using their time and effort doing 

> My research objective is to detect the spatial, temporal and space-time 
> clustering of the birdflu outbreaks at the continental level.

Well, the file names in your earlier postings did suggest that birds were 
involved. Your other questions do however suggest that you are expecting 
the list to do your work for you, including reading basic references on 
point pattern analysis (which handle the importance of handling edge 
effects with care), and the help pages of the packages you have been 

It is (perhaps unintentionally) evident that the results you may achieve 
will not provide much insight into the data generating process you claim 
to be interested in, including using small island windows and not handling 
the lack of homogeneity in the observed data (the distribution of farms 
with poultry is not uniform).

The posting guide does ask that posters refrain from posting homework 
questions (although good homework questions from posters with real names 
ans affiliations, and which demonstrate good preparation and effort are 
often answered anyway).

> Considering your suggestion about the raster mask, would this be able to
> give me a solution that elivates the problem I experienced in the R code
> given previously. It is difficult to find the solution to make the programme
> work. I really appreciate any suggestions you can provide.

Think through your process model (how you expect contagion to occur and 
whether it can occur across water bodies), see if you can find a control 
point pattern, such as the density of domestic poultry, recall that some 
incidences may not have been observed (or different virus strains may not 
be reported in your data), and review the relevant literature. Then look 
at ?im and ?as.owin.im.

The software all works (until you can demonstrate otherwise), the rest is 
in your hands. If you really get stuck, please do post, but preferably 
after thinking first and asking in your own institution (known offlist to 
be one with plenty of libraries, researchers, and R users).

Roger Bivand

> Kind regards,
> Sisi
>    Roger Bivand
> The edge correction is the real issue. K is measuring the number of points
> within areas of distance bands adjusted for the area within the edges. So
> you have to correct - but shorelines may not be appropriate for birds -
> how far can your birds fly over water? Have you considered using a raster
> mask which would permit contact over channels between islands?
> Roger
> On 23/11/2007, Dan Putler <dan.putler at sauder.ubc.ca> wrote:
>> Hi Sisi,
>> A three continent study area is very large. It strikes me that border
>> effects would likely matter, so would probably need to be corrected for.
>> Although, what the correct border definition is will depend on what your
>> data relate to. Consequently, the natural question to ask is what kinds
>> of objects do your points represent?
>> Dan

Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

More information about the R-sig-Geo mailing list