Learn R Programming

climatehealth (version 1.0.0)

hc_model_validation: Model Validation Assessment

Description

Produces results on QAIC for each model combination, variance inflation factor for each independent variable, ADF test for stationarity, and plots for residuals to assess the models.

Usage

hc_model_validation(
  df_list,
  cb_list,
  independent_cols = NULL,
  dfseas = 8,
  save_fig = FALSE,
  save_csv = FALSE,
  output_folder_path = NULL,
  seed = NULL
)

Value

  • qaic_results A dataframe of QAIC and dispersion metrics for each model combination and geography.

  • qaic_summary A dataframe with the mean QAIC and dispersion metrics for each model combination.

  • vif_results A dataframe of variance inflation factors for each independent variables by geography.

  • vif_summary A dataframe with the mean variance inflation factors for each independent variable.

  • adf_results A dataframe of ADF test results for each geography.

Arguments

df_list

A list of dataframes containing daily timeseries data for a health outcome and climate variables which may be disaggregated by a particular geography.

cb_list

List of cross-basis matrices from hc_create_crossbasis function.

independent_cols

Character/list. Additional independent variables to test in model validation as confounders. Defaults to NULL.

dfseas

Integer. Degrees of freedom for seasonality. Defaults to 8.

save_fig

Boolean. Whether to save the plot as an output. Defaults to FALSE.

save_csv

Boolean. Whether to save the results as a CSV. Defaults to FALSE.

output_folder_path

Path to folder where plots should be saved. Defaults to NULL.