rddensity, lpdensity无法安装?那就手动安装

发布时间:2021-01-19 阅读 4694

Stata连享会   主页 || 视频 || 推文 || 知乎


???? lianxh 命令发布了:
随时搜索连享会推文、Stata 资源,安装命令如下:
. ssc install lianxh
使用详情参见帮助文件 (有惊喜):
. help lianxh

介绍

手动安装 rddensity, lpdensity 等命令的最新版。该命令用于 RDD 分析中的 数据操控平滑性 检验。

手动安装

在 Stata 内部通过 ssc installgithub install 经常无法安装该命令。但我们可以手动安装。下面以 rddesity 命令为例进行说明,lpdensity 的安装方式相似。

rddensity 的安装

  • 打开 https://gitee.com/arlionn/rddensity,点击橙色按钮【克隆/下载】,页面会自动下载仓库压缩包【arlionn-rddensity-master.zip】
  • 解压【arlionn-rddensity-master.zip】,假设存储路径为【D:_下载临时文件\arlionn-rddensity-master】
  • 在 Stata 命令窗口输入如下命令,安装:
. net install rddesity , from(D:\_下载临时文件\arlionn-rddensity-master\rddensity\stata)
  • ok,输入 which rddensity 查看版本信息;输入 help rddensity 查看帮助文件。

lpdensity 的安装

按上述方式下载 https://gitee.com/arlionn/lpdensity 仓库后,解压,然后执行如下命令 (可能需要酌情修改路径):

. net install lpdensity, from(D:\_下载临时文件\arlionn-lpdensity-master\lpdensity\stata)



附:rddensity 简介

源自:help rddensity

Description

rddensity implements manipulation testing procedures using the local polynomial density estimators proposed in Cattaneo, Jansson and Ma (2020a), and implements graphical procedures with valid confidence bands using the results in Cattaneo, Jansson and Ma (2020b). In addition, the command provides complementary manipulation testing based on finite sample exact binomial testing following the results in Cattaneo, Frandsen and Titiunik (2015) and Cattaneo, Frandsen and Vazquez-Bare (2017). For an introduction to manipulation testing see McCrary (2008).

A detailed introduction to this Stata command is given in Cattaneo, Jansson and Ma (2018). Companion R functions are also available here.

Companion function is rdbwdensity. For graphical procedures, the lpdensity package is required.

Related Stata and R packages useful for inference in regression discontinuity (RD) designs are described in the following website:

https://rdpackages.github.io/

References

  • Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2018. On the Effect of Bias Estimation on Coverage Accuracy in Nonparametric Inference. Journal of the American Statistical Association 113(522): 767-779.
  • Calonico, S., M. D. Cattaneo, and M. H. Farrell. 2020. Coverage Error Optimal Confidence Intervals for Local Polynomial Regression. Working paper.
  • Cattaneo, M. D., B. Frandsen, and R. Titiunik. 2015. Randomization Inference in the Regression Discontinuity Design: An Application to the Study of Party Advantages in the U.S. Senate. Journal of Causal Inference 3(1): 1-24.
  • Cattaneo, M. D., M. Jansson, and X. Ma. 2018. Manipulation Testing based on Density Discontinuity. Stata Journal 18(1): 234-261.
  • Cattaneo, M. D., M. Jansson, and X. Ma. 2020a. Simple Local Polynomial Density Estimators. Journal of the American Statistical Association 115(531): 1449-1455.
  • Cattaneo, M. D., M. Jansson, and X. Ma. 2020b. Local Regression Distribution Estimators. Working paper.
  • Cattaneo, M. D., Michael Jansson, and Xinwei Ma. 2020c. lpdensity: Local Polynomial Density Estimation and Inference. Working paper.
  • Cattaneo, M. D., Titiunik, R. and G. Vazquez-Bare. 2017. Comparing Inference Approaches for RD Designs: A Reexamination of the Effect of Head Start on Child Mortality. Journal of Policy Analysis and Management 36(3): 643-681.
  • McCrary, J. 2008. Manipulation of the Running Variable in the Regression Discontinuity Design: A Density Test. Journal of Econometrics 142(2): 698-714.

Authors

  • Matias D. Cattaneo, Princeton University, Princeton, NJ. cattaneo@princeton.edu.
  • Michael Jansson, University of California Berkeley, Berkeley, CA. mjansson@econ.berkeley.edu.
  • Xinwei Ma, University of California San Diego, La Jolla, CA. x1ma@ucsd.edu.

相关课程

连享会-直播课 上线了!
http://lianxh.duanshu.com

免费公开课:


课程一览

支持回看

专题 嘉宾 直播/回看视频
最新专题 因果推断, 空间计量,寒暑假班等
数据清洗系列 游万海 直播, 88 元,已上线
研究设计 连玉君 我的特斯拉-实证研究设计-幻灯片-
面板模型 连玉君 动态面板模型-幻灯片-
面板模型 连玉君 直击面板数据模型 [免费公开课,2小时]

Note: 部分课程的资料,PPT 等可以前往 连享会-直播课 主页查看,下载。


关于我们

  • Stata连享会 由中山大学连玉君老师团队创办,定期分享实证分析经验。直播间 有很多视频课程,可以随时观看。
  • 连享会-主页知乎专栏,400+ 推文,实证分析不再抓狂。
  • 公众号关键词搜索/回复 功能已经上线。大家可以在公众号左下角点击键盘图标,输入简要关键词,以便快速呈现历史推文,获取工具软件和数据下载。常见关键词:课程, 直播, 视频, 客服, 模型设定, 研究设计, stata, plus, 绘图, 编程, 面板, 论文重现, 可视化, RDD, DID, PSM, 合成控制法

连享会主页  lianxh.cn
连享会主页 lianxh.cn

连享会小程序:扫一扫,看推文,看视频……

扫码加入连享会微信群,提问交流更方便

✏ 连享会学习群-常见问题解答汇总:
https://gitee.com/arlionn/WD

New! lianxh 命令发布了:
随时搜索连享会推文、Stata 资源,安装命令如下:
. ssc install lianxh
使用详情参见帮助文件 (有惊喜):
. help lianxh