Learn R Programming

SpatialEpi (version 1.2.8)

create_geo_objects: Create geographical objects to be used in Bayesian Cluster Detection Method

Description

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).

Usage

create_geo_objects(max.prop, population, centroids, sp.obj)

Value

overlap

list with two elements: 1. presence which lists for each area all the single zones it is present in and 2. cluster.list for each single zone its component areas

cluster.coords

n.zones x 2 matrix of the center and radial area of each single zone

Arguments

max.prop

maximum proportion of study region's population each single zone can contain

population

vector of length n of the population of each area

centroids

n x 2 table of the (x,y)-coordinates of the area centroids. The coordinate system must be grid-based

sp.obj

object of class SpatialPolygons (See SpatialPolygons-class) representing the study region

Author

Albert Y. Kim

References

Wakefield J. and Kim A.Y. (2013) A Bayesian model for cluster detection.Biostatistics, 14, 752--765.

Examples

Run this code
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)

Run the code above in your browser using DataLab