Description Usage Arguments Details Value See Also Examples
Creates a data frame with index to crimedata and offender information. It is used to generate the linkage data.
1 2 | makeSeriesData(crimedata, offenderTable, time = c("midpoint", "earliest",
"latest"))
|
crimedata |
data.frame of crime incident data. |
offenderTable |
offender table that indicates the offender(s) responsible
for solved crimes. |
time |
the event time to be returned: 'midpoint', 'earliest', or 'latest' |
The creates a crimeseries data object that is required for creating
linkage data. It creates a crime series ID (CS) for every
offender. Because of co-offending, a single crime (crimeID) can
belong to multiple crime series.
data frame representation of the crime series present in the
crimedata. It includes the crime ID (crimeID), index of that
crimeID in the original crimedata (Index), the crime series
ID (CS) corresponding to each offenderID, and the event time
(TIME).
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(crimes)
data(offenders)
seriesData = makeSeriesData(crimedata=crimes,offenderTable=offenders)
head(seriesData)
nCrimes = table(seriesData$offenderID) # length of each crime series
table(nCrimes) # distribution of crime series length
mean(nCrimes>1) # proportion of offenders with multiple crimes
nCO = table(seriesData$crimeID) # number of co-offenders per crime
table(nCO) # distribution of number of co-offenders
mean(nCO>1) # proportion of crimes with multiple co-offenders
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.