besagnewell             package:DCluster             R Documentation

_B_e_s_a_g _a_n_d _N_e_w_e_l_l'_s _s_t_a_t_i_s_t_i_c _f_o_r _s_p_a_t_i_a_l _c_l_u_s_t_e_r_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     Besag & Newell's statistic looks for clusters of size _k_, i. e.,
     where the number of observed cases is _k_. At every area where a
     case has appeared, the number of neighbouring regions needed to
     reach $k$ cases is calculated.  If this number is too small, that
     is, too many observed cases in just a few regions with low
     expected cases, then it is marked as a cluster.

_R_e_f_e_r_e_n_c_e_s:

     Besag, J. and Newell, J.(1991). The detection of clusters in rare
     diseases.  Journal of the Royal Statistical Society A  154,
     143-155.

_S_e_e _A_l_s_o:

     DCluster, besagnewell.stat, besagnewell.boot, besagnewell.pboot,
     bn.iscluster

_E_x_a_m_p_l_e_s:

     #B&N must use the centroids as grid.
     #The size of teh cluster is 20.
     #100  bootstrap simulations are performed
     #Poisson is the model used in the bootstrap simulations to generate the
     #observations.
     #Signifiance level is 0'05, even though multiple tests are made.

     library(boot)
     library(spdep)

     data(nc.sids)

     sids<-data.frame(Observed=nc.sids$SID74)
     sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74))
     sids<-cbind(sids, x=nc.sids$x, y=nc.sids$y)

     bnresults<-opgam(sids, thegrid=sids[,c("x","y")], alpha=.05, 
             iscluster=bn.iscluster, set.idxorder=TRUE, k=20, model="poisson", 
             R=100, mle=calculate.mle(sids) )

     #Plot all the centroids
     plot(sids$x, sids$y)

     #Plot signifiant centroids in red
     points(bnresults$x, bnresults$y, col="red", pch=19)

