Skip to content

Commit 2a7907d

Browse files
committed
differences for PR #139
1 parent 5bbdcbc commit 2a7907d

9 files changed

Lines changed: 34 additions & 5220 deletions

.DS_Store

-6 KB
Binary file not shown.

compare-interventions.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,6 @@ contact_data <- socialmixr::contact_matrix(
248248
age.limits = c(0, 20, 40),
249249
symmetric = TRUE
250250
)
251-
```
252-
253-
``` output
254-
Removing participants that have contacts without age information. To change this behaviour, set the 'missing.contact.age' option
255-
```
256-
257-
``` r
258251
# prepare contact matrix
259252
contact_matrix <- t(contact_data$matrix)
260253

config.yaml

Lines changed: 0 additions & 86 deletions
This file was deleted.

contact-matrices.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,16 @@ The R package `{socialmixr}` contains functions which can estimate contact matri
8686
polymod <- socialmixr::polymod
8787
```
8888

89-
Then we can obtain the contact matrix for the age categories we want by specifying `age.limits`.
89+
Then we can obtain the contact matrix for the age categories we want by specifying `age_limits`.
9090

9191

9292
``` r
9393
contact_data <- socialmixr::contact_matrix(
9494
survey = polymod,
9595
countries = "United Kingdom",
96-
age.limits = c(0, 20, 40),
96+
age_limits = c(0, 20, 40),
9797
symmetric = TRUE
9898
)
99-
```
100-
101-
``` output
102-
Removing participants that have contacts without age information. To change this behaviour, set the 'missing.contact.age' option
103-
```
104-
105-
``` r
10699
contact_data
107100
```
108101

@@ -221,17 +214,16 @@ Similar to the code above, to access vector values within a dataframe, you can u
221214
contact_data_zambia <- socialmixr::contact_matrix(
222215
survey = zambia_sa_survey,
223216
countries = "Zambia", # key argument
224-
age.limits = c(0, 20),
217+
age_limits = c(0, 20),
225218
symmetric = TRUE
226219
)
227220
```
228221

229-
``` output
230-
Removing participants without age information. To change this behaviour, set the 'missing.participant.age' option
231-
```
232-
233-
``` output
234-
Removing participants that have contacts without age information. To change this behaviour, set the 'missing.contact.age' option
222+
``` warning
223+
Warning: Survey contains multiple observations per participant (4531 rows, 3576 unique
224+
participants).
225+
• Results will aggregate across all observations.
226+
ℹ Use `filter` to select by "Building_id".
235227
```
236228

237229
``` r
@@ -243,8 +235,8 @@ contact_data_zambia
243235
$matrix
244236
contact.age.group
245237
age.group [0,20) 20+
246-
[0,20) 3.650000 1.451168
247-
20+ 1.988136 2.461856
238+
[0,20) 3.766393 1.427100
239+
20+ 1.955162 2.642584
248240
249241
$demography
250242
age.group population proportion year
@@ -255,8 +247,8 @@ $demography
255247
$participants
256248
age.group participants proportion
257249
<char> <int> <num>
258-
1: [0,20) 180 0.08490566
259-
2: 20+ 1940 0.91509434
250+
1: [0,20) 244 0.08531469
251+
2: 20+ 2616 0.91468531
260252
```
261253

262254
``` r
@@ -373,7 +365,7 @@ Normalisation can be performed by the function `contact_matrix()` in `{socialmix
373365
contact_data_split <- socialmixr::contact_matrix(
374366
survey = polymod,
375367
countries = "United Kingdom",
376-
age.limits = c(0, 20, 40),
368+
age_limits = c(0, 20, 40),
377369
symmetric = TRUE,
378370
split = TRUE
379371
)

disease-burden.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ polymod <- socialmixr::polymod
9090
contact_data <- socialmixr::contact_matrix(
9191
polymod,
9292
countries = "United Kingdom",
93-
age.limits = c(0, 20, 40),
93+
age_limits = c(0, 20, 40),
9494
symmetric = TRUE
9595
)
9696

md5sum.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
"file" "checksum" "built" "date"
2-
"CODE_OF_CONDUCT.md" "549f00b0992a7743c2bc16ea6ce3db57" "site/built/CODE_OF_CONDUCT.md" "2026-01-09"
3-
"LICENSE.md" "14377518ee654005a18cf28549eb30e3" "site/built/LICENSE.md" "2026-01-09"
4-
"config.yaml" "a0c04c1d43ce0640c3ea333b140e89c8" "site/built/config.yaml" "2026-01-09"
5-
"index.md" "32bc80d6f4816435cc0e01540cb2a513" "site/built/index.md" "2026-01-09"
6-
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2026-01-09"
7-
"episodes/contact-matrices.Rmd" "9e9d596cf25f68a50522b15a234472ac" "site/built/contact-matrices.md" "2026-01-09"
8-
"episodes/simulating-transmission.Rmd" "539a63b7a617e7a40ad1c5dd9650d96f" "site/built/simulating-transmission.md" "2026-01-09"
9-
"episodes/model-choices.Rmd" "aa195e66455fb6a97b4930fd08c08001" "site/built/model-choices.md" "2026-01-09"
10-
"episodes/modelling-interventions.Rmd" "8b9d77d31ac2672f4278b780e3d943db" "site/built/modelling-interventions.md" "2026-01-09"
11-
"episodes/compare-interventions.Rmd" "2ef6697bbad9bcfb843ab9d50469123b" "site/built/compare-interventions.md" "2026-01-09"
12-
"episodes/vaccine-comparisons.Rmd" "bb9110b17b2b5cdc915df3f17eae15df" "site/built/vaccine-comparisons.md" "2026-01-09"
13-
"episodes/disease-burden.Rmd" "9deead362349c98be8f1d9380a7b975a" "site/built/disease-burden.md" "2026-01-09"
14-
"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2026-01-09"
15-
"learners/BF_measles.Rmd" "5725a25d664730bbce3736a3243c2182" "site/built/BF_measles.md" "2026-01-09"
16-
"learners/reference.md" "9e836f1ec999f95f55135cdd2c78d2e6" "site/built/reference.md" "2026-01-09"
17-
"learners/setup.md" "be1de7ec41f52f14d00bcb74e87b5046" "site/built/setup.md" "2026-01-09"
18-
"profiles/learner-profiles.md" "31b503c4b5bd1f0960ada730eca4a25e" "site/built/learner-profiles.md" "2026-01-09"
19-
"renv/profiles/lesson-requirements/renv.lock" "3a4dd221fcee1f60beb9e679efeae403" "site/built/renv.lock" "2026-01-09"
2+
"CODE_OF_CONDUCT.md" "549f00b0992a7743c2bc16ea6ce3db57" "site/built/CODE_OF_CONDUCT.md" "2026-02-05"
3+
"LICENSE.md" "14377518ee654005a18cf28549eb30e3" "site/built/LICENSE.md" "2026-02-05"
4+
"config.yaml" "a0c04c1d43ce0640c3ea333b140e89c8" "site/built/config.yaml" "2026-02-05"
5+
"index.md" "32bc80d6f4816435cc0e01540cb2a513" "site/built/index.md" "2026-02-05"
6+
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2026-02-05"
7+
"episodes/contact-matrices.Rmd" "747723602382243f24cf566ea2d344d0" "site/built/contact-matrices.md" "2026-02-05"
8+
"episodes/simulating-transmission.Rmd" "9d5d9a20894160f25d93bddb761bd2ee" "site/built/simulating-transmission.md" "2026-02-05"
9+
"episodes/model-choices.Rmd" "aa195e66455fb6a97b4930fd08c08001" "site/built/model-choices.md" "2026-02-05"
10+
"episodes/modelling-interventions.Rmd" "2cce81c1ceb8ad0caef9b9e0e584e753" "site/built/modelling-interventions.md" "2026-02-05"
11+
"episodes/compare-interventions.Rmd" "2ef6697bbad9bcfb843ab9d50469123b" "site/built/compare-interventions.md" "2026-02-05"
12+
"episodes/vaccine-comparisons.Rmd" "b59e2eed4984431a20d1f9b3d8f3fe58" "site/built/vaccine-comparisons.md" "2026-02-05"
13+
"episodes/disease-burden.Rmd" "501ccbed5022e40c25ee467cd97fead1" "site/built/disease-burden.md" "2026-02-05"
14+
"instructors/instructor-notes.md" "ca3834a1b0f9e70c4702aa7a367a6bb5" "site/built/instructor-notes.md" "2026-02-05"
15+
"learners/BF_measles.Rmd" "5725a25d664730bbce3736a3243c2182" "site/built/BF_measles.md" "2026-02-05"
16+
"learners/reference.md" "9e836f1ec999f95f55135cdd2c78d2e6" "site/built/reference.md" "2026-02-05"
17+
"learners/setup.md" "be1de7ec41f52f14d00bcb74e87b5046" "site/built/setup.md" "2026-02-05"
18+
"profiles/learner-profiles.md" "31b503c4b5bd1f0960ada730eca4a25e" "site/built/learner-profiles.md" "2026-02-05"
19+
"renv/profiles/lesson-requirements/renv.lock" "334a199c1446a63d2798255d1144007c" "site/built/renv.lock" "2026-02-05"

modelling-interventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ survey_data <- socialmixr::polymod
9191
cm_results <- socialmixr::contact_matrix(
9292
survey = survey_data,
9393
countries = "United Kingdom",
94-
age.limits = c(0, 15, 65),
94+
age_limits = c(0, 15, 65),
9595
symmetric = TRUE
9696
)
9797

0 commit comments

Comments
 (0)