Skip to content

Commit

Permalink
Small note on binomial
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Nov 14, 2024
1 parent adf14fa commit 0584d0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stochasticity.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ sir <- odin({

This is a discrete-time model (using `update()` and not `deriv()`) as stochastic models must run in discrete time. We use `dt` to scale the rates, and adjusting `dt` will change the way that stochasticity affects the dynamics of the system.

The call to `Binomial()` samples from a binomial distribution, returning the number of successes from `S` (or `I`) draws, each with probability `p_SI` (or `p_IR`).

```{r}
sir
```
Expand Down

0 comments on commit 0584d0d

Please sign in to comment.