Learn R Programming

climatehealth (version 1.0.0)

mh_add_national_data: Process data for national analysis

Description

Aggregate to national data and run crossbasis

Usage

mh_add_national_data(
  df_list,
  pop_list,
  var_fun = "bs",
  var_per = c(25, 50, 75),
  var_degree = 2,
  lag_fun = "strata",
  lag_breaks = 1,
  lag_days = 2,
  country = "National",
  cb_list,
  mm,
  minpercreg
)

Value

  • df_list List. A list of data frames for each region and nation.

  • cb_list List. A list of cross-basis matrices by region and nation.

  • minpercreg Vector. Percentile of minimum suicide temperature for each region and nation.

  • mmpredall List. A list of national coefficients and covariance matrices.

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 region.

pop_list

List of population totals by year and region.

var_fun

Character. Exposure function for argvar (see dlnm::crossbasis). Defaults to 'bs'.

var_per

Vector. Internal knot positions for argvar (see dlnm::crossbasis). Defaults to c(25,50,75).

var_degree

Integer. Degree of the piecewise polynomial for argvar (see dlnm::crossbasis). Defaults to 2 (quadratic).

lag_fun

Character. Exposure function for arglag (see dlnm::crossbasis). Defaults to 'strata'.

lag_breaks

Integer. Internal cut-off point defining the strata for arglag (see dlnm::crossbasis). Defaults to 1.

lag_days

Integer. Maximum lag. Defaults to 2. (see dlnm::crossbasis).

country

Character. Name of country for national level estimates.

cb_list

A list of cross-basis matrices by region.

mm

A model object. A multivariate meta-analysis model.

minpercreg

Vector. Percentile of maximum suicide temperature for each region.