besagnewell.boot {DCluster} | R Documentation |
Generate Boostrap Replicates of Besag and Newell's Statistic
Description
Generate boostrap replicates of Besag and Newell's statistic, by means of function boot from boot library. Notice that these functions should not be used separately but as argument statistic when calling function boot.
besagnewell.boot is used when performing a non-parametric bootstrap.
When sampling models are Multinomial or Poisson it is quite straightforwad to obtain the actual p-value as shown in the examples. When Permutation or Negative Binomial are used, simulation must be used to estimate significance.
Usage
besagnewell.boot(data, i, ...)
besagnewell.pboot(...)
Arguments
data |
A dataframe with the data, as explained in DCluster. |
i |
Permutation generated by the non-parametric bootstrap. |
... |
Additional arguments needed. |
Value
Both functions return the value of the statistic.
References
Besag, J. and Newell, J.(1991). The detection of clusters in rare diseases. Journal of the Royal Statistical Society A 154, 143-155.
See Also
DCluster, boot, besagnewell, besagnewell.stat, bn.iscluster
Examples
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)
niter<-100
#Permutation model
besn.perboot<-boot(sids, statistic=besagnewell.boot, R=niter, k=20)
plot(besn.perboot)#Display results