Combine Rt across multiple runs.

combine_rt(rt, samples, rank = TRUE, weight = "infections_inc")

Arguments

rt

A list of Rt calculations from lancelot_Rt_trajectories() (though any Rt calculation that confirms to this will work)

samples

A list of samples from mcstate::pmcmc

rank

A boolean deciding whether to rank trajectories by increasing incidence or not before combining Rt estimates

weight

A string specifying what trajectory to use for weighting, defaults to "infections_inc" (used for Rt calculation)

Value

A list of Rt output in the same structure as the first element of rt. All Rt estimates will be aggregated across regions (or whatever else you are aggregating on) based on the parameters in samples.