-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from mrc-ide/update
Update to new versions, minor updates
- Loading branch information
Showing
16 changed files
with
326 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.Rproj.user | ||
_book/ | ||
_dust/ | ||
odin_files | ||
*_files/ | ||
*_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,6 @@ nondifferentiable | |
nonlinear | ||
odin | ||
odin's | ||
pMCMC | ||
standalone | ||
stochasticity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>" | ||
) | ||
|
||
lang_output <- function(x, lang) { | ||
cat(c(sprintf("```%s", lang), x, "```"), sep = "\n") | ||
} | ||
|
||
cpp_output <- function(x) { | ||
lang_output(x, "cpp") | ||
} | ||
|
||
r_output <- function(x) { | ||
lang_output(x, "r") | ||
} | ||
|
||
plain_output <- function(x) { | ||
lang_output(x, "plain") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,32 @@ | ||
# Preface {.unnumbered} | ||
|
||
This is a Quarto book. | ||
```{r} | ||
#| include: false | ||
source("common.R") | ||
``` | ||
|
||
To learn more about Quarto books visit <https://quarto.org/docs/books>. | ||
This is a book about writing models in the [`odin`](https://mrc-ide.github.io/odin2) "domain specific language" (DSL) and fitting these models to data using [`monty`](https://mrc-ide.github.io/monty). These tools can be used entirely separately; you can create a dynamical model (or "system") in `odin` and never fit it to data, or you can use `monty` to fit models that are written in plain R code. We'll structure the book to cover the tools fairly separately at first, then describe their intersection. Along the way, you'll also use [`dust`](https://mrc-ide.github.io/dust2), which powers `odin`, so we'll spend some time describing how to use that, and also how to write models directly in `dust` if you need more control than `odin` provides. | ||
|
||
## History | ||
|
||
Originally, we designed odin around describing and solving systems of differential equations, with a small amount of support for working with discrete-time stochastic systems. Over time, and particularly during the COVID-19 response, we expanded the stochastic support and introduced the ability to fit these models using particle filters and other sequential Monte Carlo algorithms. You may have used `odin.dust` and `mcstate` through this period. As of 2024 we have rationalised our tools into a new set of packages which are currently called `odin2`, `dust2` and `monty2` | ||
|
||
## Installation | ||
|
||
You can install these packages in one go from our R-universe: | ||
|
||
```r | ||
install.packages( | ||
c("monty", "dust2", "odin2"), | ||
repos = c("https://mrc-ide.r-universe.dev", "https://cloud.r-project.org")) | ||
``` | ||
|
||
You will also need a functioning C++ toolchain; you can test this by running | ||
|
||
```{r} | ||
pkgbuild::has_build_tools(debug = TRUE) | ||
``` | ||
|
||
## About this book | ||
|
||
This book exists to supplement the package documentation, and we will try to link extensively to it. It is designed as a fairly friendly walk-through of the tools, and to mirror courses that we run. |
Oops, something went wrong.