retro_summary | R Documentation |
retro_summary
Performs an exploratory, descriptive analysis of the time series of observed data, for as many syndromic groups as under study, and outputs both a markdown file, where the user can have access to all retrospective analysis R codes, and an html summary (produced by knitting the .Rmd file).
retro_summary(x, ...) ## S4 method for signature 'syndromicD' retro_summary(x, object.name = "my.syndromic", file.name = "syndromic.retro.summary", frequency = 365, short = FALSE) ## S4 method for signature 'syndromicW' retro_summary(x, object.name = "my.syndromic", file.name = "syndromic.retro.summary", frequency = 52, short = FALSE)
x |
a syndromic ( |
... |
Additional arguments to the method. |
object.name |
a name for the title in the html file, by default "my.syndromic". |
file.name |
a name for the rmd/html file to be created with
the summary. The default is "syndromic.retro.summary". When changing the
file name remember to use quotes. Please note that the function will create
a subdirectory within the current working directory, where all files will be
saved. Make sure to check the current working directory ( |
frequency |
The cycle of data repetition. By default equal to 365 (year)
for objects of the class |
short |
By default set to FALSE. When set to TRUE, omits the fitting of poisson and negative binomial distributions, displaying only summary statistics and plots for each series. |
The summary should constitue a first step in the retrospective
exploratory analysis of available syndromic data. It is also intended to
serve as means to check the result of the creation
of an object of the class syndromic (syndromicD
or
syndromicW
). That is, it is a convenient, fast
way to plot all syndromic time-series in the object.
If the user wants to make changes to the summary produced, it is easy to open the .Rmd file in RStudio and produce any changes to the R code generated.
A ".Rmd" file and a ".html" page with sections corresponding to each syndromic group found in the slot observed of the syndromic object. These include:
daily and weekly plots Line plots of the data found in the slot observed of the syndromic object provided. In the case of daily data, Weekly plots are produced merging the daily data by week.
basic summary statistics Such as mean, quartiles, auto-correlation and partial auto-correlation.
box-plots
of the data by day-of-week, month and year, intended to allow a
preliminary assessment of which temporal effects are present (day-of-week,
seasonal or trends). Plots vary depending on whether the data provided is monitored daily
(syndromicD
) or weekly (syndromicW
)
Poisson model fitting Fitting of a Poisson model to the data using a formula specified by the user.
Negative Binomial model fitting Fitting of a negative binomial model to the data using a formula specified by the user.
data(lab.daily) my.syndromicD <- raw_to_syndromicD (id=SubmissionID, syndromes.var=Syndrome, dates.var=DateofSubmission, date.format="%d/%m/%Y", data=lab.daily) retro_summary(my.syndromicD) my.syndromicD <- raw_to_syndromicD (id=lab.daily$SubmissionID, syndromes.var=lab.daily$Syndrome, dates.var=lab.daily$DateofSubmission, date.format="%d/%m/%Y") wd = getwd() setwd(paste0(wd,"/retro")) retro_summary(my.syndromicD) setwd(wd) ### WEEKLY data(lab.daily) my.syndromicW <- raw_to_syndromicW (id=SubmissionID, syndromes.var=Syndrome, dates.var=DateofSubmission, date.format="%d/%m/%Y", data=lab.daily) retro_summary(my.syndromicW) my.syndromicW <- raw_to_syndromicW (id=lab.daily$SubmissionID, syndromes.var=lab.daily$Syndrome, dates.var=lab.daily$DateofSubmission, date.format="%d/%m/%Y") wd = getwd() setwd(paste0(wd,"/retro")) retro_summary(my.syndromicW) setwd(wd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.