Skip to content

Usage

ref_forecast(dynamic, history, times, outcome = NULL)

Returns a dist_conditioned predictive distribution at each requested time. The dynamic process only changes the predictive distribution; scores and graphics then follow from the existing contract.

Argument Description
dynamic A ref_dynamics object.
history Subject history data frame. Must contain the time column
used in ref_dynamics() and the outcome.
times Future times.
outcome Outcome name.

The forecast refuses to run when the process for outcome is not identified (see ref_dynamics()): a history-conditioned distribution from an unestimated kernel would be silently wrong. History rows with a non-finite time or outcome are dropped and the number actually used is returned as history_n. The exact marginal uncertainty estimand stored by ref_dynamics() is reused. Kernel parameters remain plug-in estimates; their uncertainty is explicitly recorded but not propagated.

A ref_forecast with $dist (a distribution vector, one element per time), $summary (median and 90% interval), $history_n, and $lag_support ("in" or "extrapolated_lag" per forecast time, judged from the last history visit against the reference lag range).