ikleni / spilled_t

Code for 'Treatment and Spillover Effects Under Network Interference'

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository contains code for the empirical application and simulation experiments in Leung (2019), "Treatment and Spillover Effects Under Network Interference."

Dependencies: numpy, pandas, scipy, networkx, snap.

Coded for Python 2.7.

The folder 'empirical_application' contains code for the empirical application. These files produce Table 1 in the text. The folder 'data' contains data for the empirical application. These are generated by 'construct_dataset.py'. The folder 'sims' contains files for the simulation experiments. These files produce Tables 2 and 3 in the text.

Contents:

  • monte_carlo.py: simulate data, compute estimates and standard errors, output tables.
  • functions.py: functions used in monte_carlo.py and estimation.py.
  • construct_dataset.py: reshape data files of Cai et al. (2015) into a more convenient format.
  • estimation.py: empirical application.

To run the simulations, execute monte_carlo.py. The output is stored in a file 'results.txt' in the 'sims' folder.

To run the empirical application, execute estimation.py. Output is placed in a file 'results.txt' in the 'empirical_application' folder. To generate the files in the 'data' folder, first download the Cai et al. (2015) data from AEAweb and extract the contents, which should generate a new folder called 'data' which itself contains a 'data' and 'do' folder and readme file. Move these contents to a new folder named 'cai_data' in the empirical_application folder. Run the do file 'rawnet.do' from the extracted 'do' folder. Then run construct_dataset.py.

About

Code for 'Treatment and Spillover Effects Under Network Interference'

License:MIT License


Languages

Language:Python 100.0%