Skip to content

Commit 6459689

Browse files
committed
add symmetry of contacts
1 parent 4499398 commit 6459689

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

episodes/simulating-transmission.Rmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@ contact_matrix <- t(contact_data$matrix)
214214
contact_matrix
215215
```
216216

217+
Remember that the matrix satisfies the `symmetric = TRUE` condition at the level of total number of contacts.
218+
219+
The total number of contacts between groups $i$ and $j$ is calculated as the mean number of contacts (`contact_data$matrix`) multiplied by the number of individuals in group $i$ (`contact_data$demography$population`)
220+
221+
```{r}
222+
contact_data$matrix * contact_data$demography$population
223+
```
217224

218225
:::::::::::::::::::::::::::::::::
219226
::::::::::::::::::::::::::::::::::::::::::::::::

0 commit comments

Comments
 (0)