Learn R Programming

climatehealth (version 1.0.0)

plot_relative_risk: Read in Relative Risk plot at country, Region, and District level

Description

Plots the relative risk of Malaria cases by the maximum temperature and cumulative rainfall at country, Region and District level

Usage

plot_relative_risk(
  data,
  model,
  param_term,
  max_lag,
  nk,
  level,
  case_type,
  filter_year = NULL,
  output_dir = NULL,
  save_csv = FALSE,
  save_fig = FALSE
)

Value

Relative risk plot at country, region, and district levels.

Arguments

data

Data list from combine_health_climate_data() function.

model

The fitted model from run_inla_models() function.

param_term

A character vector or list containing parameter terms such as tmax (temperature exposure) and rainfall (rainfall exposure). Default to tmax.

level

A character vector specifying the geographical disaggregation. Can take one of the following values: country, region, or district. Default to country.

case_type

Character. The type of disease that the case column refers to. Must be one of "diarrhea" or "malaria".

filter_year

Integer. The year to filter to data to. This gives the possibility to user to have the plot for a specific year. When Defaults to NULL, it provides the plot by grouping all the years in the dataset.

output_dir

Character. The path where the PDF file will be saved. Default to NULL.

save_csv

Boolean. If TRUE, saves the RR data to the specified directory. Defaults to FALSE.

save_fig

Boolean. If TRUE, saves the plot to the specified directory. Defaults to FALSE.