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.
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
)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.
Dataframe containing a daily time series of climate and health data from which to fit models.
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.
Bool. Whether to calculate Relative Risk by region. Defaults to FALSE.
Bool. Whether or not to save a figure showing residuals vs fitted values for each lag. Defaults to FALSE.
String. Where to save the figure. Defaults to NULL.
Bool. Whether to print the model summaries to console. Defaults to FALSE.