Skip to content

workflow/options vignettes #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Oct 3, 2023
Prev Previous commit
Next Next commit
set up for workflow
  • Loading branch information
sbfnk committed Sep 27, 2023
commit afb202c6bc2b5766733b1d41067346344f38ab1d
2 changes: 1 addition & 1 deletion vignettes/estimate_infections_options.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ library("EpiNow2")
library("rstan")
```

We then set the number of cores to use. We will want to run 4 MCMC chains in parallel so we set this to 4. If we had fewer than 4 available or wanted to run fewer than 4 chains (at the expense of some robustness), or had fewer than 4 computing cores available we could set it to that. To find out the number of cores available one can use the [detectCores](https://rdrr.io/r/parallel/detectCores.html) function from the `parallel` package.
In this examples we set the number of cores to use to 4 but the optimal value here will depend on the computing resources available.

```{r}
options(mc.cores = 4)
Expand Down
14 changes: 14 additions & 0 deletions vignettes/estimate_infections_workflow.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ A thorough understanding of the data that is used for EpiNow2 and its limitation
This includes but is not limited to biases in the population groups that are represented (EpiNow2 assumes a closed population with all infections being caused by other infections in the same population), reporting artefacts and delays, and completeness of reporting.
Some of these can be mitigated using the routines available in EpiNow2 as described below, but others will cause biases in the results and need to be carefully considered when interpreting the results.

# Set up

We first load the _EpiNow2_ package.

```{r packages}
library("EpiNow2")
```

We then set the number of cores to use. We will want to run 4 MCMC chains in parallel so we set this to 4. If we had fewer than 4 available or wanted to run fewer than 4 chains (at the expense of some robustness), or had fewer than 4 computing cores available we could set it to that. To find out the number of cores available one can use the [detectCores](https://rdrr.io/r/parallel/detectCores.html) function from the `parallel` package.

```{r}
options(mc.cores = 4)
```

# Parameters

Once a data set has been identified, a number of relevant parameters need to be considered before using EpiNow2.
Expand Down