This functions take an alternative approach to the trigonometric calculations and using spline functions and generalized additive models to fit a seasonal influenza curve.

flugam(data=NULL, outc=NULL, season, viral,
              time=NULL, echo=F, model_form='none',
              int_type="ci", alpha=0.05, ...)

Arguments

data

A dataframe class object, must contain time variable, epidemic indicator, and measure of influenza morbidity

outc

an unquoted name of a column in data which corresponds to the outcome variable of interest

season

The name of a column which is a logical vector flagging a given time point as epidemic or not

viral

a string vector naming 1 or more viral specimens

time

an name of a column in data object, must be a numeric/integer class, must be unique (i.e. non-repeating)

echo

A logical, if T will print variables used in model.

model_form

An object of type formula, allowing for user-specified model to be passed on to glm(). Default missing.

int_type

Specifies type of upper interval to be output, currently only allows for confidence intervals. Prediction intervals to be added, but are only approximate for Poisson families.

alpha

The threshold for CI interval, default is 0.05 (one-sided).

...

other options passed on to gam model

Value

an object of class data.frame, fit, upper and lower confidence bounds

References

Gul D, Cohen C, Tempia S, Newall AT, Muscatello DJ. Influenza-associated mortality in South Africa, 2009-2013: The importance of choices related to influenza infection proxies. Infl Oth Resp Vir 2017, 12 (1): 54-64. /urlhttps://www.ncbi.nlm.nih.gov/pubmed/29197161

Examples