Description Usage Arguments Value Examples
View source: R/plot_computed_cost.R
A plot that shows the number of average daily costs associated to a particular health event. The bold line represents the point estimate of the mean value of associated to a particular health event. The crossbar represents the 95
1 | plot_computed_costs(computed_costs, plot_file)
|
computed_costs |
[data frame] A data frame containing the following variables: - ‘date': date of simulated day in format ’yyyy-mm-dd'; - 'event': name of the outcomes; - 'lower_individual_cost': lower bound of 95 associated to a particular health event; - 'fit_individual_cost': costs associated to the average daily number of a particular health event; - 'upper_individual_cost': upper bound of 95 associated to a particular health event. |
plot_file |
[chr] filename of the destination path. Format of image is automatically decided by the filename extension |
A boxplot showing the costs associated to the predicted number of a particular health event.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
library(imthcm)
default_models <- train_event_models(use_ita = TRUE)
hh_non_summer <- predict_hm(models = default_models,
weather_history = test_weather,
weather_today = test_weather[731L, ]
)
hh_full_year <- predict_hm(models = default_models,
weather_history = test_weather,
weather_today = test_weather[c(731L, 730L), ],
full_year = TRUE
)
computed_costs <- compute_cost(hh_non_summer, use_meps = TRUE)
plot_computed_costs(computed_costs,
plot_file = 'costs_plot.png'
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.