plot_computed_costs: Plot number of costs associated to predicted number of health...

Description Usage Arguments Value Examples

View source: R/plot_computed_cost.R

Description

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

Usage

1
plot_computed_costs(computed_costs, plot_file)

Arguments

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

Value

A boxplot showing the costs associated to the predicted number of a particular health event.

Examples

 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)

UBESP-DCTV/imthcm documentation built on Dec. 2, 2019, 9:26 a.m.