create_cm: Create a contacts matrix using socialmixr

Description Usage Arguments Value

View source: R/create_cm.R

Description

Wrapper function for socialmix which helps quickly create filtered contacts matrices and reshape and returns multiple objects with the prefix table which relate to different questions asked in the survey

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
create_cm(
  survey,
  countries = "United Kingdom",
  age_limits,
  symmetric = FALSE,
  filter_text = list(),
  boots = 1,
  return_matrix = TRUE,
  ...
)

Arguments

survey

a survey object from socialmixr

age_limits

lower limits of the age groups over which to construct the matrix

symmetric

whether to make matrix symmetric

boots

number of bootstrap sample

export_var_names

Whether to export the variable names into a seperate file

matrix_output

return just the matrix or the matrix and participants default = TRUE

country

limit to one or more countries; if not given, will use all countries in the survey; these can be given as country names or 2-letter (ISO Alpha-2) country codes

filter

list object for filtering the contacts matrix to work

Value

Either contact matrix or contact matrix and with participants information


jarvisc1/CoMix documentation built on April 24, 2020, 2:06 a.m.