fluserf: fluserf: Fit a Serfling Model on Time Series Data

Description Usage Arguments Value References Examples

Description

Performs a cyclical linear regression model

Usage

1
2
fluserf(data=NULL, outc=NULL, epi, time=NULL, 
              period=52, echo=F, alpha=.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

epi

an unquoted name of a column in data object (e.g. epi) or if null will default to Sept - May.

time

an unquoted name of a column in data object, must be a numeric/integer class variable in dataframe which corresponds to a unit of time, must be unique (i.e. non-repeating)

period

a numeric vector indicating period length, i.e. 52 weeks in year

echo

A logical parameter, if T. Will print variables used in model.

alpha

Specify level for one-sided test to compute upper limit interval. default is 0.05

Value

an object of class data.frame, input + y0 (fitted values), y0_ul the upper serfling threshold

References

Serfling RE. Methods for current statistical analysis of excess pneumonia-influenza deaths. Public Health Rep. 1963 Jun; 78(6): 494 - 506. /urlhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC1915276/

Examples

1
2
3
4
5
require(flumodelr)
fludta <- flumodelr::fludta
flu_fit <- fluserf(fludta, outc = fludeaths, time = yrweek_dt)  
              
head(flu_fit)

kmcconeghy/flumodelr documentation built on June 7, 2019, 8:47 p.m.