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 bystats::nlm()
orest.incidence()
- coverage
desired confidence interval coverage probability
- ...
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.incidence()
, 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
stepmin
inest.incidence()
(a.k.a.,steptol
instats::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 orstepmax
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>