View source: R/fractional_polynomial_models.R
| fp_model | R Documentation |
Refers to section 6.2.
fp_model(age, p, pos = NULL, tot = NULL, status = NULL, link = "logit")
age |
the age vector. |
p |
the powers of the predictor. |
pos |
the positive count vector (optional if status is provided). |
tot |
the total count vector (optional if status is provided). |
status |
the serostatus vector (optional if pos & tot are provided). |
link |
the link function for model. Defaulted to "logit". |
a list of class fp_model with 5 items
datatype |
type of data used for fitting model (aggregated or linelisting) |
df |
the dataframe used for fitting the model |
info |
a fitted glm model |
sp |
seroprevalence |
foi |
force of infection |
[stats::glm()] for more information on glm object
df <- hav_be_1993_1994
model <- fp_model(
df$age, pos = df$pos, tot = df$tot,
p=c(1.5, 1.6), link="cloglog")
plot(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.