enw_add_latest_obs_to_nowcast: Add latest observations to nowcast output

enw_add_latest_obs_to_nowcastR Documentation

Add latest observations to nowcast output


Add the latest observations to the nowcast output. This is useful for plotting the nowcast against the latest observations.


enw_add_latest_obs_to_nowcast(nowcast, obs)



A data.frame of nowcast output from enw_nowcast_summary().


An observation data.frame containing reference_date columns of the same length as the number of rows in the posterior and the most up to date observation for each date. This is used to align the posterior with the observations. The easiest source of this data is the output of latest output of enw_preprocess_data() or enw_latest_data().


A data.frame of nowcast output with the latest observations added.

See Also

Functions used for postprocessing of model fits enw_nowcast_samples(), enw_nowcast_summary(), enw_posterior(), enw_pp_summary(), enw_quantiles_to_long(), enw_summarise_samples()


fit <- enw_example("nowcast")
obs <- enw_example("obs")
nowcast <- summary(fit, type = "nowcast")
enw_add_latest_obs_to_nowcast(nowcast, obs)

seabbs/epinowcast documentation built on July 17, 2024, 5:18 p.m.