epiforecasts / EpiNow2

Estimate Realtime Case Counts and Time-varying Epidemiological Parameters
https://epiforecasts.io/EpiNow2/dev/
Other
116 stars 33 forks source link

Plot distributions in workflow vignette #781

Closed jamesmbaazam closed 2 months ago

jamesmbaazam commented 2 months ago

Description

This PR closes #778 by plotting some of the distributions that are specified in the workflow vignette. This will help expose the distribution plotting functionality more.

Initial submission checklist

After the initial Pull Request

jamesmbaazam commented 2 months ago

When the distribution parameters are uncertain, the plot is quite busy. Should we facet by distribution type in that case instead of using different line types?

library(EpiNow2)
#> 
#> Attaching package: 'EpiNow2'
#> The following object is masked from 'package:stats':
#> 
#>     Gamma
suppressWarnings(
  plot(
    Gamma(mean = Normal(3, 2), sd = Normal(1, 0.1), max = 10)
  )
)

Created on 2024-09-19 with reprex v2.1.1

seabbs commented 2 months ago

ah interesting. I'm not sure we should facet by default but perhaps do it here as a demonstration?

jamesmbaazam commented 2 months ago

We should re-compile this after merging #788 .

jamesmbaazam commented 2 months ago

Thanks.