Calculates the rate difference between influenza season and peri-influenza season, or between influenza season and summer season
ird(data=NULL, outc=NULL, time=NULL, viral, period=52, respStart=27, high=0.1, fluStart=40, fluStop=18, echo=F)
data | A dataframe class object, must contain time variable, epidemic indicator, and measure of influenza morbidity |
---|---|
outc | A named variable in 'data' dataframe, identifies a numeric type variable in dataframe data which is the measure of disease morbidity / mortality |
time | A named variable in 'data' dataframe, identifies a numeric/integer class variable in dataframe which corresponds to a unit of time, must be unique (i.e. non-repeating) |
viral | A named variable in 'data' data.frame, identifies a numeric type variable in dataframe data which is the measure of viral activity. |
period | a numeric variable indicating the period length of the time variable (i.e. weeks = 52, the default) |
respStart | A numeric/integer class variable, must specify the week number of the start of the respiratory season. The default value is 27. This corresponds with the beginning of July. |
high | A numeric class variable, must specify the proportion of positive isolates for a week to be considered of "high viral activity". The default value is 0.10. |
fluStart | A numeric/integer class variable, must specify the week number of the start of the influenza season. The default value is 40. This corresponds with the beginning of October. |
fluStop | A numeric/integer class variable, must specify the week number of the start of the influenza season. The default value is 18. This corresponds with the end of April. |
an object of class data.frame
Thompson WW, Weintraub E, Dhankhar P, Cheng PY, Brammer L, Meltzer MI, Bresee JS, Shay DK. Estimates of US influenza‐associated deaths made using four different methods. Influenza and other respiratory viruses. 2009 Jan 1;3(1):37-49. /urlhttp://onlinelibrary.wiley.com/doi/10.1111/j.1750-2659.2009.00073.x/full
require(flumodelr) fludta <- flumodelr::fludta flu_fit <- ird(data=fludta, viral=prop_flupos, time=yrweek_dt) flu_rates <- rb(flu_fit, perc_fludeaths) flu_rates#> # A tibble: 166 x 4 #> season period perc_fludeaths_fluseason perc_fludeaths_viral_act #> <dbl> <fct> <dbl> <dbl> #> 1 1961 Excess 56.6 NA #> 2 1961 Low 29.0 NA #> 3 1961 High 85.6 NA #> 4 1962 Excess 78.3 NA #> 5 1962 Low 70.0 NA #> 6 1962 High 148. NA #> 7 1963 Excess 59.2 NA #> 8 1963 Low 73.4 NA #> 9 1963 High 133. NA #> 10 1964 Excess 69.8 NA #> # ... with 156 more rows