summarize_stats_CSV {MGDrivE2}R Documentation

Summary Statistics for MGDrivE2

Description

This function reads in all repetitions for each patch and calculates either the mean, quantiles, or both. User chooses the quantiles, up to 4 decimal places, and enters them as a vector. Quantiles are calculated empirically. (order does not matter)

Usage

summarize_stats_CSV(
  read_dir,
  write_dir = read_dir,
  mean = TRUE,
  quantiles = NULL,
  spn_P,
  tmax,
  dt,
  rem_file = FALSE,
  verbose = TRUE
)

Arguments

read_dir

Directory to find repetition folders in

write_dir

Directory to write output

mean

Boolean, calculate mean or not. Default is TRUE

quantiles

Vector of quantiles to calculate. Default is NULL

spn_P

Places object, see details

tmax

The final time to end simulation

dt

The time-step at which to return output (not the time-step of the sampling algorithm)

rem_file

Remove original output? Default is FALSE

verbose

Chatty? Default is TRUE

Details

Given the read_dir, this function assumes the follow file structure:

The places (spn_P) object is generated from one of the following: spn_P_lifecycle_node, spn_P_lifecycle_network, spn_P_epiSIS_node, spn_P_epiSIS_network, spn_P_epiSEIR_node, or spn_P_epiSEIR_network.

t0, tt, dt define the first sampling time, the last sampling time, and each sampling time in-between.

Output files are *.csv and contain the mean or quantile in the file name, e.g. stageMean(patchNum).csv and stageQuantile(quantNum)_(patchNum).csv.

For more details about using this function to process CSV output see: vignette("data-analysis", package = "MGDrivE2")

Value

Writes output to files in write_dir


[Package MGDrivE2 version 2.1.0 Index]