read.simulation.results
Read results of an EMOD simulation
Description
Read results of an EMOD simulation
Usage
read.simulation.results(
results_path,
scenario_name,
summarize_columns = c("Newly.Infected", "Newly.Tested.Positive",
"Newly.Tested.Negative", "Population", "Infected", "On_ART", "Died", "Died_from_HIV",
"Tested.Past.Year.or.On_ART", "Tested.Ever", "Diagnosed"),
stratify_columns = c("Year", "Gender"),
min_age_inclusive = 15,
max_age_inclusive = 49
)
Arguments
Argument |
Description |
---|---|
|
string pointing to the folder which contains the ReportHIVByAgeAndGender.csv files |
|
Provide a string label for the scenario being read in. For example, you might use “baseline” for the baseline scenario. |
|
a vector of strings containing names of columns to be aggregated via summation. Note that spaces in column names are replaced by a period (“.”). For example, “Newly Infected” becomes “Newly.Infected”. |
|
a vector of strings containing names of columns by which we will stratify the data. For example, we might want to have a separate row in the dataset for each year, so we would set stratify_columns = c(“Year”) |
|
an integer representing the minimum age to keep while reading the data (all ages below will be filtered out) |
|
an integer representing the maximum age to keep while reading the data (all ages above will be filtered out) |
Details
The results of an EMOD simulation are stored in a series of csv files titled “ReportHIVByAgeAndGender.csv”. One of these files exists for each simulation run (typically 250 files). This function reads and aggregates those files into a single tibble
Value
A tibble with columns incidence and Year