This function is a summary() method for seroincidence objects.
Usage
# S3 method for class 'seroincidence'
summary(object, coverage = 0.95, verbose = TRUE, ...)Arguments
- object
a
list()outputted bystats::nlm()orest_seroincidence()- coverage
desired confidence interval coverage probability
- verbose
whether to produce verbose messaging
- ...
unused
Value
a tibble::tibble() containing the following:
est.start: the starting guess for incidence rateageCat: the age category we are analyzingincidence.rate: the estimated incidence rate, per person yearCI.lwr: lower limit of confidence interval for incidence rateCI.upr: upper limit of confidence interval for incidence ratecoverage: coverage probabilitylog.lik: log-likelihood of the data used in the call toest_seroincidence(), evaluated at the maximum-likelihood estimate of lambda (i.e., atincidence.rate)iterations: the number of iterations usedantigen_isos: a list of antigen isotypes used in the analysisnlm.convergence.code: information about convergence of the likelihood maximization procedure performed bynlm()(see "Value" section ofstats::nlm(), componentcode); 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
stepmininest_seroincidence()(a.k.a.,steptolinstats::nlm()) is too large.4: iteration limit exceeded; increase
iterlim.5: maximum step size
stepmaxexceeded five consecutive times. Either the function is unbounded below, becomes asymptotic to a finite value from above in some direction, orstepmaxis too small.
Examples
library(dplyr)
xs_data <-
sees_pop_data_pk_100
curve <-
typhoid_curves_nostrat_100 |>
filter(antigen_iso %in% c("HlyE_IgA", "HlyE_IgG"))
noise <-
example_noise_params_pk
est1 <- est_seroincidence(
pop_data = xs_data,
sr_params = curve,
noise_params = noise,
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.166 0.0178 0.135 0.205 0.95 -524. 5
#> # ℹ 2 more variables: antigen.isos <chr>, nlm.convergence.code <ord>