
Convert an epinowcast object to a forecast_sample object
Source:R/model-validation.R
as_forecast_sample.epinowcast.RdThis function is used to convert an epinowcast as returned by
epinowcast() object to a forecast_sample object which can be used for
scoring using the scoringutils package.
Usage
# S3 method for class 'epinowcast'
as_forecast_sample(data, latest_obs, ...)Arguments
- data
An
epinowcastnowcast object as returned byepinowcast().- latest_obs
Latest observations to use for the true values must contain
confirmandobservedvariables.- ...
Additional arguments passed to
scoringutils::as_forecast_sample()
Value
A forecast_sample object as returned by
scoringutils::as_forecast_sample()
Examples
if (FALSE) { # interactive()
library(scoringutils)
nowcast <- enw_example("nowcast")
latest_obs <- enw_example("observations")
as_forecast_sample(nowcast, latest_obs)
}