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
#> 1: expr_lelatent_int[1,1] 4.143451 4.138045 0.1539449 0.1552134 0.9997963
#> 2: expr_lelatent_int[1,1] 4.143451 4.138045 0.1539449 0.1552134 0.9997963
#> 3: expr_lelatent_int[1,1] 4.143451 4.138045 0.1539449 0.1552134 0.9997963
#> 4: expr_lelatent_int[1,1] 4.143451 4.138045 0.1539449 0.1552134 0.9997963
#>    ess_bulk ess_tail quantile prediction
#> 1: 1194.923 825.8359     0.05   3.890666
#> 2: 1194.923 825.8359     0.20   4.018240
#> 3: 1194.923 825.8359     0.80   4.275806
#> 4: 1194.923 825.8359     0.95   4.402856