compile_epi {ATQ} | R Documentation |
Compile Epidemic Data
Description
Compiles and processes epidemic data, simulating school absenteeism using epidemic and individual data.
Usage
compile_epi(epidemic, individual_data, lags = 16, inf_period = 4, T = 300)
Arguments
epidemic |
A list of simulated epidemic data (output from simepi() or similar function). |
individual_data |
A data frame of simulated individuals data (output from simulate_households() or similar function). |
lags |
Maximum number of lags for absenteeism, default = 16 (note that lag of zero is included). |
inf_period |
Infection period of epidemic, default = 4. |
T |
Time period, default = 300 days. |
Value
A data frame containing compiled epidemic data, including:
Date |
Day of the epidemic |
ScYr |
School year |
pct_absent |
Percentage of students absent |
absent |
Number of students absent |
absent_sick |
Number of students absent due to illness |
new_inf |
Number of new infections |
reported_cases |
Number of reported cases |
Case |
Indicator for lab confirmed flu case that day |
sinterm , costerm |
Seasonal terms |
window |
Indicator for "True Alarm" window |
ref_date |
Indicator for reference date |
lag0 , lag1 , ... , lag15 |
Lagged absenteeism values |
Examples
# Assuming you have previously simulated epidemic and individual data:
epidemic <- ssir(1000, alpha = 0.4)
individual_data <- data.frame(elem_child_ind = sample(0:1, 1000, replace = TRUE),
schoolID = sample(1:10, 1000, replace = TRUE))
compiled_data <- compile_epi(epidemic, individual_data)