adapt_site_fx: Adaptively generate new test site

Description Usage Arguments Value

View source: R/Testing_Functions.R

Description

Function to look in testing data and find census tract in which to place new testing site

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
adapt_site_fx(
  test_reports,
  adapt_freq,
  n_sites,
  site_geo,
  geo_pops,
  t0,
  date_now,
  test_criteria
)

Arguments

test_reports

previous testing data to base adaptive decision on

adapt_freq

timeframe to look back at test reports to make decision

n_sites

number of adaptive sites to add

site_geo

geography to place tests by. either 'cbg', 'ct', 'zip', or 'nbhd'

geo_pops

data.table of site geo ids/names and their population, necessary if using 'wper_pos' as testing criteria

t0

start time of simulation as a date

date_now

current date of simulation

test_criteria

either 'per_pos' to place sites based on areas with highest percent positivity, 'n_pos' to place sites based on areas with highest raw number of positive cases, 'wper_pos' for percent positive times the site geo population (weighted percent positive), or 'n_tests' to place sites based on areas with least number of tests conducted

Value

Census tract code of new test site(s)


cmhoove14/LEMMAABMv4 documentation built on Nov. 1, 2021, 10:23 p.m.