You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: episodes/simulating-transmission.Rmd
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -231,7 +231,7 @@ The result is a square matrix with rows and columns for each age group. Contact
231
231
232
232
### Normalisation
233
233
234
-
In `{epidemics}` the contact matrix normalisation happens within the function call, so we don't need to normalise the contact matrix before we pass it to `population()` (see section 3. Population Structure). For details on normalisation, see the tutorial on [Contact matrices](../episodes/contact-matrices.md).
234
+
In `{epidemics}` the contact matrix normalisation happens within the function call, so we don't need to normalise the contact matrix before we pass it to `epidemics::population()` (see section 3. Population Structure). For details on normalisation, see the tutorial on [Contact matrices](../episodes/contact-matrices.md).
235
235
236
236
::::::::::::::::::::::::::::::::::::::::::::::::
237
237
@@ -276,7 +276,7 @@ initial_conditions_free <- c(
276
276
We combine the three initial conditions vectors into one matrix,
277
277
278
278
```{r initial_conditions}
279
-
# combine the initial conditions
279
+
# combine the initial conditions into a matrix class object
280
280
initial_conditions <- rbind(
281
281
initial_conditions_inf, # age group 1
282
282
initial_conditions_free, # age group 2
@@ -295,17 +295,20 @@ initial_conditions
295
295
The population object requires a vector containing the demographic structure of the population. The demographic vector must be a named vector containing the number of individuals in each age group of our given population. In this example, we can extract the demographic information from the `contact_data` object that we obtained using the `socialmixr` package.
To create our population object, from the `{epidemics}` package we call the function `population()` specifying a name, the contact matrix, the demography vector and the initial conditions.
306
+
To create our population object, from the `{epidemics}` package we call the function `epidemics::population()` specifying a name, the contact matrix, the demography vector and the initial conditions.
304
307
305
308
```{r population}
306
309
library(epidemics)
307
310
308
-
uk_population <- population(
311
+
uk_population <- epidemics::population(
309
312
name = "UK",
310
313
contact_matrix = contact_matrix,
311
314
demography_vector = demography_vector,
@@ -385,11 +388,11 @@ For models that are described by [differential equations](../learners/reference.
385
388
An _ODE solver_ is the software used to find numerical solutions to differential equations. If interested on how a system of differential equations is solved in `{epidemics}`, we suggest you to read the section on [ODE systems and models](https://epiverse-trace.github.io/epidemics/articles/design-principles.html#ode-systems-and-models) at the "Design principles" vignette.
386
389
::::::::::::::::::::::::::::::::::::::::::::::::
387
390
388
-
Now we are ready to run our model using `model_default()` from the `{epidemics}` package.
391
+
Now we are ready to run our model using `epidemics::model_default()` from the `{epidemics}` package.
389
392
390
393
Let's specify `time_end=600` to run the model for 600 days.
0 commit comments