Skip to content

Commit

Permalink
Merge pull request #42 from KennyZhang-17/main
Browse files Browse the repository at this point in the history
Update readthedoc, build all versions to python 3.12
  • Loading branch information
KennyZhang-17 authored Dec 1, 2024
2 parents 13e33ba + 4d9bea4 commit d66afa8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: paper/paper.pdf
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: sensemakr/docs/conf.py
Expand All @@ -18,6 +23,5 @@ formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.8
install:
- requirements: requirements_docs.txt
9 changes: 5 additions & 4 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ bibliography: paper.bib

# Summary

Regression analysis has been widely applied in modeling causal relationships of observational data. While observed confounders can be properly adjusted under mild assumptions, "no unobserved confounders" assumption is often not realistic for observational data. Therefore, scientific sensitivity analysis becomes key to make causal claims credible under observational study. @cinelli2020making proposes a suite of sensitivity analysis tools that extends the traditional omitted variable bias framework and makes it easier to understand the causal impact of omitted variables in regression models. Typical sensitivity questions in causal inference includes: how strong unobserved confounders need to be to overturn our research hypothesis, how robust are the results to all unobserved confounders acting together, possibly non-linearly. ``PySensemakr`` is a Python package to address these questions based on regression output without further model assumptions. `PySensemakr` is build upon the python package ``statsmodels``, which performs traditional regression analysis. ``Pysensemakr`` reports some key causal quantities based on the routine regression output and provides visualization and causal interpretation of these quantities. We suggest using ``Pysensemakr`` for routine reporting sensitivity analysis on regression methods to assist research on causal relationships between dependent varibale and independent variables.
Regression analysis has been widely applied in modeling causal relationships of observational data. While observed confounders can be properly adjusted under mild assumptions, the "no unobserved confounders" assumption is often not realistic for observational data. Therefore, scientific sensitivity analysis becomes the key to making causal claims credible under observational study. @cinelli2020making proposes a suite of sensitivity analysis tools that extend the traditional omitted variable bias framework and makes it easier to understand the causal impact of omitted variables in regression models. Typical sensitivity questions in causal inference include: how strong unobserved confounders need to be to overturn our research hypothesis, how robust are the results to all unobserved confounders acting together, possibly non-linearly. ``PySensemakr`` is a Python package to address these questions based on regression output without further model assumptions. ``PySensemakr`` is built on the Python package ``statsmodels``, which performs traditional regression analysis. ``Pysensemakr`` reports some key causal quantities based on the routine regression output and provides visualization and causal interpretation of these quantities. We suggest using ``Pysensemakr`` for routine reporting sensitivity analysis on regression methods to assist research on causal relationships between dependent and independent variables.

This package includes unit and integration tests made using the pytest framework. The repository containing the latest project code is integrated with continuous integration using Github Actions. Code coverage is monitored via codecov and is presently above 90%. The package website contains detailed description of methods in this package as well as a quick start guide and examples for users.
This package includes unit and integration tests made using the pytest framework. The repository containing the latest project code is integrated with continuous integration using Github Actions. Code coverage is monitored via codecov and is currently above 90%. The package website contains detailed description of methods in this package as well as a quick start guide and examples for users.



# Statement of Need

While regression is widely used in Python, to the best of the author’s knowledge, there is no sensitivity analysis tool in Python that builds upon the regression output, especially for causal interest. Most causal inference packages in Python rely on additional model assumptions and constraints that are complicated in nature. ``Pysensemakr`` provides an easy way to do sensitivity analysis based on regression output and provides causal interpretation, plots, tables for researchers to use without posing further model assumptions. The quick start guide on package website is very friendly to users who has few causal background.
While regression is widely used in Python, to the best of the author’s knowledge, there is no Python sensitivity analysis tool that builds on the regression output, especially for causal interest. Most causal inference packages in Python rely on additional model assumptions and constraints that are complicated in nature. ``Pysensemakr`` provides an easy way to do sensitivity analysis based on regression output and provides causal interpretation, plots, and tables for researchers to use without posing further model assumptions. The quick start guide on package website is very friendly to users who have few causal backgrounds.



# Methods
Expand Down Expand Up @@ -119,7 +120,7 @@ darfur_sense.plot(plot_type = 'extreme',sensitivity_of = 'estimate')



@cinelli2020making extends the traditional omitted variable bias (OVB) framework for sensitivity analysis using partial R2 representation. Based on this method, the package implements partial R2 of the treatment with the outcome, robustness value, bounds on the strength of confounding using observed covariates, multiple or non-linear confounders to quantify the strength of unobserved confounders that could potentially change the research conclusion. We provide example data of Darfur [@hazlett2020angry] to illustrate the usage of these methods and provide interpretation of each quantities in the package website. @cinelli2020sensemakr contains R and Stata version of the package and we use some implementation ideas from these packages.
@cinelli2020making extends the traditional omitted variable bias (OVB) framework for sensitivity analysis using a partial R2 representation. Based on this method, the package implements partial R2 of the treatment with the outcome, robustness value, bounds on the strength of confounding using observed covariates, multiple or nonlinear confounders to quantify the strength of unobserved confounders that could potentially change the research conclusion. We provide example data of Darfur [@hazlett2020angry] to illustrate the usage of these methods and provide an interpretation of each quantity in the package website. @cinelli2020sensemakr contains R and Stata versions of the package and we use some implementation ideas from these packages.



Expand Down

0 comments on commit d66afa8

Please sign in to comment.