# NOT RUN {
data(greece) # Use example surveillance data from Greece
m <- with(greece, fitFluMoDL(deaths = daily$deaths,
temp = daily$temp, dates = daily$date,
proxyH1 = weekly$ILI * weekly$ppH1,
proxyH3 = weekly$ILI * weekly$ppH3,
proxyB = weekly$ILI * weekly$ppB,
yearweek = weekly$yearweek))
# }
# NOT RUN {
# Calculate influenza-attributable estimates by season, until 2016-17:
attr1 <- attrMort(m, par=c("H1","H3","B"), sel="season", to=2016)
attr1
# Calculate influenza-attributable estimates by week, only point
# estimates, for the 2014-15 season:
attr2 <- attrMort(m, par=c("H1","H3","B"), sel="week",
from=201440, to=201520, ci=FALSE)
attr2
# }
# NOT RUN {
# Calculate mortality attributable to temperatures below 5 celsius, for
# the period of January 2017:
attr3 <- attrMort(m, par="temp",
sel=with(m$data, which(dates>="2017-1-1" & dates<="2017-1-31")),
temprange=c(5,-20))
# }
# NOT RUN {
# Calculate attributable mortalities for the entire 2017-18 season, and
# return the Monte Carlo simulation samples in the output
attr4 <- attrMort(m, sel="season", from=2017, to=2017, mcsamples=TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab