{"id":33246851,"url":"https://github.com/pzivich/zEpid","last_synced_at":"2025-11-21T15:02:40.404Z","repository":{"id":45166748,"uuid":"106410048","full_name":"pzivich/zEpid","owner":"pzivich","description":"Epidemiology analysis package","archived":false,"fork":false,"pushed_at":"2023-05-07T22:07:24.000Z","size":11413,"stargazers_count":148,"open_issues_count":48,"forks_count":32,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-31T00:56:58.586Z","etag":null,"topics":["aipw","data-science","epidemiology","epidemiology-analysis","g-computation","g-estimation","g-formula","incidence-rate-ratio","inverse-probability-weights","ipw","odds-ratio","risk-difference","risk-ratio","targeted-maximum-likelihood","tmle"],"latest_commit_sha":null,"homepage":"http://zepid.readthedocs.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pzivich.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-10-10T11:47:47.000Z","updated_at":"2025-08-27T11:54:23.000Z","dependencies_parsed_at":"2022-09-18T19:01:18.458Z","dependency_job_id":"918068f2-c681-4914-b616-c1ce74ebf10e","html_url":"https://github.com/pzivich/zEpid","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/pzivich/zEpid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzivich%2FzEpid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzivich%2FzEpid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzivich%2FzEpid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzivich%2FzEpid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pzivich","download_url":"https://codeload.github.com/pzivich/zEpid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzivich%2FzEpid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285636559,"owners_count":27205878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aipw","data-science","epidemiology","epidemiology-analysis","g-computation","g-estimation","g-formula","incidence-rate-ratio","inverse-probability-weights","ipw","odds-ratio","risk-difference","risk-ratio","targeted-maximum-likelihood","tmle"],"created_at":"2025-11-16T21:00:38.982Z","updated_at":"2025-11-21T15:02:40.399Z","avatar_url":"https://github.com/pzivich.png","language":"Python","funding_links":[],"categories":["Toolboxes - Environment"],"sub_categories":[],"readme":"![zepid](docs/images/zepid_logo.png)\n# zEpid\n\n[![PyPI version](https://badge.fury.io/py/zepid.svg)](https://badge.fury.io/py/zepid)\n[![DOI](https://zenodo.org/badge/106410048.svg)](https://zenodo.org/badge/latestdoi/106410048)\n[![Python package](https://github.com/pzivich/zEpid/actions/workflows/python-package.yml/badge.svg)](https://github.com/pzivich/zEpid/actions/workflows/python-package.yml)\n[![Documentation Status](https://readthedocs.org/projects/zepid/badge/?version=latest)](https://zepid.readthedocs.io/en/latest/?badge=latest)\n[![Join the chat at https://gitter.im/zEpid/community](https://badges.gitter.im/zEpid/community.svg)](https://gitter.im/zEpid/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nzEpid is an epidemiology analysis package, providing easy to use tools for epidemiologists coding in Python 3.5+. The \npurpose of this library is to provide a toolset to make epidemiology e-z. A variety of calculations and plots can be \ngenerated through various functions. For a sample walkthrough of what this library is capable of, please look at the \ntutorials available at https://github.com/pzivich/Python-for-Epidemiologists\n\nA few highlights: basic epidemiology calculations, easily create functional form assessment plots, \neasily create effect measure plots, and causal inference tools. Implemented estimators include; inverse \nprobability of treatment weights, inverse probability of censoring weights, inverse probabilitiy of missing weights, \naugmented inverse probability of treatment weights, time-fixed g-formula, Monte Carlo g-formula, Iterative conditional \ng-formula, and targeted maximum likelihood (TMLE). Additionally, generalizability/transportability tools are available \nincluding; inverse probability of sampling weights, g-transport formula, and doubly robust \ngeneralizability/transportability formulas.\n\nIf you have any requests for items to be included, please contact me and I will work on adding any requested features. \nYou can contact me either through GitHub (https://github.com/pzivich), email (gmail: zepidpy), or twitter (@zepidpy).\n\n# Installation\n\n## Installing:\nYou can install zEpid using `pip install zepid`\n\n## Dependencies:\npandas \u003e= 0.18.0, numpy, statsmodels \u003e= 0.7.0, matplotlib \u003e= 2.0, scipy, tabulate\n\n# Module Features\n\n## Measures\nCalculate measures directly from a pandas dataframe object. Implemented measures include; risk ratio, risk difference, \nodds ratio, incidence rate ratio, incidence rate difference, number needed to treat, sensitivity, specificity, \npopulation attributable fraction, attributable community risk\n\nMeasures can be directly calculated from a pandas DataFrame object or using summary data.\n\nOther handy features include; splines, Table 1 generator, interaction contrast, interaction contrast ratio, positive \npredictive value, negative predictive value, screening cost analyzer, counternull p-values, convert odds to \nproportions, convert proportions to odds\n\nFor guided tutorials with Jupyter Notebooks:\nhttps://github.com/pzivich/Python-for-Epidemiologists/blob/master/3_Epidemiology_Analysis/a_basics/1_basic_measures.ipynb\n\n## Graphics\nUses matplotlib in the background to generate some useful plots. Implemented plots include; functional form assessment \n(with statsmodels output), p-value function plots, spaghetti plot, effect measure plot (forest plot), receiver-operator \ncurve, dynamic risk plots, and L'Abbe plots\n\nFor examples see:\nhttp://zepid.readthedocs.io/en/latest/Graphics.html\n\n## Causal\nThe causal branch includes various estimators for causal inference with observational data. Details on currently \nimplemented estimators are below:\n\n### G-Computation Algorithm\nCurrent implementation includes; time-fixed exposure g-formula, Monte Carlo g-formula, and iterative conditional \ng-formula\n\n### Inverse Probability Weights \nCurrent implementation includes; IP Treatment W, IP Censoring W, IP Missing W. Diagnostics are also available for IPTW. \nIPMW supports monotone missing data\n\n### Augmented Inverse Probability Weights\nCurrent implementation includes the augmented-IPTW estimator described by Funk et al 2011 AJE\n\n### Targeted Maximum Likelihood Estimator\nTMLE can be estimated through standard logistic regression model, or through user-input functions. Alternatively, users \ncan input machine learning algorithms to estimate probabilities. Supported machine learning algorithms include `sklearn`\n\n### Generalizability / Transportability\nFor generalizing results or transporting to a different target population, several estimators are available. These \ninclude inverse probability of sampling weights, g-transport formula, and doubly robust formulas\n\nTutorials for the usage of these estimators are available at:\nhttps://github.com/pzivich/Python-for-Epidemiologists/tree/master/3_Epidemiology_Analysis/c_causal_inference\n\n#### G-estimation of Structural Nested Mean Models\nSingle time-point g-estimation of structural nested mean models are supported.\n\n## Sensitivity Analyses\nIncludes trapezoidal distribution generator, corrected Risk Ratio\n\nTutorials are available at:\nhttps://github.com/pzivich/Python-for-Epidemiologists/tree/master/3_Epidemiology_Analysis/d_sensitivity_analyses\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpzivich%2FzEpid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpzivich%2FzEpid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpzivich%2FzEpid/lists"}