Giter Club home page Giter Club logo

gsynth's Introduction

gsynth

Generalized Synthetic Control Method


Authors: Yiqing Xu [[email protected]]; Licheng Liu [[email protected]]

How to Uses: Examples

Reference: Yiqing Xu. 2017. "Generalized Synthetic Control Method: Causal Inference with Interactive Fixed Effects Models." Political Analysis, Vol. 25, Iss. 1, January 2017, pp. 57-76.

gsynth's People

Contributors

xuyiqing avatar

Stargazers

Diana Da In Lee avatar Evânio Marques avatar

Watchers

James Cloos avatar CRAN robot avatar  avatar

gsynth's Issues

Error when r* = 0

In gsynth, when r is 0 (either by user selection or CV) I get the following error:

Error in `rownames<-`(`*tmp*`, value = iname[which(out$tr == 1)]) :
  attempt to set 'rownames' on an object with no dimensions

The error comes from the following lines (800-803) in gsynth.R:

if (!is.null(out$alpha.tr)) {
        rownames(out$alpha.tr) <- iname[which(out$tr == 1)]
        colnames(out$alpha.tr) <- ""
    }

To reproduce:

data(gsynth)
out <- gsynth(Y ~ D + X1 + X2, data = simdata, index = c("id","time"), force = "two-way", CV = FALSE, r = 0, se = TRUE, inference = "parametric", nboots = 1000, parallel = FALSE)

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.