Learn R Programming

climatehealth (version 1.0.0)

calculate_wildfire_rr_by_region: Passes data to casecrossover_quasipoisson to calculate RR.

Description

Splits data by region if relative_risk_by_region==TRUE. If TRUE, data for each individual region is passed to casecrossover_quasipoisson to calculate RR by region. If FALSE, RR is calculated for the entire dataset.

Usage

calculate_wildfire_rr_by_region(
  data,
  scale_factor_wildfire_pm,
  calc_relative_risk_by_region = FALSE,
  save_fig = FALSE,
  output_folder_path = NULL,
  print_model_summaries = FALSE
)

Value

Dataframe of relative risk and confidence intervals for each lag of wildfire-related PM2.5. Split by region if calc_relative_risk_by_region set to TRUE.

Arguments

data

Dataframe containing a daily time series of climate and health data from which to fit models.

scale_factor_wildfire_pm

Numeric. The value to divide the wildfire PM2.5 concentration variables by for alternative interpretation of outputs. Corresponds to the unit increase in wildfire PM2.5 to give the model estimates and relative risks (e.g. scale_factor = 10 corresponds to estimates and relative risks representing impacts of a 10 unit increase in wildfire PM2.5). Setting this parameter to 0 or 1 leaves the variable unscaled.

calc_relative_risk_by_region

Bool. Whether to calculate Relative Risk by region. Defaults to FALSE.

save_fig

Bool. Whether or not to save a figure showing residuals vs fitted values for each lag. Defaults to FALSE.

output_folder_path

String. Where to save the figure. Defaults to NULL.

print_model_summaries

Bool. Whether to print the model summaries to console. Defaults to FALSE.