Skip to main content

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()

Metadata

Release files for pytwoway-pkg 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytwoway-pkg 0.0.1
File Size Uploaded Provenance
pytwoway-pkg-0.0.1.tar.gz 20.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pytwoway-pkg 0.0.1
File Interpreter ABI Platform
pytwoway_pkg-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 47.5 kB

Release files / pytwoway-pkg-0.0.1.tar.gz

Download URL pytwoway-pkg-0.0.1.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
72c0f0b68abcec9cf572aeb5b054f614c0febe2d9a318f99dd8d010ca6dd1e66
BLAKE2b-256 checksum
How to use checksums
d63fbf531e8c814fe238f388bc65d689271ef214f62bed27c1ee80cc0a3d19fe
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pytwoway_pkg-0.0.1-py3-none-any.whl

Download URL pytwoway_pkg-0.0.1-py3-none-any.whl
Size 26.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bb5828180368865ddc6d66f50e6cb374e08122741280505eaded6465009046f
BLAKE2b-256 checksum
How to use checksums
d2551950b51a776e950d6e174aa712e87486f0c1801021e72e32fb3be648323f
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for pytwoway-pkg 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page