ABMToCova {PopulateR}R Documentation

Creates the four data frames of weighted contact pairs for use in Covasim

Description

Creates the household, school, workplace, and contacts layers, from ABMPop, for use with the Python package Covasim. A 1xn data frame of ages is also created.

Usage

ABMToCova(
  ABMPop,
  ABMID,
  ABMAge,
  place1,
  place2,
  ECE = TRUE,
  PSchool = TRUE,
  SSchool = TRUE,
  contacts = NULL,
  excludeDF = NULL
)

Arguments

ABMPop

The agent-based modelling data frame.

ABMID

The variable containing the unique identifier for each person, in the ABMPop data frame.

ABMAge

The variable containing the ages, in the in the ABMPop data frame.

place1

The variable containing the Household ID.

place2

The variable containing the school and workplace IDs.

ECE

Are ECE centres open? Default is TRUE, change to FALSE if ECEs are to close.

PSchool

Are primary schools open? Default is TRUE, change to FALSE if primary schools are to close.

SSchool

Are secondary schools open? Default is TRUE, change to FALSE if secondary schools are to close.

contacts

A data frame consisting of existing contact pairs. The first two variables define the two people in the pair.

excludeDF

A data frame of industries to exclude. This must be the relevant IndNum variable in the ABMPop data frame. If this data frame is not included, all industries will be represented in the output data frame.

Details

There are three restrictions for use. First, the place2 codes for preschool, primary school, and secondary school must be set to "P801000", "P802100", and "P802200", respectively. Second, at least one school type must be "TRUE" as Covasim requires a school layer. Third, the place2 value for people who are not in school, and not in a workplace, must be "Not employed".

Value

A data frame of the household, school, workplace, contact layers, and people's ages, for use in Covasim.


[Package PopulateR version 1.13 Index]