Skip to content

How to calculate a cross-correlogram based on Morans I

3 messages · Jens Floeter, Edzer Pebesma

#
Dear list members,

i need a hint - i am stuck on my search for a function.

I would like to calculate cross-correlograms between two variables 
(predator and prey densities) and use this as an index of spatial overlap.

I used the spdep pakcage and use e.g.

sp.correlogram(xy.data.nb, prey, order = 5 , method = "I", 
zero.policy=TRUE, style = "W")
sp.correlogram(xy.data.nb, predator, order = 5 , method = "I", 
zero.policy=TRUE, style = "W")

to calculate the (auto-) correlograms for predator and prey individually.

But how do i combine them to calculate the cross-correlogram ?

Any hint would be highly appreciated...

Best wishes !
jens
#
Jens,

in your code snippet below, the number 6370 rings a bell. According to
http://en.wikipedia.org/wiki/Earth_radius it is close to the average
earth radius. In km. Given that there's just one such number, it seems
the code assumes a sphere is close enough to approximate the earth.
On 10/06/2010 12:37 PM, Jens Floeter wrote: