Git Product home page Git Product logo

gsynth's Introduction

gsynth

Lifecycle: stable License: MIT

gsynth implements the generalized synthetic control method, which imputes counterfactuals for each treated unit using control group information based on a linear interactive fixed effects model. This version supports unbalanced panels and implements the matrix completion method.

Authors: Yiqing Xu (Stanford), Licheng Liu (MIT)

Date: Feb 22, 2022

Repos: Github (1.2.1) CRAN (1.2.1)

Example: R code used in the tutorial can be downloaded from here.


Installation

You can install gsynth directly from CRAN by typing the following command in the R console:

install.packages('gsynth', type = 'source')

You can also install the development version of the package from Github by typing:

install.packages('devtools', repos = 'http://cran.us.r-project.org') # if not already installed
devtools::install_github('xuyiqing/gsynth')

gsynth depends on the following packages, which will be installed automatically when gsynth is being installed; you can also install them manually:

## for processing C++ code
require(Rcpp) 
## for plotting
require(ggplot2)  
require(GGally) 
## for parallel computing 
require(foreach)  
require(future)
require(doParallel) 
require(abind) 
require(lfe)

Notes on installation failures

  1. Quick solution: download a binary build (v.1.2.1), which does not require compilation, and install it from file in RStudio.
  2. Windows users please consider upgrading R to 4.0.0 or higher and installing the latest Rtools to avoid C++17 complier errors when installing fastplm.
  3. For Rcpp, RcppArmadillo and MacOS “-lgfortran” and “-lquadmath” error, click here for details.
  4. Installation failure related to OpenMP on MacOS, click here for a solution.
  5. To fix these issues, try installing gfortran 6.1 from here.
  6. Mac users who have updated to MacOS Big Sur will likely encounter compilation problems. See here for a potential solution.

Report bugs

Please report bugs to yiqingxu [at] stanford.edu with your sample code, data file, and a treatment status plot generated by panelview. Much appreciated!

gsynth's People

Contributors

xuyiqing avatar liulch avatar beniaminogreen 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.