plotFitCDCPercentILI.ggplot2: Plot the results of a 'DICE' Run Using ggplot2

Description Usage Arguments Value Examples

View source: R/ggplot2_fxns.R

Description

Plot the results of an a coupled or uncoupled DICE run. For each of the fit regions we plot the disease incidence for the region along with our predictions for it based on randomly selected results from the history of the MCMC chain of each region. Using the predictions for the fit regions we then show the results for the model region as a weighted sum of the fit regions. The last panel shows our prediction for the model region using a direct fit to the model data. The function also writes a binary RData file with all the profile predictions for the model and fit regions. Note that in the case of a coupled run the fit regions are never individually optimized. It is their weighted sum that is optimized, with the weights given by the relative population of each fit region.

Usage

1
2
3
plotFitCDCPercentILI.ggplot2(rtn = NULL, profile = NULL, model_rtn = NULL,
  model_profile = NULL, mydata = NULL, ireal = 1, run.list = NULL,
  idevice = 1)

Arguments

rtn

A 1D numeric array with the best indirect prediction to the model region

profile

A 3D numeric array holding random predictions for each of the fit regions based on the history of their MCMC chains.

model_rtn

A 1D numeric array with the best direct prediction to the model region

model_profile

A 2D numeric array with randomly chosen predicted profiles obtained by fitting the model region directly.

mydata

A dataframe with all the data available for this DICE run

ireal

Integer - the MCMC chain number

run.list

A list with various run parameters

idevice

Integer - the index of the device in the device array. Default is 1 - make only one format of plot results

device

String with format for output of plots - pdf or png

Value

Returns err = 0 if successful

Examples

1
2
plotFitCDCPercentILI{ rtn = rtn, profile = profile, model_rtn = model_rtn, model_profile = model_profile,
mydata = mydata, ireal = ireal, device = device, idevice = 1}

predsci/DICE documentation built on Aug. 9, 2019, 9:41 a.m.