View source: R/create_geo_objects.R
| create_geo_objects | R Documentation | 
This internal function creates the geographical objects needed to run the Bayesian cluster detection method in bayes_cluster().  Specifically it creates all single zones based data objects, where single zones are the zones defined by Kulldorff (1997).
create_geo_objects(max.prop, population, centroids, sp.obj)
| max.prop | maximum proportion of study region's population each single zone can contain | 
| population | vector of length  | 
| centroids | 
 | 
| sp.obj | object of class SpatialPolygons (See SpatialPolygons-class) representing the study region | 
| overlap | list with two elements:  | 
| cluster.coords | 
 | 
Albert Y. Kim
Wakefield J. and Kim A.Y. (2013) A Bayesian model for cluster detection.Biostatistics, 14, 752–765.
data(pennLC) max.prop <- 0.15 population <- tapply(pennLC$data$population, pennLC$data$county, sum) centroids <- latlong2grid(pennLC$geo[, 2:3]) sp.obj <- pennLC$spatial.polygon output <- create_geo_objects(max.prop, population, centroids, sp.obj) ## number of single zones nrow(output$cluster.coords)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.