Skip to content

Commit

Permalink
Use shape and rate to specify uncertain Gamma parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam authored Dec 13, 2024
1 parent fc42a2d commit 0e3b850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vignettes/estimate_infections_workflow.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ plot(fixed_gamma)
```

If distributions are variable, the values with uncertainty are treated as [prior probability densities](https://en.wikipedia.org/wiki/Prior_probability) in the Bayesian inference framework used by _EpiNow2_, i.e. they are estimated as part of the inference.
For example, to define a variable gamma distribution where uncertainty in the mean is given by a normal distribution with mean 3 and sd 2, and uncertainty in the standard deviation is given by a normal distribution with mean 1 and sd 0.1, with a maximum value 10, you would write
For example, to define a variable gamma distribution where uncertainty in the shape is given by a normal distribution with mean 3 and sd 2, and uncertainty in the rate is given by a normal distribution with mean 1 and sd 0.1, with a maximum value 10, you would write

```{r}
uncertain_gamma <- Gamma(mean = 3, sd = 0.1, max = 10)
uncertain_gamma <- Gamma(shape = Normal(3, 2), rate = Normal(1, 0.1), max = 10)
uncertain_gamma
```

Expand Down

0 comments on commit 0e3b850

Please sign in to comment.