Check whether an object is a comparison
Examples
# prepare two scenarios of the final size of an epidemic
pandemic_flu <- scenario(
name = "pandemic_flu",
model_function = "finalsize::final_size",
parameters = make_parameters_finalsize_UK(r0 = 1.5),
replicates = 1L
)
covid19 <- scenario(
name = "covid19",
model_function = "finalsize::final_size",
parameters = make_parameters_finalsize_UK(r0 = 5.0),
replicates = 1L
)
# create a comparison object
x <- comparison(
pandemic_flu, covid19,
baseline = "pandemic_flu"
)
is_comparison(x)
#> [1] TRUE