python中的双向固定效应模型
pytwowa的Python项目详细描述
Pytoway公司
python中的双向固定效应模型
要使用默认选项运行:
- 如果你有数据
frompytwowayimporttwfe_networkastn# 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 estimatord_net.run_cre()
- 如果你想模拟数据
- 项目
标签: