plotARIMA: Plot SARIMA Results of Fitting/Forecasting the Disease Data

Description Usage Arguments Value Examples

View source: R/plot_fxns.R

Description

plotARIMA Creates a PDF file with the results of the SARIMA fits to the model and fit data. Both direct fitting and the aggregate results are plotted.

Usage

1
2
3
plotARIMA(mydata = NULL, tables.mod = NULL, tables.fit = NULL,
  tables.agg.mod = NULL, arima_model = NULL, arima_model_all = NULL,
  covar = NULL, covar_lag = 0, device = "png")

Arguments

mydata

- dataframe with all the data for this DICE run

tables.mod

- a table with the data and the results for the direct Model fit. It includes the mean and the 5-95% percentile (as well as the error)

tables.fit

- Optional a table with the data and the results for the fits at the fit_level. It includes the mean and the 5-95% percentile (as well as the error)

tables.agg.mod

- A table with aggregate results of the fits

arima_model

- A list with the user selection of the ARIMA model. If the user has not selected a model this will be NULL and arima_model_all will have the models selected by auto.arima

arima_model_all

- An array with details of the ARIMA model used for model region, the fits regions and the aggregate (the last is only if the User has chosen an ARIMA model for the run)

covar

- String. Optional covariate variable for ARIMA fit. 'sh', 'precip' and 'temp' are currently supported. Default is NULL - no covariate

covar_lag

- Numeric. Lag time for covariate variable in units of the cadence

device

- 'pdf' or 'png'. Default is 'png' of the data

all_years_epi

the entire time series for the disease

Value

err=0 if plots were created

Examples

1
2
3
plotARIMA(mydata = mydata, tables.mod = tables.mod, tables.fit = tables.fit,
tables.agg.mod = tables.agg.mod,arima_model = arima_model,
arima_model_all = NULL, covar = covar, covar_lag = covar_lag, device = device)

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