Convert summarised quantiles from wide to long format
Source:R/postprocess.R
enw_quantiles_to_long.Rd
Convert summarised quantiles from wide to long format
Arguments
- posterior
A
data.frame
as output byenw_posterior()
.
See also
Functions used for postprocessing of model fits
enw_add_latest_obs_to_nowcast()
,
enw_nowcast_samples()
,
enw_nowcast_summary()
,
enw_posterior()
,
enw_pp_summary()
,
enw_summarise_samples()
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.177537 4.17533 0.1807851 0.1778527 1.000321
#> 2: expr_lelatent_int[1,1] 4.177537 4.17533 0.1807851 0.1778527 1.000321
#> 3: expr_lelatent_int[1,1] 4.177537 4.17533 0.1807851 0.1778527 1.000321
#> 4: expr_lelatent_int[1,1] 4.177537 4.17533 0.1807851 0.1778527 1.000321
#> ess_bulk ess_tail quantile prediction
#> <num> <num> <num> <num>
#> 1: 990.9203 725.2305 0.05 3.879833
#> 2: 990.9203 725.2305 0.20 4.029484
#> 3: 990.9203 725.2305 0.80 4.329792
#> 4: 990.9203 725.2305 0.95 4.480233