R: Generate Bootstrap Replicates of Geary's C Autocorrelation...
gearyc.boot
R Documentation
Generate Bootstrap Replicates of Geary's C Autocorrelation Statistic
Description
Generate bootstrap replicates of Geary's C autocorrelation statistic, by means
of function boot form boot library. Notice that these functions
should not be used separately but as argument statistic when calling
function boot.
gearyc.boot is used when performing a non-parametric bootstrap.
gearyc.pboot is used when performing a parametric bootstrap.
Usage
gearyc.boot(data, i, ...)
gearyc.pboot(...)
Arguments
data
A dataframe containing the data, as specified in the
DClustermanpage.
i
Permutation generated by the bootstrap procedure
...
Aditional arguments passed when performing a bootstrap.
Value
Both functions return the value of the statistic.
References
Geary, R. C. (1954). The contiguity ratio and statistical mapping. The Incorporated Statistician 5, 115-145.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DCluster)
Loading required package: boot
Loading required package: spdep
Loading required package: sp
Loading required package: Matrix
Loading required package: MASS
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DCluster/gearyc.boot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: gearyc.boot
> ### Title: Generate Bootstrap Replicates of Geary's C Autocorrelation
> ### Statistic
> ### Aliases: gearyc.boot gearyc.pboot
> ### Keywords: spatial
>
> ### ** Examples
>
> library(boot)
> library(spdep)
>
> data(nc.sids)
> col.W <- nb2listw(ncCR85.nb, zero.policy=TRUE)
>
> sids<-data.frame(Observed=nc.sids$SID74)
> sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74))
>
>
> niter<-100
>
> #Permutation model
> gc.perboot<-boot(sids, statistic=gearyc.boot, R=niter, listw=col.W,
+ n=length(ncCR85.nb), n1=length(ncCR85.nb)-1, S0=Szero(col.W) )
> plot(gc.perboot)#Display results
>
> #Multinomial model
> gc.mboot<-boot(sids, statistic=gearyc.pboot, sim="parametric",
+ ran.gen=multinom.sim, R=niter, listw=col.W,
+ n=length(ncCR85.nb), n1=length(ncCR85.nb)-1, S0=Szero(col.W) )
> plot(gc.mboot)#Display results
>
> #Poisson model
> gc.pboot<-boot(sids, statistic=gearyc.pboot, sim="parametric",
+ ran.gen=poisson.sim, R=niter, listw=col.W,
+ n=length(ncCR85.nb), n1=length(ncCR85.nb)-1, S0=Szero(col.W) )
> plot(gc.pboot)#Display results
>
> #Poisson-Gamma model
> gc.pgboot<-boot(sids, statistic=gearyc.pboot, sim="parametric",
+ ran.gen=negbin.sim, R=niter, listw=col.W,
+ n=length(ncCR85.nb), n1=length(ncCR85.nb)-1, S0=Szero(col.W) )
> plot(gc.pgboot)#Display results
>
>
>
>
>
>
> dev.off()
null device
1
>