Mark Stevenson, Roberty Verity and Steve Le Comber
Geographic profiling in R
R is a powerful statistical and analytic tool that has been embraced by the ecological community. Used primarily for statistical analysis, R is increasingly being applied to data visualisation problems as well. Here we present the package Rgeoprofile for the analysis of spatial point pattern data in ecology. This package uses a Bayesian Dirichlet process mixture model to compute and visualise the sources dispersing organisms. This work was developed by Mark Stevenson, Robert Verity, Richard Nichols and Steve Le Comber.
What is geographic profiling?
R package Rgeoprofile
The R package Rgeoprofile allows users to create geoprofiles using point pattern data. The methods used are based on the Dirichlet Proccess Mixture Model described in Verity et al. (Methods in Ecology and Evolution, in press). The package loads in long/lat data, sets model parameters, sets the graphical parameters, and uses Rgooglemaps to map the data points, before creating a Bayesian mixture model and fitting parameters with a MCMC. The package renders the posterior surface and produces diagnostic plots, and finally outputs a geoprofile overlayed on a Google map along with the hit scores of any suspect sites.
Here, you can download four files:
Rgeoprofile 1.2 is the package itself. The Rgeoprofile 1.2 user guide contains a complete walkthrough of the package. You can either use your own data, or use the dummy crime data data and dummy source data provided.
This package runs the DPM mixture model. The package is composed of 8 core functions and 4 accessory functions. The core functions load in the data, set parameters of the model, generates the prior, runs the MCMC, produces maps and saves the results. They should be run in order:
- Download and install the package
- Import your data
- Run LoadData()
- Run ModelParameters()
- Run GraphicParameters()
- Run CreateMaps()
- Run RunMCMC()
- Run ThinandAnalyse()
- Run PlotGP()
- OPTIONAL: Run Reporthitscores()
See individual descriptions in the R help files for the use of these functions.
Verity, R., Stevenson, M.D., Rossmo, D.K., Nichols, R.A. & Le Comber, S.C. Spatial targeting of infectious disease control: identifying multiple, unknown sources. Methods in Ecology and Evolution (in press).