Oaxaca Blinder decomposition
Project description
oaxaca
- Github repository: https://github.com/anhqle/oaxaca/
- Documentation https://anhqle.github.io/oaxaca/
The Oaxaca-Blinder decomposition is a statistical method used to explain the difference in outcomes between two groups by decomposing it into:
- A part that is "explained" by differences in group predictor
- A part that remains "unexplained"
For example, the gender wage gap can be partly "explained" by the difference in education and work experience between men and women. The remaining "unexplained" part is typically considered discrimination.
For a methodological review, see Jann (2008) and Fortin et al. (2011).
Why use this package?
If possible, you should use the Stata package oaxaca, which is the most feature-rich implementation (Jann, 2008). If you can't, existing implementations in R and Python are lacking:
- The R
oaxacapackage does not permit more than 1 categorical variable (discussion) - The Python implementation in
statsmodelsonly decomposes into the explained and unexplained part, without a "detailed decomposition" into the contribution of each predictor
For industry data science work, these limitations are prohibitive. This package thus fills in the gap by providing:
- As table stakes, two-fold and three-fold decomposition, with detailed decomposition for each predictor
- Multiple ways to deal with the "omitted base category problem" (see below)
- Automatic handling of the case when the two groups don't have a common support. For example, some occupations may only exist in 1975 and not 2025, and vice versa
- Rich HTML table output
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oaxaca-1.0.3.tar.gz.
File metadata
- Download URL: oaxaca-1.0.3.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54dc6c14008bbcec76cdf22748950bc0380f07f82f601e6eac05538d327493b8
|
|
| MD5 |
7e6aa4f4ee526e4f70673dbc6e12ca25
|
|
| BLAKE2b-256 |
03af4f7a670c8a4a2c9a72102e6a0385adebbe85220f38e1c9d8925d78e40115
|
File details
Details for the file oaxaca-1.0.3-py3-none-any.whl.
File metadata
- Download URL: oaxaca-1.0.3-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16d3864d83937cd63bc4a29884ff342d23f1ab8300b8cc5a45160434ef3e50f5
|
|
| MD5 |
02f2c0fa92c6ff88bc44cf27b2f311df
|
|
| BLAKE2b-256 |
505d86a56f5359a52044ade6fbc3b4d904830cdf1aeeb6829130689e11401f5e
|