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 hashes)
Built Distribution
Close
Hashes for pytwoway_pkg-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bb5828180368865ddc6d66f50e6cb374e08122741280505eaded6465009046f |
|
MD5 | 803b52f427efd8c7b99f31587b1b2a13 |
|
BLAKE2b-256 | d2551950b51a776e950d6e174aa712e87486f0c1801021e72e32fb3be648323f |