Creates a plot showing the observed and expected nunber of outcomes for each month in the 3 years before and after initiation of the exposure, as well as the IC. The full process is described in Noren et al.
plotChronograph(data, exposureId, outcomeId, title = NULL, fileName = NULL)
Data as generated using the getChronographData
function.
The unique ID identifying the exposure to plot.
The unique ID identifying the outcome to plot.
The title to show above the plot.
Name of the file where the plot should be saved, for example 'plot.png'. See the
function ggsave
in the ggplot2 package for supported file formats.
Noren GN, Hopstadius J, Bate A, Star K, Edwards R, Temporal pattern discovery in longitudinal electronic patient records, Data Mining and Knowledge Discovery, May 2010, Volume 20, Issue 3, pp 361-387.