Two way fixed effect models in python
Project description
pytwoway
Two way fixed effect models in python
To run using default options:
- If you have data
from pytwoway import twfe_network as tn
# data is labor data, formatting is 'long' or 'event study', and col_dict gives a dictionary of column names:
d_net = tn.twfe_network(data, formatting, col_dict)
# Convert long data into event study data (not necessary if the data is already in event study format):
d_net.refactor_es()
# Run the bias-corrected AKM estimator:
d_net.run_akm_corrected()
# Cluster firms based on their wage CDFs (required for the CRE estimator)
d_net.cluster()
# Run the CRE estimator
d_net.run_cre()
- If you want to simulate data
from pytwoway import twfe_network as tn
# Parameters are optional when simulating data:
d_net = tn.twfe_network()
# Convert long data into event study data (this is necessary for simulated data):
d_net.refactor_es()
# Run the bias-corrected AKM estimator:
d_net.run_akm_corrected()
# Cluster firms based on their wage CDFs (required for the CRE estimator)
d_net.cluster()
# Run the CRE estimator
d_net.run_cre()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytwoway-pkg-0.0.1.tar.gz
(20.8 kB
view details)
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 pytwoway-pkg-0.0.1.tar.gz.
File metadata
- Download URL: pytwoway-pkg-0.0.1.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72c0f0b68abcec9cf572aeb5b054f614c0febe2d9a318f99dd8d010ca6dd1e66
|
|
| MD5 |
fbe85f783cea1f8d7d1642d41815217b
|
|
| BLAKE2b-256 |
d63fbf531e8c814fe238f388bc65d689271ef214f62bed27c1ee80cc0a3d19fe
|
File details
Details for the file pytwoway_pkg-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pytwoway_pkg-0.0.1-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bb5828180368865ddc6d66f50e6cb374e08122741280505eaded6465009046f
|
|
| MD5 |
803b52f427efd8c7b99f31587b1b2a13
|
|
| BLAKE2b-256 |
d2551950b51a776e950d6e174aa712e87486f0c1801021e72e32fb3be648323f
|