Learn R Programming

climatehealth (version 1.0.0)

casecrossover_quasipoisson: Fit quasipoisson regression models for different lags using a time-stratified case-crossover approach.

Description

Fits quasipoisson regression models using gnm

Usage

casecrossover_quasipoisson(
  data,
  scale_factor_wildfire_pm = 10,
  wildfire_lag,
  save_fig = TRUE,
  output_folder_path = NULL,
  print_model_summaries = TRUE
)

Value

Dataframe of relative risk and confidence intervals for each lag of wildfire-related PM2.5

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.

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.