Learn R Programming

crimelinkage (version 0.0.4)

makeGroups: Generates crime groups from crime series data

Description

This function generates crime groups that are useful for making unlinked pairs and for agglomerative linkage.

Usage

makeGroups(X, method = 1)

Arguments

X
crime series data (generated from makeSeriesData) with offender ID (offenderID), crime ID (crimeID), and the event datetime (TIME)
method
Method=1 (default) forms groups by finding the maximal connected offender subgraph. Method=2 forms groups from the unique group of co-offenders. Method=3 forms from groups from offenderIDs

Value

vector of crime group labels

Details

Method=1 forms groups by finding the maximal connected offender subgraph. So if two offenders have ever co-offended, then all of their crimes are assigned to the same group. Method=2 forms groups from the unique group of co-offenders. So for two offenders who co-offended, all the co-offending crimes are in one group and any crimes committed individually or with other offenders are assigned to another group. Method=3 forms groups from the offender(s) responsible. So a crime that is committed by multiple people will be assigned to multiple groups.

Examples

Run this code
data(crimes)
 data(offenders)
 seriesData = makeSeriesData(crimedata=crimes,offenderTable=offenders)
 groups = makeGroups(seriesData,method=1)
 head(groups,10)

Run the code above in your browser using DataLab