Skip to content

Instantly share code, notes, and snippets.

@jiaweih
Last active December 9, 2017 14:21
Show Gist options
  • Save jiaweih/9498f6caae96b7ee374b8cfb304c1695 to your computer and use it in GitHub Desktop.
Save jiaweih/9498f6caae96b7ee374b8cfb304c1695 to your computer and use it in GitHub Desktop.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Scalar"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ S = SEV*(RR(max) - 1) + 1 $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### risk-acause specific PAF:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ PAF = 1 - \\frac{1}{S} $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## SEV"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> Since vaccination is a dichotomous risk factor, so the SEV of non-vaccinated is calculated as 1 - vaccine coverage."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## RR(max)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* Since vaccination is a dichotomous risk factor, so the RR(max) of non-vaccinated is equivalent to RR. \n",
"* Simulate 1000 draws of coefficients based on normal distribution using coefficients provided. \n",
"* Convert draws of coefficients to draws of RR based on the formula below depending on modeler's methods and results for each cause."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## (diptheria, dtp3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### inputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* exposure (1 - sev) of dtp3: /ihme/forecasting/data/vaccine_coverage/coverage/best/dtp3_draws.h5 (from Mollie)\n",
"* coefficients: one set of coefficient and standard error\n",
" * /ihme/forecasting/data/vaccine_coverage/scalars/inputs/diptheria_vaccine_coef.csv (from Hmwe (Diphtheria negative binomial model), formatted by Jiawei)\n",
" * DTP3_coverage_prop = proportion vaccinated with DTP3\n",
" * age_group_id = GBD 2015 age group ids"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### formula"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ RR = \\frac{1}{e^{coeff}} $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### outputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- pafs: /ihme/forecasting/data/paf/best/risk_acause\\_specific/{acause}\\_{risk}_{sex_id}.hdf\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## (measles, measles)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### inputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* exposure (1 - sev) of measles: /ihme/forecasting/data/vaccine_coverage/coverage/best/measles_draws.h5 (from Mollie)\n",
"* coefficients: one set of coefficient and standard error\n",
" * /ihme/forecasting/data/vaccine_coverage/scalars/inputs/measles_vaccine_coef.csv (from Hmwe (Measles incidence model), formatted by Jiawei)\n",
" * ln_unvacc = proportion unvaccinated with measles vaccine (log transformed)\n",
" * supp_lagX = supplementary vaccination coverage lagged by X year"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### formula"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ R = e^{e^{coeff}} $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### outputs"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"* pafs: /ihme/forecasting/data/paf/best/risk_acause\\_specific/{acause}\\_{risk}_{sex_id}.hdf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## (whooping, dtp3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### inputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* exposure (1 - sev) of dtp3: /ihme/forecasting/data/vaccine_coverage/coverage/best/dtp3_draws.h5 (from Mollie)\n",
"* coefficients: one set of coefficient and standard error\n",
" * /ihme/forecasting/data/vaccine_coverage/scalars/inputs/whooping_vaccine_coef.csv (from Hmwe (Pertussis incidence model), formatted by Jiawei)\n",
" * ln_unvacc= proportion unvaccinated with DTP3 (log transformed)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### formula"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ R = e^{e^{coeff}} $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### outputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* pafs: /ihme/forecasting/data/paf/best/risk_acause\\_specific/{acause}\\_{risk}_{sex_id}.hdf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## (lri_hib, dtp3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### inputs"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"* exposure (1 - sev) of dtp3: /ihme/forecasting/data/vaccine_coverage/coverage/best/dtp3_draws.h5 (from Mollie)\n",
"* coefficients: one set of (effect size, effect lower, effect upper)\n",
" * /ihme/forecasting/data/vaccine_coverage/scalars/inputs/hib_effect_size.xlsx (from Chris Troeger, formatted by Jiawei)\n",
" * The Hib file provides the vaccine effectiveness of the Hib vaccine against all pneumonia. These numbers are the same by age, geography, and time."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### formula"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ RR = \\frac{1}{1-effectsize} $$"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"### outputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* pafs: /ihme/forecasting/data/paf/best/risk_acause\\_specific/{acause}\\_{risk}_{sex_id}.hdf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## (lri_pneumo, PCV)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"### inputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* exposure (1 - sev) of PCV: /ihme/forecasting/data/vaccine_coverage/coverage/best/pcv_draws.h5 (from Mollie)\n",
"* coefficients: one set of (effect size, lower, upper) for PCV7/PCV10/PCV13\n",
" * /ihme/forecasting/data/vaccine_coverage/scalars/inputs/pcv_effect.xlsx (from Chris Troeger)\n",
"* PCV type info: /ihme/forecasting/data/vaccine_coverage/scalars/inputs/pcv_introduction_supplementary_info.xlsx"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"### formula"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ RR = \\frac{1}{1-effectsize} $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* There are three types of PCV vaccine(7/10/13), most countries have at least one type vaccinated. For countries that \n",
" do not have information, use coefficients of PCV10."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### outputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* pafs: /ihme/forecasting/data/paf/best/risk_acause\\_specific/{acause}\\_{risk}_{sex_id}.hdf"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## (diarrhea_rotavirus, rota)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### inputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* exposure (1 - sev) of rota: /ihme/forecasting/data/vaccine_coverage/coverage/best/rota_draws.h5 (from Mollie)\n",
"* coefficients: age-specific odds ratios and standard errors\n",
" * /ihme/forecasting/data/vaccine_coverage/scalars/inputs/rotavirus_odds_ratios.xlsx (from Chris Troeger, formatted by Jiawei)\n",
" * The rotavirus file provides the odds ratio of diarrhea given rotavirus in a stool sample, by age. These numbers are the same by geography and time."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### formula"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"odds ratio is relative risk"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### outputs"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"* pafs: /ihme/forecasting/data/paf/best/risk_acause\\_specific/{acause}\\_{risk}_{sex_id}.hdf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## (tetanus, dtp3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### inputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* exposure (1 - sev) of dtp3: /ihme/forecasting/data/vaccine_coverage/coverage/best/dtp3_draws.h5 (from Mollie)\n",
"* coefficients: age-specific, country-specific, sex-specific coefficients and standard errors\n",
" * /ihme/forecasting/data/vaccine_coverage/scalars/inputs/submodel_coeffs_err_only_log.csv\n",
" * Based on model_version_id, different demographies have different coefficents.\n",
" * Demography information can be obtained from database cod-dbsnapshot-d01, table model_version"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### formula"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ R = e^{{coeff}} $$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### outputs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* pafs: /ihme/forecasting/data/paf/best/risk_acause\\_specific/{acause}\\_{risk}_{sex_id}.hdf"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment