Skip to contents

Refers to section 6.2.

Usage

fp_model(age, p, pos = NULL, tot = NULL, status = NULL, link = "logit")

Arguments

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).

the link function for model. Defaulted to "logit".

Value

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

See also

[stats::glm()] for more information on glm object

Examples

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)