Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytwoway-0.0.1.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytwoway-0.0.1-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file pytwoway-0.0.1.tar.gz.

File metadata

  • Download URL: pytwoway-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.48.2 CPython/3.6.8

File hashes

Hashes for pytwoway-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9cfaad3534d35055c38c8cdeae74ceaf90e9ce5548d11472e05a84050025f9a9
MD5 fc48a7b1c969720f4eed90b236a7203d
BLAKE2b-256 108da75330b006e56730fa2b669f951761e90c1d4d1281d1c58c6f45baf11454

See more details on using hashes here.

File details

Details for the file pytwoway-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pytwoway-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 26.7 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.48.2 CPython/3.6.8

File hashes

Hashes for pytwoway-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bcc81365613cbdc1b1c85e2a6bc7daad2a688802b1f7cb1df477c54eb0a0f667
MD5 74df4ef8a64544be853e46e4c3babc72
BLAKE2b-256 523373a7133ff9f40ec475b4179e131178c6b90dbd23b85e8ad6117ce046c2c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page