powered by
Refers to section 6.1.2.
farrington_model(data, start, fixed = list())
a list of class farrington_model with 5 items
type of datatype used for model fitting (aggregated or linelisting)
the dataframe used for fitting the model
fitted "glm" object
seroprevalence
force of infection
the input data frame, must either have `age`, `pos`, `tot` columns (for aggregated data) OR `age`, `status` for (linelisting data)
Named list of vectors or single vector. Initial values for optimizer.
Named list of vectors or single vector. Parameter values to keep fixed during optimization.
[stats::glm()] for more information on the fitted glm object
df <- rubella_uk_1986_1987 model <- farrington_model( df, start=list(alpha=0.07,beta=0.1,gamma=0.03) ) plot(model)
Run the code above in your browser using DataLab