
Convert summarised quantiles from wide to long format
Source:R/postprocess.R
enw_quantiles_to_long.RdConvert summarised quantiles from wide to long format
Arguments
- posterior
A
data.frameas output byenw_posterior().
See also
Functions used for postprocessing of model fits
.check_primarycensored(),
.delay_draw_columns(),
.discretise_parametric_pmf(),
build_ord_obs(),
enw_add_latest_obs_to_nowcast(),
enw_nowcast_samples(),
enw_nowcast_summary(),
enw_posterior(),
enw_posterior_delay(),
enw_pp_summary(),
enw_summarise_samples(),
subset_obs()
Examples
fit <- enw_example("nowcast")
posterior <- enw_posterior(fit$fit[[1]], var = "expr_lelatent_int[1,1]")
enw_quantiles_to_long(posterior)
#> variable mean median sd mad rhat
#> <char> <num> <num> <num> <num> <num>
#> 1: expr_lelatent_int[1,1] 4.295336 4.298255 0.1407952 0.1400908 1.004743
#> 2: expr_lelatent_int[1,1] 4.295336 4.298255 0.1407952 0.1400908 1.004743
#> 3: expr_lelatent_int[1,1] 4.295336 4.298255 0.1407952 0.1400908 1.004743
#> 4: expr_lelatent_int[1,1] 4.295336 4.298255 0.1407952 0.1400908 1.004743
#> ess_bulk ess_tail quantile prediction
#> <num> <num> <num> <num>
#> 1: 884.3912 704.5825 0.05 4.071047
#> 2: 884.3912 704.5825 0.20 4.178024
#> 3: 884.3912 704.5825 0.80 4.413185
#> 4: 884.3912 704.5825 0.95 4.522491