Giter Club home page Giter Club logo

schengen's Introduction

schengen

Code for the paper "Retrospective causal inference via matrix completion, with an evaluation of the effect of European integration on labour market outcomes."

Microdata access

The data used for the paper is constructed from European Labour Force Survey (ELFS) microdata, which requires access from Eurostat.

Instructions on how to gain access to the microdata is found here.

After obtaining the microdata, follow the commands in BUILDING DATA.do for constructing the dataset FINAL_21..

Prerequsites

  • R >= 3.5.0 (tested on 3.6.3)

  • package-list.R # required R packages

Install the forked MCPanel repo:

install.packages("devtools")
library(devtools) 
install_github("jvpoulos/MCPanel")

Note: fitting the matrix completion model with covariates (mcnnm_wc_cv) is computationally expensive and will likely make a laptop crash. The code below is run on a single node with 30G RAM and 6 CPU-cores on a high-performance compute cluster.

Create folders to store outputs:

mkdir data
mkdir results
mkdir plots

The file FINAL_21.dta is needed for steps 1-7 and should be in the data/ directory.

Run order

  1. mc-simulation.R # simulated data experiments

    • run with command line argument Rscript mc-simulation.R [arg1], where [arg1] is a number specifying the simulation setting
    • mc-simulation-plot.R # plot matrix completion simulation study results
  2. schengen_MCM_data.R # prepare data for analyses

  3. mc-simulation-placebo.R # placebo tests experiments on cross-border worker data

    • run with command line argument Rscript mc-simulation-placebo.R [arg1], where [arg1] is a number specifying the simulation setting
    • mc-simulation-placebo-plot.R # plot placebo test results
  4. mc-placebo.R # placebo test of null hypothesis

  5. Schengen_MCM.R # fit model with covariates

    • mc-plot.R # plot estimates
  6. Schengen_Compare.R # DID, SCM, and IFE estimates for comparison

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.