Learn R Programming

climatehealth (version 1.0.0)

hc_add_national_data: Process data for national analysis

Description

Aggregate to national data and run crossbasis

Usage

hc_add_national_data(
  df_list,
  pop_list,
  var_fun = "bs",
  var_per = c(10, 75, 90),
  var_degree = 2,
  lagn = 21,
  lagnk = 3,
  country = "National",
  cb_list,
  mm,
  minpercgeog_
)

Value

  • df_list List. A list of data frames for each geography and national level.

  • cb_list List. A list of cross-basis matrices by geography and national level.

  • minpercgeog_ Vector. Percentile of minimum mortality temperature for each geography and national level.

  • 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 geography.

pop_list

List of population totals by year and geography.

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(10, 75, 90).

var_degree

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

lagn

Integer. Number of days in the lag period. Defaults to 21. (see dlnm::crossbasis).

lagnk

Integer. Number of knots in lag function. Defaults to 3. (see dlnm::logknots).

country

Character. Name of country for national level estimates. Defaults to 'National'.

cb_list

A list of cross-basis matrices by geography.

mm

A model object. A multivariate meta-analysis model.

minpercgeog_

Vector. Percentile of minimum mortality temperature for each geography.