Git Product home page Git Product logo

fect_python's Introduction

fect_python

Lifecycle: experimental License: MIT

Fixed effects counterfactual estimator (fect) based on rpy2. This is a package for implementing counterfactual estimators in panel fixed-effect settings. It is suitable for panel/TSCS analysis with binary treatments under (hypothetically) baseline randomization. It allows a treatment to switch on and off and limited carryover effects. It supports linear factor models—hence, a generalization of gsynth—and the matrix completion method.

Repo: GitHub (1.0.0)

Examples: The original R tutorial can be replicated in Python with this tutorial. You can also find a markdown version tutorial here

Reference: Licheng Liu, Ye Wang, Yiqing Xu (2021). A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data. American Journal of Political Science, conditionally accepted.

The original R package of fect can be found here: GitHub (1.0.0). This package is based on rpy2, which makes R objects available in Python environments.

Installation

You can install fect from github by the following command:

pip install git+https://github.com/xuyiqing/fect_python.git

Requirements

  • Python 3.7+
  • rpy2 3.5+
  • numpy 1.1+
  • pandas 1.1.2+

Although fect_python works on the latest version of rpy2, we strongly recommend installing rpy2 3.5.4 in case of potential conflits.

fect_python's People

Contributors

six-persimmon avatar xuyiqing 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.