general_generation_infection: Infect the current generation given the previous generation

Description Usage Arguments Value

View source: R/simulate_general_outbreaks.R

Description

Infect the current generation given the previous generation

Usage

1
2
3
4
5
6
7
8
9
general_generation_infection(
  cluster_id,
  df,
  covariate_weights = NULL,
  gen,
  prev_gen,
  cluster_size,
  max_size
)

Arguments

cluster_id

unique cluster ID

df

covariate data frame. One is prob_inf

covariate_weights

either NULL or weight of covariates

gen

new generation number

prev_gen

data frame with at least smear status (0/1) and person_id

cluster_size

size of previous cluster

max_size

maximum size of cluster

Value

list with the following entries

new_cluster_size

new cluster size with the current generation

cur_gen

data frame of current generation (new infections)

n_inf

number of infections for each person in the previous generation


skgallagher/InfectionTrees documentation built on July 28, 2021, 2:14 p.m.