Learn R Programming

crimelinkage (version 0.0.3)

crimeClust_hier: Agglomerative Hierarchical Crime Series Clustering

Description

Run hierarchical clustering on a set of crimes using the log Bayes Factor as the similarity metric.

Usage

crimeClust_hier(crimes, varnames, estimateBF, linkage = c("average", "single",
  "complete"), ...)

Arguments

crimes
data.frame of crime incidents
varnames
the variable names necessary for getting evidence variables
estimateBF
function to estimate the bayes factor from evidence variables
linkage
the type of linkage for hierarchical clustering
  • averageuses the average bayes factor
  • singleuses the largest bayes factor (most similar)
  • completeuses the smallest bayes factor (l
...
other arguments passed to compareCrimes

Value

  • An object of class hclust (from hclust).

Details

This function first compares all crime pairs using compareCrimes, then uses estimateBF to estimate the log Bayes factor for every pair. Next, it passes this information into hclust to carry out the agglomerative hierarchical clustering. Because hclust requires a dissimilarity, this uses the negative log Bayes factor.

References

Porter, M. D. (2014). A Statistical Approach to Crime Linkage. arXiv preprint arXiv:1410.2285.. http://arxiv.org/abs/1410.2285

See Also

clusterPath, plot_hcc

Examples

Run this code
# See vignette: "Crime Series Identification and Clustering" for usage.

Run the code above in your browser using DataLab