[R] Morans I for Spatial Surveillance

Roger Bivand Roger.Bivand at nhh.no
Fri Nov 18 10:09:23 CET 2005


On Thu, 17 Nov 2005, Serryn Eagleson wrote:

> 
> Hello, 
> 
> I am interested in using Morans I for different time intervals to detect
> disease clusters.
> 
> Ultimately I would like to use CUSUM - or similar monitoring statistic
> to monitor the results of Morans I - similar to the work by Rogerson
> (2005) Spatial Surveillance and Cummulative Sum Methods in Spatial and
> Syndromic Surveillance for Public Health.
> 
> Thus far - thanks to the list I have Morans I running in a loop for each
> day (however I found that on some days no data is recorded, this caused
> an error to get around this error I included an elseif statement to skip
> the calculation for days where no disease notifications are recorded.)

Please consider posting on R-sig-geo (see the Spatial Task View for
address) rather than this general list. The book with Rogerson's chapter
isn't yet available everywhere - not reached Norwegian university
libraries yet (journal articles are much more accessible from e-journals
than book chapters), so a very small number of people will know what you
are interested in. 

If you want to follow this up, you'll have to be more specific. The
strucchange package has some interesting functions for these issues, but
you'll have to explain what Rogerson proposes.

> 
> I am just wondering if anyone has code/advice for the best way to
> apprach the next stage of monitoring Morans I over different time
> intervals for the detection of abnormal clusters. My code thus far is
> below - I would also like to assemble the results in a neat table if
> anyone has tips for this I would alo appreciate it as I am rather new to
> R!
> 
> Thanks
> Serryn
> 
> T1<-read.dbf("ob.dbf")
> N <- colnames(T1)
> 
> T2nb <- read.gal("PC.gal",override=TRUE)
> col.W <- nb2listw(T2nb, style="W")
> 
> for(i in seq(N)) {   
>       Vec1 <- spNamedVec(N[i+7], T1)
>       Svec1<-sum(Vec1)
>        ifelse ( Svec1> 0, res[i]<-moran.test(spNamedVec(N[i+7], T1), col.W, zero.policy=TRUE), res[i]<-"NULL") 
> 
>                         }
> 
> print(res)
> 
> 
> 
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

-- 
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-help mailing list