Skip to contents

This function is a summary() method for seroincidence objects.

Usage

# S3 method for class 'seroincidence'
summary(object, coverage = 0.95, ...)

Arguments

object

a list(), outputted by stats::nlm() or est.incidence()

coverage

desired confidence interval coverage probability

...

unused

Value

a tibble::tibble() containing the following:

  • est.start: the starting guess for incidence rate

  • ageCat: the age category we are analyzing

  • incidence.rate: the estimated incidence rate, per person year

  • CI.lwr: lower limit of confidence interval for incidence rate

  • CI.upr: upper limit of confidence interval for incidence rate

  • coverage: coverage probability

  • log.lik: log-likelihood of the data used in the call to est.incidence(), evaluated at the maximum-likelihood estimate of lambda (i.e., at incidence.rate)

  • iterations: the number of iterations used

  • antigen_isos: a list of antigen isotypes used in the analysis

  • nlm.convergence.code: information about convergence of the likelihood maximization procedure performed by nlm() (see "Value" section of stats::nlm(), component code); codes 3-5 indicate issues:

    • 1: relative gradient is close to zero, current iterate is probably solution.

    • 2: successive iterates within tolerance, current iterate is probably solution.

    • 3: Last global step failed to locate a point lower than x. Either x is an approximate local minimum of the function, the function is too non-linear for this algorithm, or stepmin in est.incidence() (a.k.a., steptol in stats::nlm()) is too large.

    • 4: iteration limit exceeded; increase iterlim.

    • 5: maximum step size stepmax exceeded five consecutive times. Either the function is unbounded below, becomes asymptotic to a finite value from above in some direction or stepmax is too small.

Examples


library(dplyr)

xs_data <- load_pop_data("https://osf.io/download//n6cp3/")

curves <- load_curve_params("https://osf.io/download/rtw5k/") %>%
  filter(antigen_iso %in% c("HlyE_IgA", "HlyE_IgG")) %>%
  slice(1:100, .by = antigen_iso) # Reduce dataset for the purposes of this example

noise <- load_noise_params("https://osf.io/download//hqy4v/")

est1 <- est.incidence(
  pop_data = xs_data %>% filter(Country == "Pakistan"),
  curve_params = curves,
  noise_params = noise %>% filter(Country == "Pakistan"),
  antigen_isos = c("HlyE_IgG", "HlyE_IgA")
)

summary(est1)
#> # A tibble: 1 × 10
#>   est.start incidence.rate      SE CI.lwr CI.upr coverage log.lik iterations
#>       <dbl>          <dbl>   <dbl>  <dbl>  <dbl>    <dbl>   <dbl>      <int>
#> 1       0.1          0.142 0.00725  0.128  0.156     0.95  -2378.          4
#> # ℹ 2 more variables: antigen.isos <chr>, nlm.convergence.code <ord>