Post processing
Overview Structs
Overview Functions
GEMS.age_incidenceGEMS.attack_rateGEMS.compartment_fillGEMS.compartment_periodsGEMS.cumulative_casesGEMS.cumulative_deathsGEMS.cumulative_disease_progressionsGEMS.cumulative_quarantinesGEMS.deathsDFGEMS.detected_tick_casesGEMS.detection_rateGEMS.effectiveRGEMS.household_attack_ratesGEMS.infectionsGEMS.infectionsDFGEMS.observed_RGEMS.pooltestsDFGEMS.populationDFGEMS.population_pyramidGEMS.r0GEMS.r0_per_countyGEMS.rolling_observed_SIGEMS.setting_sizesGEMS.sim_infectionsDFGEMS.simulationGEMS.testsDFGEMS.tick_casesGEMS.tick_cases_per_settingGEMS.tick_deathsGEMS.tick_pooltestsGEMS.tick_serotestsGEMS.tick_testsGEMS.time_to_detectionGEMS.total_detected_casesGEMS.total_quarantinesGEMS.total_tests
Structs
GEMS.PostProcessor — Type
PostProcessorA type to provide data processing features supplying reports, plots, or other data analyses.
Internal Fields
simulation::Simulation: Simulation objectinfectionsDF::DataFrame: Infections (joined with popuation to get information on infeter and infectee)populationDF::DataFrame: Population dataframe with one row per individualvaccinationsDF::DataFrame: Output of the vaccination loggerdeathsDF::DataFrame: Output of the death loggertestsDF::DataFrame: Output of the test loggerpooltestsDF::DataFrame: Output of the pool test loggerserotestsDF::DataFrame: Output of the seroprevalence test loggerquarantinesDF::DataFrame: Output of th quarantine loggercache::Dict{String, Any}: Internal cache to store and retrieve intermediate results
Constructors
GEMS.PostProcessor — Method
PostProcessor(simulation::Simulation)Create a PostProcessor object for an associated Simulation. Post Processing requires a simulation to be done.
GEMS.PostProcessor — Method
PostProcessor(simulations::Vector{Simulation})Create a vector of PostProcessor objects for a vector of associated Simulation objects. Post Processing requires all simulations to be done.
Missing docstring for PostProcessor(::Batch). Check Documenter's build log for details.
Functions
GEMS.age_incidence — Function
age_incidence(postProcessor::PostProcessor, timespan::Int64, basesize::Int64)
age_incidence(postProcessor::PostProcessor; timespan::Int64 = 7, basesize::Int64 = 100_000)Returns a DataFrame containing the infection incidence stratified by (10-year) age groups, per pathogen.
Parameters
postProcessor::PostProcessor: Post processor instancetimespan::Int64: Reference time window to calculate incidencebasesize::Int64: Reference population size to calculate incidence
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
total | Float64 | Total incidence |
a0_10 | Float64 | Incidence in age cohort 0-10 |
a11_20 | Float64 | Incidence in age cohort 11-20 |
a21_30 | Float64 | Incidence in age cohort 21-30 |
a31_40 | Float64 | Incidence in age cohort 31-40 |
a41_50 | Float64 | Incidence in age cohort 41-50 |
a51_60 | Float64 | Incidence in age cohort 51-60 |
a61_70 | Float64 | Incidence in age cohort 61-70 |
a71_80 | Float64 | Incidence in age cohort 71-80 |
a81_90 | Float64 | Incidence in age cohort 81-90 |
a91_100 | Float64 | Incidence in age cohort 91-100 |
age_incidence(rd::ResultData)Returns a DataFrame with incidence over time stratified by age groups. Look up the PostProcessor docs to find the column definitions. Returns an empty dictionary if the data is not available in the input ResultData object.
GEMS.attack_rate — Method
attack_rate(postProcessor::PostProcessor)Divides the number of individuals who have been infected one (or multiple) time(s) by the total number of individuals, stratified by pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
pathogen_id | Int8 | Pathogen identifier |
attack_rate | Float64 | Fraction of population infected by this pathogen |
GEMS.compartment_fill — Method
compartment_fill(postProcessor::PostProcessor)Returns a DataFrame containing the per-tick population state counts.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
exposed_cnt | Int64 | Total number of individuals in the exposed state |
infectious_cnt | Int64 | Total number of individuals in the infectious state |
dead_cnt | Int64 | Total number of individuals in the deceased state |
detected_cnt | Int64 | Total number of detected individuals |
quarantined | Int64 | Total number of individuals in quarantine |
quarantined_students | Int64 | Students in quarantine |
isolated_students | Int64 | Students in quarantine who are infected |
unable_to_attend_students | Int64 | Students unable to attend (closed class, severe, hospitalized, or quarantined) |
quarantined_workers | Int64 | Workers in quarantine |
isolated_workers | Int64 | Workers in quarantine who are infected |
unable_to_attend_workers | Int64 | Workers unable to attend (closed office, severe, hospitalized, or quarantined) |
GEMS.compartment_periods — Method
compartment_periods(postProcessor::PostProcessor)Calculates the durations of the disease compartments of all infections and returns a DataFrame containing all additional infectee-related information, per pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
infection_id | Int32 | Infectee id |
pathogen_id | Int8 | Pathogen identifier |
total | Int16 | Total duration of infection in ticks |
exposed | Int16 | Duration of the exposed period in ticks |
infectious | Int16 | Duration of the infectious period in ticks |
asymptomatic | Int16 | Duration of the asymptomatic period in ticks |
pre_symptomatic | Int16 | Duration of the pre-symptomatic period in ticks |
symptomatic | Int16 | Duration of the symptomatic period in ticks |
severe | Int16 | Duration of the severe period in ticks |
critical | Int16 | Duration of the critical period in ticks |
Host-level care periods (hospital/ICU/ventilation) are no longer per-infection; see _hospital_df.
GEMS.cumulative_cases — Method
cumulative_cases(postProcessor::PostProcessor)Calculates the cumulative counts of simulated infections (exposures), recoveries, and deaths over time and returns a DataFrame containing these cumulative counts for each tick, per pathogen.
If individuals can get reinfected, the cumulative counts will reflect the total number of events, including multiple infections, recoveries, and deaths for the same individual.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
exposed_cum | Int64 | Cumulative number of individuals infected up to this tick |
recovered_cum | Int64 | Cumulative number of individuals recovered up to this tick |
deaths_cum | Int64 | Cumulative number of individuals deceased up to this tick |
GEMS.cumulative_deaths — Method
cumulative_deaths(postProcessor::PostProcessor)Returns a DataFrame containing the total count of individuals that died, per pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
deaths_cum | Int64 | Total number of individuals that have died until now |
GEMS.cumulative_disease_progressions — Method
cumulative_disease_progressions(postProcessor::PostProcessor)Calculates the accumulated number of individuals in a certain disease state (latent, presymptomatic, symptomatic and asymptomatic) after the individual has been infected, per pathogen. Rows indicate the number of elapsed ticks since infections. Latent means infected but not yet infectious. Presymptomatic means infectious but not yet symptomatic. Symptomatic means infectious and symptomatic. Asymptomatic means infectious but not symptomatic and will never develop symptoms.
Example: Row 8 showing [20, 47, 290, 50] would mean that eight ticks after exposure, 20 individuals were latent, 47 were presymptomatic (no symptoms yet, but will be developing), 290 had symptoms and 50 are not experiencing symptoms and won't ever do.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int64 | Ticks since exposure |
latent | Int64 | Number of latent individuals X ticks after exposure |
pre_symptomatic | Int64 | Number of pre-symptomatic individuals X ticks after exposure |
symptomatic | Int64 | Number of symptomatic individuals X ticks after exposure |
asymptomatic | Int64 | Number of asymptomatic individuals X ticks after exposure |
pathogen_id | Int8 | Pathogen identifier |
GEMS.cumulative_quarantines — Method
cumulative_quarantines(postProcessor::PostProcessor)Returns a DataFrame containing cumulative information about days spent in isolation.
Columns
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
quarantined | Int64 | Total number of individuals in isolation during that tick |
students | Int64 | Total number of students in isolation during that tick |
workers | Int64 | Total number of workers in isolation during that tick |
other | Int64 | Total number of non-students and -workers in isolation during that tick |
GEMS.deathsDF — Method
deathsDF(postProcessor::PostProcessor)Returns the internal flat deaths DataFrame.
Columns
| Name | Type | Description |
|---|---|---|
tick | Int16 | Tick of the death event |
id | Int32 | Individual's id |
pathogen_id | Int8 | Pathogen credited for the death |
sex | Int8 | Individual's sex |
age | Int8 | Individual's age |
education | Int8 | Individual's education level |
occupation | Int16 | Individual's occupation group |
household | Int32 | Individual's associated household |
office | Int32 | Individual's associated office |
schoolclass | Int32 | Individual's associated schoolclass |
household_ags | AGS | Individual's household community identification number |
Missing docstring for detected_infections(::PostProcessor). Check Documenter's build log for details.
GEMS.detected_tick_cases — Method
detected_tick_cases(postProcessor::PostProcessor)Returns the number of detected cases per tick and pathogen and the number of true new exposures. This analysis is based on the tick_test column of the infections-dataframe which indicates when an individual with an active infection was first tested positive. Thus, there might be a delay between exposure_cnt and detected_cnt.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
total_reported_cases | Int64 | Total number of reported cases at that tick |
new_detections | Int64 | Number of true new detected cases at that tick (not known before) |
double_reports | Int64 | Number of cases that were reported at that tick but were known before |
false_positives | Int64 | Number of false positive reports at that tick |
exposed_cnt | Int64 | Number of new infections at that tick |
GEMS.detection_rate — Method
detection_rate(postProcessor::PostProcessor)Returns a DataFrame with the fraction of detected cases per pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
pathogen_id | Int8 | Pathogen identifier |
detection_rate | Float64 | Fraction of detected infections |
Missing docstring for detection_ticks(::DataFrame). Check Documenter's build log for details.
GEMS.effectiveR — Method
effectiveR(postProcessor::PostProcessor)Returns a DataFrame containing the effective R value for each tick, per pathogen.
For each infectee, this method looks ahead for secondary infections this individual might cause during the total span of the simulation. These infections are then counted towards the R-value of the initial infection. If individual A, for example, is infected at time 42 and causes four secondary infections during the next 14 ticks, these four infections are counted towards the R-value of time 42.
Note: This only works in scenarios without re-infection as the current implementation just evaluates the total infections caused by each individual in general. If an individual was infected multiple times, secondary infections will inflate the statistic.
Returns
Dataframewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
effective_R | Float64 | Effective R-value |
in_hh_effective_R | Float64 | Effective R-value for household infections |
out_hh_effective_R | Float64 | Effective R-value for non-household infections |
rolling_R | Float64 | Effective R rolling average of the 7 previous ticks |
rolling_in_hh_R | Float64 | Effective R rolling average for household infections of the 7 previous ticks |
rolling_out_hh_R | Float64 | Effective R rolling average for non-household infections of the 7 previous ticks |
Missing docstring for hospital_df(::PostProcessor). Check Documenter's build log for details.
GEMS.household_attack_rates — Method
household_attack_rates(postProcessor::PostProcessor; hh_samples::Int64 = HOUSEHOLD_ATTACK_RATE_SAMPLES)Returns a DataFrame containing data on the in-household attack rate, per pathogen. The in-household attack rate is defined as the fraction of individuals in a given household that got infected within the household (in-household infection chain) caused by the first introduction of the pathogen in this household. It does not reflect overall fraction of individuals that were infected in this household throughout the course of the simuation. As the attack rate calculation is very computationally intensive, it is not done for all household but rather for a subset of households. You can change the desired subset size through the optional hh_samples argument. Its default can be found in constants.jl
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
pathogen_id | Int8 | Pathogen identifier |
first_introduction | Int16 | Time of when the first member of the respective household was exposed |
hh_id | Int32 | Household setting identifier |
hh_size | Int16 | Household size |
chain_size | Int32 | Number of individuals that got infected within the household |
hh_attack_rate | Float64 | Number of infected individuals divided by household size |
Missing docstring for in_cache(::PostProcessor, ::String). Check Documenter's build log for details.
Missing docstring for individuals_per_age_group. Check Documenter's build log for details.
GEMS.infections — Method
infections(postProcessor::PostProcessor)Returns the internal flat infections DataFrame.
Columns
| Name | Type | Description |
|---|---|---|
infection_id | Int32 | Unique identifier of an infection |
tick | Int16 | Tick of the infection event |
id_a | Int32 | Infecter id |
id_b | Int32 | Infectee id |
pathogen_id | Int8 | Pathogen of this infection |
progression_category | Symbol | Disease progression category (e.g. :Asymptomatic, :Mild, :Severe, :Critical) |
infectiousness_onset | Int16 | Tick at which infectee becomes infectious |
symptom_onset | Int16 | Tick at which infectee develops symptoms |
severeness_onset | Int16 | Tick at which infectee's symptoms become severe |
critical_onset | Int16 | Tick at which infectee's symptoms become critical |
critical_offset | Int16 | Tick at which infectee's symptoms stop being critical |
severeness_offset | Int16 | Tick at which infectee's symptoms stop being severe |
recovery | Int16 | Tick of recovery, or -1 if a host death cut the infection short |
removed | Int16 | Tick at which the infection ended (recovery, or the host death that cut it short) |
setting_id | Int32 | Id of setting in which infection happens |
setting_type | Char | Setting type of the infection setting |
lat | Float32 | Latitude of infection location |
lon | Float32 | Longitude of infection location |
ags | Int32 | German Community Identification Number of infection |
source_infection_id | Int32 | ID of the infection even that caused this infection (chain) |
generation_time | Int16 | Time between preceeding infection and this exposure |
serial_interval | Int16 | Time between onset of symptoms of this and preceeding infection |
test_type | String | Type of test which detected this infection |
first_detected_tick | Int16 | Tick of (reportable) test that first detected this infection |
sex_a | Int8 | Infecter sex |
age_a | Int8 | Infecter age |
education_a | Int8 | Infecter education level |
occupation_a | Int16 | Infecter occupation group |
household_a | Int32 | Infecter associated household |
office_a | Int32 | Infecter associated office |
schoolclass_a | Int32 | Infecter associated schoolclass |
sex_b | Int8 | Infectee sex |
age_b | Int8 | Infectee age |
education_b | Int8 | Infectee education level |
occupation_b | Int16 | Infectee occupation group |
household_b | Int32 | Infectee associated household |
office_b | Int32 | Infectee associated office |
schoolclass_b | Int32 | Infectee associated schoolclass |
household_ags_a | AGS | Infecter household German Community Identification Number |
household_ags_b | AGS | Infectee household German Community Identification Number |
GEMS.infectionsDF — Method
infectionsDF(postProcessor::PostProcessor)Returns the internal flat infections DataFrame. Lookup the docstring of infections(postProcessor::PostProcessor) for column definitions.
GEMS.observed_R — Method
observed_R(postProcessor::PostProcessor)Returns a DataFrame containing estimations for the effective (current) reproduction number R, based on detected infections, per pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
mean_est_R | Float64 | Mean estimation (based on detected infections) for R |
lower_est_R | Float64 | Lower bound estimation (based on detected infections) for R |
upper_est_R | Float64 | Upper bound estimation (based on detected infections) for R |
GEMS.pooltestsDF — Method
pooltestsDF(postProcessor::PostProcessor)Returns the internal flat pool tests DataFrame.
Columns
| Name | Type | Description |
|---|---|---|
tick | Int16 | Tick of the test event |
setting_id | Int32 | Setting id of the tested pool |
setting_type | Char | Setting type |
test_result | Bool | Test result (pos./neg.) |
no_of_individuals | Int16 | Number of tested individuals |
no_of_infected | Int16 | Number of actually infected individuals |
pathogen_id | Int8 | Pathogen the test detects |
test_type | String | Name of test type |
GEMS.populationDF — Method
populationDF(postProcessor)Returns the internal flat population DataFrame.
Columns
| Name | Type | Description |
|---|---|---|
id | Int32 | Individual id |
sex | Int8 | Individual sex |
age | Int8 | Individual age |
education | Int8 | Individual education level |
occupation | Int16 | Individual occupation group |
household | Int32 | Individual associated household |
office | Int32 | Individual associated office |
schoolclass | Int32 | Individual associated schoolclass |
GEMS.population_pyramid — Method
population_pyramid(postProcessor::PostProcessor)Returns a DataFrame containing data to generate a population pyramid. It provides the sum of all female and male individuals in all age groups in the population model. Sums for female are multiplied by -1 to facilitate visualization.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
age | Int8 | 1-year age classes |
sex | Int8 | Sex according to population DataFame (0 = female, 1 = male) |
gender | String | String variant of Sex [Female, Male] |
sum | Int64 | Total of all genders in all ages (females multiplied by -1) |
GEMS.r0 — Method
r0(postProcessor::PostProcessor; sample_fraction = R0_CALCULATION_SAMPLE_FRACTION)Returns a DataFrame with the R0 value per pathogen. Requires the infectionsDF to have consecutive infection IDs starting from 1 (which is the default in GEMS).
The R0 value is calculated as the number of infections caused by the first sample_fraction% of infections of each pathogen. partialsort is used to find the infection-ID threshold in O(N) average time.
Attention: This variant of the R0 calculation expects that the infections occur in a fully susceptible population, i.e. no immunity is present. If you have a scenario that includes vaccination or natural immunity, the R0 value will not be accurate.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
pathogen_id | Int8 | Pathogen identifier |
r0 | Float64 | Basic R0 value |
GEMS.r0_per_county — Method
r0_per_county(postProcessor::PostProcessor; sample_fraction = R0_CALCULATION_SAMPLE_FRACTION)Returns a dataframe with AGS on county level, pathogen id and a regional reproduction rate.
The R0 value is calculated as the number of infections that were caused by the first sample_fraction% of infections in each county and pathogen. The default value can be changed in the R0_CALCULATION_SAMPLE_FRACTION constant or just pass a different value as sample_fraction argument.
Attention: This variant of the R0 calculation expects that the infections occur in a fully susceptible population, i.e. no immunity is present. If you have a scenario that includes vaccination or natural immunity, the R0 value will not be accurate. Since the infector-AGS must be known, this calculation is based on the sample_fraction% of simulated infections and excludes the seeding infection (as they have no infector ags).
Missing docstring for reported_tick_cases(::PostProcessor). Check Documenter's build log for details.
GEMS.rolling_observed_SI — Method
rolling_observed_SI(postProcessor::PostProcessor)Returns a DataFrame containing aggregated estimations on the serial interval based on true detected cases, per pathogen. The estimations are based on all true detected cases in a 14-past-days time window. If fewer than 50 infections were recorded in that time window, detections prior to that are added until the sample is complete.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
min_SI | Int16 | Minimal serial interval recored for any infection that tick |
max_SI | Int16 | Maximum serial interval recored for any infection that tick |
lower_95_SI | Float64 | Lower 95% confidence interval for serial intervals that tick |
upper_95_SI | Float64 | Upper 95% confidence interval for serial intervals that tick |
std_SI | Float64 | Stanard deviation for serial intervals that tick |
mean_SI | Float64 | Mean for serial intervals that tick |
GEMS.setting_sizes — Method
setting_sizes(postProcessor::PostProcessor)Returns a Dictionary containing information about size of the settings. The keys are equal to the settingtypes and the values correspond to a countmap of the setting sizes.
Returns
Dict{String, Dict{Int64, Int64}}: Nested dictionary where the first key is the name of the setting type (e.g., "Household") and the innter dictionary is a countmap with the key being a setting size (e.g., 5) and the value the number of occurences.
Missing docstring for settingdata(::PostProcessor). Check Documenter's build log for details.
GEMS.sim_infectionsDF — Method
sim_infectionsDF(postProcessor::PostProcessor)Returns a DataFrame containing all infections that happened during the simulation run. As it is a direct filter on the PostProcessors internal infectionsDF, the column structure is identical to the output of infectionsDF(postProcessor)
GEMS.simulation — Method
simulation(postProcessor::PostProcessor)Returns the associated Simulation object.
GEMS.testsDF — Method
testsDF(postProcessor::PostProcessor)Returns the internal flat tests DataFrame. It was joined with the population dataframe to also obtain personal characteristics about the testees.
Columns
| Name | Type | Description |
|---|---|---|
test_id | Int32 | Unique test id within the logger |
tick | Int16 | Tick of the test event |
id | Int32 | Individual's id |
test_result | Bool | Test result |
infected | Bool | Individual's current infection state |
infection_id | Int32 | Individual's infection id |
pathogen_id | Int8 | Pathogen the test detects |
test_type | String | Test name |
reportable | Bool | If true, a positive test result will be "reported" |
sex | Int8 | Individual's sex |
age | Int8 | Individual's age |
education | Int8 | Individual's education level |
occupation | Int16 | Individual's occupation group |
household | Int32 | Individual's associated household |
office | Int32 | Individual's associated office |
schoolclass | Int32 | Individual's associated schoolclass |
GEMS.tick_cases — Method
tick_cases(postProcessor::PostProcessor)Returns a DataFrame containing the count of individuals currently entering in the respective disease states exposed, infectious, recovered, and deceased, per pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
exposed_cnt | Int64 | Number of individuals entering the exposed state |
infectious_cnt | Int64 | Number of individuals entering the infectious state |
recovered_cnt | Int64 | Number of individuals recovering |
dead_cnt | Int64 | Number of individuals dying, attributed to this pathogen |
A host death is credited to exactly one pathogen (the one the HealthProgression drew it from), so dead_cnt summed over pathogens is the total number of deaths.
GEMS.tick_cases_per_setting — Method
tick_cases_per_setting(postProcessor::PostProcessor)Returns a DataFrame containing information about the infections in different setting types, per pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Current tick of the simulation |
setting_type | String | Setting type identifier (name) |
pathogen_id | Int8 | Pathogen identifier |
daily_cases | Int64 | Cases for setting, pathogen and tick |
GEMS.tick_deaths — Method
tick_deaths(postProcessor::PostProcessor)Returns a DataFrame containing the count of individuals that died per tick and pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
death_cnt | Int64 | Number of individuals that died |
Missing docstring for tick_generation_times(::PostProcessor). Check Documenter's build log for details.
GEMS.tick_pooltests — Method
tick_pooltests(postProcessor::PostProcessor)Returns a Dict for each employed testtype containing their name as a key and a DataFrame containing the number of applied pool tests (positive/negative/total) per tick with a `pathogenid` column.
Returns
Dict{String, DataFrame}: The key is theTestType's name. The values areDataFrameswith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
positive_tests | Int64 | Number of positive tests |
negative_tests | Int64 | Number of negative tests |
total_tests | Int64 | Number of tests performed |
Missing docstring for tick_serial_intervals(::PostProcessor). Check Documenter's build log for details.
GEMS.tick_serotests — Method
tick_serotests(postProcessor::PostProcessor)Returns a Dict for each seroprevalence test_type, keyed by its name and containing a DataFrame with counts per simulation tick and pathogen.
Returns
Dict{String, DataFrame}: The key is thetest_typename. The values areDataFrameswith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick |
pathogen_id | Int8 | Pathogen identifier |
true_positives | Int64 | Test result was positive and person was ever infected |
false_positives | Int64 | Test result was positive but person was never infected |
true_negatives | Int64 | Test result was negative and person was never infected |
false_negatives | Int64 | Test result was negative but person was ever infected |
positive_tests | Int64 | Sum of true and false positives |
negative_tests | Int64 | Sum of true and false negatives |
total_tests | Int64 | Total number of tests |
GEMS.tick_tests — Method
tick_tests(postProcessor::PostProcessor)Returns a Dict for each employed testtype containing their name as a key and a DataFrame containing the count of individuals that got tested (positive/negative) as well as the people reported positive for the first time per tick, with a `pathogenid` column.
Returns
Dict{String, DataFrame}: The key is theTestType's name. The values areDataFrameswith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int16 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
reported_cases | Int16 | Number cases tested positive for the first time |
positive_tests | Int64 | Number of positive tests |
negative_tests | Int64 | Number of negative tests |
total_tests | Int64 | Number of tests performed |
positive_rate | Float64 | Fraction of positive tests |
rolling_positive_rate | Float64 | Positive rate rolling average of the 7 previous ticks |
GEMS.time_to_detection — Method
time_to_detection(postProcessor::PostProcessor)Returns the mean, standard deviation, minimum, maximum, upper- and lower 95% confidence intervals of the time to detection for all detected cases, per pathogen. The time to detection is defined as the number of ticks between the time of exposure and time of detection.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
tick | Int64 | Simulation tick (time) |
pathogen_id | Int8 | Pathogen identifier |
mean_time_to_detection | Int64 | Mean time to detection at that tick |
std_time_to_detection | Int64 | Standard deviation of time to detection at that tick |
min_time_to_detection | Int64 | Minimum time to detection at that tick |
max_time_to_detection | Int64 | Maximum time to detection at that tick |
upper_95_time_to_detection | Int64 | Upper 95% confidence interval of time to detection at that tick |
lower_95_time_to_detection | Int64 | Lower 95% confidence interval of time to detection at that tick |
GEMS.total_detected_cases — Method
total_detected_cases(postProcessor::PostProcessor)Returns a DataFrame with the total number of detected cases per pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
pathogen_id | Int8 | Pathogen identifier |
detected_cases | Int64 | Total number of detected cases |
GEMS.total_quarantines — Method
total_quarantines(postProcessor::PostProcessor)Returns the total number of total ticks spent in quarantine. E.g., if 10 indiviuals were in quarantine for 5 ticks each, this function will return 50.
GEMS.total_tests — Method
total_tests(postProcessor::PostProcessor)Sums up the total number of tests per test type and pathogen.
Returns
DataFramewith the following columns:
| Name | Type | Description |
|---|---|---|
test_type | String | Name of the test type |
pathogen_id | Int8 | Pathogen identifier |
count | Int64 | Number of tests of this type for this path |