knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE) library(ggplot2)
Pariculate Matter (PM) Exposure-Response Curves (ERCs)
This R provides a lean set of code for computing specific values from an exposure-response curve developed using the bercs
R package. This package contains two elements:
Data objects containing the minimal set of information needed to calculate the full ERC or any desired values from it. Data files are provided for published ERC curves (see examples below).
Functions. Currently, there are four R functions included (including compute_OR2()
), which are derived from functions of similar name from the bercs
package (e.g. compute_OR
). They are included here in PMerc
to facilitate calculating ERC values without requiring the full bercs
package, which requires compiled C code for the STAN model objects. This package is recommended only for calculating specific risk measures from the accompanying data files. If developing your own models, it is recommended to use the functions in the bercs
package and not these. It is possible that these functions may be removed at a future date.
To install PMerc
, use the following commands:
devtools::install_github("jpkeller/PMerc")
library(PMerc) library(splines2) data(nepal_pm_alri) compute_OR2( expsequence = c(35, 37.5, 50, 75, 100, 150, 200, 400), ref_exposure=50, ciband=0.95, beta_post=nepal_pm_alri$posterior_params$beta, bs_post=nepal_pm_alri$posterior_params$bS, xdf=nepal_pm_alri$model_data$xdf, nS=nepal_pm_alri$model_data$S, Mx=nepal_pm_alri$model_data$Mx, Mx_attributes = nepal_pm_alri$model_data$Mx_attributes)
If you have a bug to report, are having technical issues, or want to recommend features, please open a Github Issue.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.