farrington_model {serosv} | R Documentation |
The Farrington (1990) model.
Description
Refers to section 6.1.2.
Usage
farrington_model(data, start, fixed = list())
Arguments
data |
the input data frame, must either have 'age', 'pos', 'tot' columns (for aggregated data) OR 'age', 'status' for (linelisting data) |
start |
Named list of vectors or single vector. Initial values for optimizer. |
fixed |
Named list of vectors or single vector. Parameter values to keep fixed during optimization. |
Value
a list of class farrington_model with 5 items
datatype |
type of datatype used for model fitting (aggregated or linelisting) |
df |
the dataframe used for fitting the model |
info |
fitted "glm" object |
sp |
seroprevalence |
foi |
force of infection |
See Also
[stats::glm()] for more information on the fitted glm object
Examples
df <- rubella_uk_1986_1987
model <- farrington_model(
df,
start=list(alpha=0.07,beta=0.1,gamma=0.03)
)
plot(model)
[Package serosv version 1.1.0 Index]