Git Product home page Git Product logo

network_cluster's Introduction

This repository contains replication files for "Network Cluster-Robust Inference."

Coded for Python 3.9.7. Packages used: numpy (v1.20.3), pandas (v1.3.4), scipy (v1.7.1), networkx (v2.6.3), sklearn (v0.24.2), matplotlib (v3.4.3), seaborn (v0.11.2).

The following can be done in any order.

  • Run spectrum.py with make_plot=True to produce Figure 4 and images for Figure 1. Rerun with make_plot=False to produce Table 1.

  • Run design1_size.py to produce Table 2. Run design1_power.py and then plot_power_design1.py to produce Figure 5.

  • Download the Paluck et al. (2016) data from ICPSR, extract the contents, and then place the data file 37070-0001-Data.tsv into this directory. Run design2.py three times, one for each of network_model = 'RGG', 'RCM', 'config'. Then run tables_design2.py to produce Table 3.

    On the server I used, for RGG and RCM, design2.py completes in less than 24 hours with 32 cores (change the processes argument in the file to set number of cores). For config, I separated into two runs with num_schools=[1,2] and then num_schools=[4], with each completing in less than 24 hours.

  • Download the Zacchia (2020) data from the publisher's website. Extract contents into a folder in this directory called 'zacchia'. Run application.py to produce Figure 2 and 3.

network_cluster's People

Stargazers

Xin Zheng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.