Notes de l'instructeur

Instructor notes

Matrices de contact


Remarque de l'instructeur



Remarque de l'instructeur

R

# Generate the contact matrix for Zambia only
contact_data_zambia <- socialmixr::contact_matrix(
  survey = zambia_sa_survey,
  countries = "Zambia", # key argument
  age.limits = c(0, 20),
  symmetric = TRUE
)

SORTIE

Removing participants without age information. To change this behaviour, set the 'missing.participant.age' option

SORTIE

Removing participants that have contacts without age information. To change this behaviour, set the 'missing.contact.age' option

R

# Print the contact matrix for Zambia only
contact_data_zambia

SORTIE

$matrix
         contact.age.group
age.group   [0,20)      20+
   [0,20) 3.650000 1.451168
   20+    1.988136 2.461856

$demography
   age.group population proportion  year
      <char>      <num>      <num> <int>
1:    [0,20)    8006201  0.5780636  2010
2:       20+    5843835  0.4219364  2010

$participants
   age.group participants proportion
      <char>        <int>      <num>
1:    [0,20)          180 0.08490566
2:       20+         1940 0.91509434

R

# Print the vector of population size for {epidemics}
contact_data_zambia$demography$population

SORTIE

[1] 8006201 5843835