Skip to contents

Convert summarised quantiles from wide to long format

Usage

enw_quantiles_to_long(posterior)

Arguments

posterior

A data.frame as output by enw_posterior().

Value

A data.frame of quantiles in long format.

See also

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 ess_bulk
#>                    <char>    <num>  <num>     <num>     <num>    <num>    <num>
#> 1: expr_lelatent_int[1,1] 4.180238 4.1777 0.1591798 0.1639533 1.004026  708.734
#> 2: expr_lelatent_int[1,1] 4.180238 4.1777 0.1591798 0.1639533 1.004026  708.734
#> 3: expr_lelatent_int[1,1] 4.180238 4.1777 0.1591798 0.1639533 1.004026  708.734
#> 4: expr_lelatent_int[1,1] 4.180238 4.1777 0.1591798 0.1639533 1.004026  708.734
#>    ess_tail quantile prediction
#>       <num>    <num>      <num>
#> 1: 623.3626     0.05   3.912005
#> 2: 623.3626     0.20   4.048282
#> 3: 623.3626     0.80   4.316246
#> 4: 623.3626     0.95   4.440825