besagnewell.boot: Generate Boostrap Replicates of Besag and Newell's Statistic

Description Usage Arguments Value References See Also Examples

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

1
2

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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

DCluster documentation built on May 2, 2019, 11:51 a.m.