# NOT RUN {
if (require(rgdal)) {
xx <- readOGR(system.file("shapes/sids.shp", package="spData")[1])
bw <- 144.4813
# }
# NOT RUN {
bw <- ggwr.sel(SID74 ~ I(NWBIR74/BIR74) + offset(log(BIR74)), data=xx,
family=poisson(), longlat=TRUE)
# }
# NOT RUN {
nc <- ggwr(SID74 ~ I(NWBIR74/BIR74) + offset(log(BIR74)), data=xx,
family=poisson(), longlat=TRUE, bandwidth=bw)
nc
# }
# NOT RUN {
nc <- ggwr(SID74 ~ I(NWBIR74/10000) + offset(log(BIR74)), data=xx,
family=poisson(), longlat=TRUE, bandwidth=bw)
nc
nc <- ggwr(SID74 ~ I(NWBIR74/10000) + offset(log(BIR74)), data=xx,
family=quasipoisson(), longlat=TRUE, bandwidth=bw)
nc
# }
# NOT RUN {
}
# }
Run the code above in your browser using DataLab