stone.boot {DCluster} | R Documentation |
Generate Boostrap Replicates of Stone's Statistic
Description
Generate bootstrap replicates of Stone's statictic, by means of function boot from boot package. Notice that these functions should not be used separately but as argument statistic when calling function boot.
stone.boot is used when performing a non-parametric bootstrap.
stone.pboot is used when performing a parametric bootstrap.
Usage
stone.boot(data, i, ...)
stone.pboot(...)
Arguments
data |
A dataframe with all the data, as explained in the DCluster manual page. |
i |
Permutation created in non-parametric bootstrap. |
... |
Additional arguments passed to the functions. |
Value
Both functions return the value of the statistic.
References
Stone, R. A. (1988). Investigating of excess environmental risks around putative sources: Statistical problems and a proposed test. Statistics in Medicine 7,649-660.
See Also
DCluster, boot, stone.stat
Examples
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
#All Tests are performed around county 78.
#Permutation model
st.perboot<-boot(sids, statistic=stone.boot, R=niter, region=78)
plot(st.perboot)#Display results
#Multinomial model
st.mboot<-boot(sids, statistic=stone.pboot, sim="parametric",
ran.gen=multinom.sim, R=niter, region=78)
plot(st.mboot)#Display results
#Poisson model
st.pboot<-boot(sids, statistic=stone.pboot, sim="parametric",
ran.gen=poisson.sim, R=niter, region=78)
plot(st.pboot)#Display results
#Poisson-Gamma model
st.pgboot<-boot(sids, statistic=stone.pboot, sim="parametric",
ran.gen=negbin.sim, R=niter, region=78)
plot(st.pgboot)#Display results
[Package DCluster version 0.2-10 Index]