Learn R Programming

climatehealth (version 1.0.0)

generate_rr_pm_overall: Relative risk estimates across PM2.5 concentrations for a specified lag.

Description

Computes relative risk and confidence intervals across a range of PM2.5 concentrations for a specified wildfire-related lag, using log-linear extrapolation from a reference estimate.

Usage

generate_rr_pm_overall(
  data,
  relative_risk_overall,
  scale_factor_wildfire_pm,
  wildfire_lag = 0,
  pm_vals = NULL
)

Value

A data frame with columns: 'pm_levels', 'relative_risk', 'ci_lower', and 'ci_upper', representing estimated relative risk and 95% confidence intervals across the specified PM2.5 levels.

Arguments

data

Data frame containing a daily time series of mean_PM values, either from the original input csv file or produced after merging wildfire data with the initial csv file.

relative_risk_overall

Data frame containing relative risk estimates and confidence intervals for wildfire-related PM2.5 exposure at different lags. Must include columns: 'lag', 'relative_risk', 'ci_lower', and 'ci_upper'.

scale_factor_wildfire_pm

Numeric. Scaling factor used to normalize PM2.5 values to the unit of exposure used in the original relative risk estimate.

wildfire_lag

Integer. Lag day to filter from the input data for extrapolation. Defaults to 0.

pm_vals

Numeric vector. PM2.5 concentrations over which to compute relative risk. Defaults to a sequence from 0 to the maximum observed wildfire-related PM2.5 in dataset, max(mean_PM).