Description Usage Format Source Examples
These data contain the number of reported influenza-like-illness outpatient visits in the US for the 2006, 2007 and 2008 seasons. A season consists of weeks 40 to week 20 of the following year, so that, for example, the 2008 season includes up to week 20 of 2009, where the H1N1 flu epidemic had already caused a noticeable increase in ILI visits.
1 |
A data frame with 99 observations on the following 3 variables.
visits
the number of reported ILI visits for that week (numeric)
season
the season year (numeric)
week
the week number for that season (numeric)
US Centre for Disease Control, http://www.cdc.gov/flu/weekly/fluactivity.htm
1 2 3 4 5 6 7 8 9 | library(rgam)
plot(visits ~ week, data=ili.visits, xlab='Week', ylab='ILI visits',
pch=19, col='grey75')
with(ili.visits, {
a <- rgam(x=week, y=visits, family='poisson', cv.method='rcv',
epsilon=1e-7, alpha=17/80, max.it=500)
pr.rgam <- predict(a, type='response')
lines(week[order(week)], pr.rgam[order(week)], lwd=3, col='red')
})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.