This class contains the output from a severity estimate model fitting.
Arguments
- x
An object of class SeverityEstimateFit or
SummaryEstimateFit.- ...
For
summary.SeverityEstimateFit(), unused. Forprint.SeverityEstimateFit(), further arguments passed to theprintmethod for astanfitobject. Forprint.SummaryEstimateFit(), further arguments passed toprint.data.frame().- object
An object of class SeverityEstimateFit.
- digits
The number of significant digits to print.
Value
A function-dependent value:
summary.SeverityEstimateFit()returns aSummaryEstimateFitwith elementsdetection_ratesandseverity_estimates.print.SeverityEstimateFit()andprint.SummaryEstimateFit()invisibly return their input object.
Slots
model_fitA stanfit object returned from fitting a severity estimate model.
populationThe population data used in model fitting in array form with dimensions corresponding to 'time_period' and 'strata'.
incidenceThe line list data used in model fitting in array form counting incidence with dimensions corresponding to 'time_period', 'strata', 'surveillance', and 'outcome'.
time_periodA data.frame with the variables describing the 'time_period' dimensions of
populationandincidence.strataA data.frame with the variables describing the 'strata' dimensions of
populationandincidence.surveillanceA data.frame with the variables describing the 'surveillance' dimension of
incidence.outcomeA data.frame with the variables describing the 'outcome' dimension of
incidence.
Functions and methods
summary(object)summarises a fitted severity estimate model by reporting mean detection rate estimates and mean IFR/SIR estimates by strata.print.SeverityEstimateFit(x)prints a SeverityEstimateFit object in a structured format. Currently this prints themodel_fitslot using theprintmethod for astanfitobject.print.SummaryEstimateFit(x, digits)prints aSummaryEstimateFitobject in a structured format.
Examples
# \donttest{
set.seed(1)
line_list <- data.frame(
time = c(1L, 1L, 2L),
age = c("Youth", "Adult", "Senior"),
detection = c("Active", "Passive", "Active"),
outcome = c("Asymptomatic", "Death", "Symptomatic")
)
population <- data.frame(
age = c("Youth", "Adult", "Senior"),
amount = rep(987L, 3L)
)
model <- default_model(line_list, population)
fitted_model <- suppressWarnings(fit(
model,
chains = 1L,
cores = 1L,
iter = 10L,
warmup = 5L,
seed = 1,
refresh = 0
))
summary(fitted_model)
#> Detection Rates:
#> Estimate
#> passive_asymptomatic 0.2670
#> passive_symptomatic 0.8934
#> active 0.5253
#>
#> Severity Estimates:
#> age IFR Estimate SIR Estimate
#> Adult 0.7987 0.8570
#> Senior 0.2675 0.9178
#> Youth 0.2517 0.2178
# }