用Stata处理RDD断点回归

2018-08-22 MedSci MedSci原创

断点回归设计RDD是当前最热门的因果推断计量方法,最主要的原因在于它的透明性和强因果识别性,里面的每一步都可以成功运行出来 gen y = outcome // 结果变量 gen d = running>0 // 处理变量(0/1种类) gen v = running // 分配变量或参考变量 gen vd = v*d // 交互项 local i=1

断点回归设计RDD是当前最热门的因果推断计量方法,最主要的原因在于它的透明性和强因果识别性,里面的每一步都可以成功运行出来 gen y = outcome // 结果变量 gen d = running>0 // 处理变量(0/1种类) gen v = running // 分配变量或参考变量 gen vd = v*d // 交互项 local i=1 forvalues i=2/4 { gen v`i'=v^`i' gen v`i'd=v`i'*d } // 产生分配变量的三次方、四次方和他们与处理变量的交互项 qui tab year, gen(dyear) // 如果在面板数据中,想要控制年份可以产生虚拟变量 gen pop2 = pop^2 // 将来用在回归中作为协变量,pop的平方项 ———————————————— ************************************* *图形识别,提供三种方式 ************************************* **1.结果变量是不是在断点处跳跃--------- global size

版权声明:
本网站所有内容来源注明为“梅斯医学”或“MedSci原创”的文字、图片和音视频资料,版权均属于梅斯医学所有。非经授权,任何媒体、网站或个人不得转载,授权转载时须注明来源为“梅斯医学”。其它来源的文章系转载文章,或“梅斯号”自媒体发布的文章,仅系出于传递更多信息之目的,本站仅负责审核内容合规,其内容不代表本站立场,本站不负责内容的准确性和版权。如果存在侵权、或不希望被转载的媒体或个人可与我们联系,我们将立即进行删除处理。
在此留言
评论区 (4)
#插入话题
  1. [GetPortalCommentsPageByObjectIdResponse(id=340780, encodeId=4a7d340e8069, content=了解一下, beContent=null, objectType=article, channel=null, level=null, likeNumber=56, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=https://wx.qlogo.cn/mmopen/NUyjXTCJjo6KcicAVC1MwuOgo3iaicb1Imgk1yIfnvr6oXzibcAFB6puAyNJXbzWhNuLqaFYBVRWjh7rghkvFLPxMAfD5ib3nXwVD/0, createdBy=bed21972958, createdName=wxl882001, createdTime=Sat Aug 25 20:51:11 CST 2018, time=2018-08-25, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466061, encodeId=0e6d14660614b, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=42, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=2920, encryptionId=217c292009, topicName=ATA)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=387a6772119, createdName=bbjsj_1981, createdTime=Fri Aug 24 07:39:00 CST 2018, time=2018-08-24, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487415, encodeId=6e43148e41588, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=34, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=16760, encryptionId=7cea16e605a, topicName=stata)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=e76d8309257, createdName=李研东, createdTime=Fri Aug 24 07:39:00 CST 2018, time=2018-08-24, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=340174, encodeId=8fcd3401e404, content=学习学习好, beContent=null, objectType=article, channel=null, level=null, likeNumber=70, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKibA62IFMeUJEmSyIe8DvYFeERuOsfrRd8iano7nENqQU1dRR3tqeQOUL3eqgYgEZRT2t2iaEsib0JEw/132, createdBy=66771693911, createdName=易水河, createdTime=Wed Aug 22 16:48:20 CST 2018, time=2018-08-22, status=1, ipAttribution=)]
    2018-08-25 wxl882001

    了解一下

    0

  2. [GetPortalCommentsPageByObjectIdResponse(id=340780, encodeId=4a7d340e8069, content=了解一下, beContent=null, objectType=article, channel=null, level=null, likeNumber=56, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=https://wx.qlogo.cn/mmopen/NUyjXTCJjo6KcicAVC1MwuOgo3iaicb1Imgk1yIfnvr6oXzibcAFB6puAyNJXbzWhNuLqaFYBVRWjh7rghkvFLPxMAfD5ib3nXwVD/0, createdBy=bed21972958, createdName=wxl882001, createdTime=Sat Aug 25 20:51:11 CST 2018, time=2018-08-25, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466061, encodeId=0e6d14660614b, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=42, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=2920, encryptionId=217c292009, topicName=ATA)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=387a6772119, createdName=bbjsj_1981, createdTime=Fri Aug 24 07:39:00 CST 2018, time=2018-08-24, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487415, encodeId=6e43148e41588, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=34, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=16760, encryptionId=7cea16e605a, topicName=stata)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=e76d8309257, createdName=李研东, createdTime=Fri Aug 24 07:39:00 CST 2018, time=2018-08-24, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=340174, encodeId=8fcd3401e404, content=学习学习好, beContent=null, objectType=article, channel=null, level=null, likeNumber=70, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKibA62IFMeUJEmSyIe8DvYFeERuOsfrRd8iano7nENqQU1dRR3tqeQOUL3eqgYgEZRT2t2iaEsib0JEw/132, createdBy=66771693911, createdName=易水河, createdTime=Wed Aug 22 16:48:20 CST 2018, time=2018-08-22, status=1, ipAttribution=)]
    2018-08-24 bbjsj_1981
  3. [GetPortalCommentsPageByObjectIdResponse(id=340780, encodeId=4a7d340e8069, content=了解一下, beContent=null, objectType=article, channel=null, level=null, likeNumber=56, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=https://wx.qlogo.cn/mmopen/NUyjXTCJjo6KcicAVC1MwuOgo3iaicb1Imgk1yIfnvr6oXzibcAFB6puAyNJXbzWhNuLqaFYBVRWjh7rghkvFLPxMAfD5ib3nXwVD/0, createdBy=bed21972958, createdName=wxl882001, createdTime=Sat Aug 25 20:51:11 CST 2018, time=2018-08-25, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466061, encodeId=0e6d14660614b, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=42, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=2920, encryptionId=217c292009, topicName=ATA)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=387a6772119, createdName=bbjsj_1981, createdTime=Fri Aug 24 07:39:00 CST 2018, time=2018-08-24, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487415, encodeId=6e43148e41588, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=34, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=16760, encryptionId=7cea16e605a, topicName=stata)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=e76d8309257, createdName=李研东, createdTime=Fri Aug 24 07:39:00 CST 2018, time=2018-08-24, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=340174, encodeId=8fcd3401e404, content=学习学习好, beContent=null, objectType=article, channel=null, level=null, likeNumber=70, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKibA62IFMeUJEmSyIe8DvYFeERuOsfrRd8iano7nENqQU1dRR3tqeQOUL3eqgYgEZRT2t2iaEsib0JEw/132, createdBy=66771693911, createdName=易水河, createdTime=Wed Aug 22 16:48:20 CST 2018, time=2018-08-22, status=1, ipAttribution=)]
    2018-08-24 李研东
  4. [GetPortalCommentsPageByObjectIdResponse(id=340780, encodeId=4a7d340e8069, content=了解一下, beContent=null, objectType=article, channel=null, level=null, likeNumber=56, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=https://wx.qlogo.cn/mmopen/NUyjXTCJjo6KcicAVC1MwuOgo3iaicb1Imgk1yIfnvr6oXzibcAFB6puAyNJXbzWhNuLqaFYBVRWjh7rghkvFLPxMAfD5ib3nXwVD/0, createdBy=bed21972958, createdName=wxl882001, createdTime=Sat Aug 25 20:51:11 CST 2018, time=2018-08-25, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466061, encodeId=0e6d14660614b, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=42, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=2920, encryptionId=217c292009, topicName=ATA)], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=387a6772119, createdName=bbjsj_1981, createdTime=Fri Aug 24 07:39:00 CST 2018, time=2018-08-24, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487415, encodeId=6e43148e41588, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=34, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=16760, encryptionId=7cea16e605a, topicName=stata)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=e76d8309257, createdName=李研东, createdTime=Fri Aug 24 07:39:00 CST 2018, time=2018-08-24, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=340174, encodeId=8fcd3401e404, content=学习学习好, beContent=null, objectType=article, channel=null, level=null, likeNumber=70, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKibA62IFMeUJEmSyIe8DvYFeERuOsfrRd8iano7nENqQU1dRR3tqeQOUL3eqgYgEZRT2t2iaEsib0JEw/132, createdBy=66771693911, createdName=易水河, createdTime=Wed Aug 22 16:48:20 CST 2018, time=2018-08-22, status=1, ipAttribution=)]
    2018-08-22 易水河

    学习学习好

    0

相关资讯

STATA教程:ivregress2快速保存工具变量一阶和二阶回归结果

工具变量常被用来解决内生性问题,比如遗漏变量、测量误差及反向因果;在实证分析中,则常采用两阶段最小二乘法(2SLS)来实现工具变量分析。本文简单介绍如何快速输出两阶段最小二乘法的一阶和二阶回归结果表格,使用命令为ivregress2,其命令格式类似ivregress,具体说明可参见Stata官方帮助文件。1.定义工作环境clearcd F:\Dropbox\stata13\graphics2.导入

采用Stata实现倾向得分匹配分析

具体去实施这个倾向值匹配,一般有几个软件可以供选择: 1. SPSS,有个PSM的插件,其实是基于R包的。这个可能操作起来比较简单,但问题是,安装起来难啊.....很多人都没安装成功呢。 2. Stata,我觉得最经典的,就是这个pscore软件包了,当然,也还有别的,psmatch2之类。 3. R,最流行的就是matching包和MatchIt包,等等啦。貌似那个SPSS中PSM的插

跟我一起从零学习stata统计软件,从此统计不求人

统计软件中三强:SAS,SPSS和Stata,SPSS易用性第一,SAS功能强大,然而,Stata作为一个小型的统计软件,其统计分析能力远远超过了SPSS,在许多方面也超过了SAS!Stata 的统计功能很强,除了传统的统计分析方法外,还收集了近 20 年发展起来的新方法,如 Cox 比例风险回归,指数与 Weibull 回归,多类结果与有序结果的 logistic 回归, Poisson 回归,