plot forecasts from fits
# S3 method for predict_pansim
plot(
x,
data = NULL,
break_dates = NULL,
dlspace = 1,
limspace = 10,
add_tests = FALSE,
add_ICU_cap = FALSE,
mult_var = NULL,
directlabels = TRUE,
log = TRUE,
log_lwr = 1,
...
)
a calibrated object (result from calibrate
) or a prediction (from predict.fit_pansim
)
original time series data
breakpoints
spacing for direct labels (not working)
extra space (in days) to add to make room for direct labels
plot newTests/1000?
include horizontal lines showing ICU capacity?
variable in data set indicating multiple forecast types to compare
use direct labels?
use a log10 scale for the y axis?
lower limit when using log scale
extra arguments (unused)
plot(ont_cal1)
#> Warning: specifying params_timevar with Relative_value is deprecated: auto-converting (reported once per session)
#> Loading required namespace: directlabels
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Removed 17 row(s) containing missing values (geom_path).
#> Warning: Removed 17 rows containing missing values (geom_dl).
ont_trans <- trans_state_vars(ont_all)
plot(ont_cal1,data=ont_trans)
#> Warning: specifying params_timevar with Relative_value is deprecated: auto-converting (reported once per session)
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Removed 17 row(s) containing missing values (geom_path).
#> Warning: Removed 110 rows containing missing values (geom_point).
#> Warning: Removed 97 row(s) containing missing values (geom_path).
#> Warning: Removed 17 rows containing missing values (geom_dl).
plot(ont_cal1,data=ont_trans, add_tests=TRUE)
#> Warning: specifying params_timevar with Relative_value is deprecated: auto-converting (reported once per session)
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Removed 17 row(s) containing missing values (geom_path).
#> Warning: Removed 126 rows containing missing values (geom_point).
#> Warning: Removed 98 row(s) containing missing values (geom_path).
#> Warning: Removed 17 rows containing missing values (geom_dl).
plot(ont_cal1,data=ont_trans, predict_args=list(end_date="2020-07-01"))
#> Warning: specifying params_timevar with Relative_value is deprecated: auto-converting (reported once per session)
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Transformation introduced infinite values in continuous y-axis
#> Warning: Removed 17 row(s) containing missing values (geom_path).
#> Warning: Removed 110 rows containing missing values (geom_point).
#> Warning: Removed 97 row(s) containing missing values (geom_path).
#> Warning: Removed 17 rows containing missing values (geom_dl).
# \donttest{
## FIXME: don't try these until we have an example where ensemble works
## pp <- predict(ont_cal_2brks, ensemble=TRUE)
## plot(pp)
## plot(pp, data=ont_trans)
# }