Returns the posterior nowcast as one row per event date per stratum, in the
column layout shared by every engine tbl.now normalises. Called on a
fitted nowcast() it first draws the posterior predictive via predict();
called on the result of predict() it summarises the draws it already holds.
Arguments
- x
A
nowcast(fromnowcast()) or anowcast_prediction(frompredict()on one).- probs
Optional numeric probabilities in
[0, 1]. Each adds one column namedq<probs * 100>(so0.05givesq5,0.025givesq2.5). Because the object keeps the draws, these quantiles are exact.- conf.level
Width of the credible interval (default 0.95).
- ...
Passed to
predict()whenxis a fitted nowcast (e.g.n_draws,seed); unused otherwise.
Value
A tibble::tibble() sorted by stratum then event_date, with
columns event_date (Date), stratum (character, "all" when the fit is
unstratified), estimate (posterior median), conf.low, conf.high,
level (the width the interval actually has) and engine, plus one
column per entry of probs.
See also
model_parameters() for the per-parameter table that tidy()
used to return.
Examples
if (requireNamespace("tbl.now", quietly = TRUE)) {
# nc <- nowcast(data, model(nb_likelihood(), hsgp_epidemic(), lognormal_delay()))
# tidy(nc) # one row per event date x stratum
# tidy(predict(nc), probs = c(0.05, 0.95)) # plus exact q5 / q95 columns
# model_parameters(nc) # one row per estimated parameter
}
#> NULL
