2 Star 0 Fork 0

计量经济学/Causal inference in Python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

Causal Inference in Python

Causal Inference in Python, or Causalinference in short, is a software package that implements various statistical and econometric methods used in the field variously known as Causal Inference, Program Evaluation, or Treatment Effect Analysis.

Work on Causalinference started in 2014 by Laurence Wong as a personal side project. It is distributed under the 3-Clause BSD license.

Important Links

The official website for Causalinference is

https://causalinferenceinpython.org

The most current development version is hosted on GitHub at

https://github.com/laurencium/causalinference

Package source and binary distribution files are available from PyPi at

https://pypi.python.org/pypi/causalinference

For an overview of the main features and uses of Causalinference, please refer to

https://github.com/laurencium/causalinference/blob/master/docs/tex/vignette.pdf

A blog dedicated to providing a more detailed walkthrough of Causalinference and the econometric theory behind it can be found at

https://laurencewong.com/software/

Main Features

  • Assessment of overlap in covariate distributions
  • Estimation of propensity score
  • Improvement of covariate balance through trimming
  • Subclassification on propensity score
  • Estimation of treatment effects via matching, blocking, weighting, and least squares

Dependencies

  • NumPy: 1.8.2 or higher
  • SciPy: 0.13.3 or higher

Installation

Causalinference can be installed using pip:

$ pip install causalinference

For help on setting up Pip, NumPy, and SciPy on Macs, check out this excellent guide.

Minimal Example

The following illustrates how to create an instance of CausalModel:

>>> from causalinference import CausalModel
>>> from causalinference.utils import random_data
>>> Y, D, X = random_data()
>>> causal = CausalModel(Y, D, X)

Invoking help on causal at this point should return a comprehensive listing of all the causal analysis tools available in Causalinference.

Copyright (C) 2015, Laurence Wong All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

Causal Inference in Python 展开 收起
Python
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/econometric/causal-inference-in-python.git
git@gitee.com:econometric/causal-inference-in-python.git
econometric
causal-inference-in-python
Causal inference in Python
master

搜索帮助