Baidu
map

Stata:玩转倾向得分匹配统计方法(PSM)

2018-09-26 MedSci MedSci原创

倾向匹配分析(Propsensity matching analysis) 在医学中越来越常用,采用SPSS高版本也可以分析,但是灵活性不够,采用STATA更方便,现在详细如下: 1、安装psmatch2 ssc install psmatch2,replace 2、导入数据,方法比较多,可以粘贴复制、也可以使用命令

倾向匹配分析(Propsensity matching analysis) 在医学中越来越常用,采用SPSS高版本也可以分析,但是灵活性不够,采用STATA更方便,现在详细如下: 1、安装psmatch2 ssc install psmatch2,replace 2、导入数据,方法比较多,可以粘贴复制、也可以使用命令 use E:\BaiduNetdiskDownload\A\labor.dta,clear 3、命令语法格式介绍 psmatch2 D x1 x2 x3 ,outcome(y) logit ties ate common odds /// pscore(varname) qui 对以上的标准命令进行解析 D为处理变量,是虚拟变量即是否参加培训 x1 x2 x3是协变量,一般的称呼也叫解释变量 outcome(varname)是输出变量,例如收入 logit 表示计算得分的时候使用logit模型,如果不写Logit,默认为probit模型计算得分,在连玉君的视频中论述了二者并不存在明显的差异。 ties表示包括所有倾向得分相同的并列个体,默认按照数据

版权声明:
本网站所有内容来源注明为“梅斯医学”或“MedSci原创”的文字、图片和音视频资料,版权均属于梅斯医学所有。非经授权,任何媒体、网站或个人不得转载,授权转载时须注明来源为“梅斯医学”。其它来源的文章系转载文章,或“梅斯号”自媒体发布的文章,仅系出于传递更多信息之目的,本站仅负责审核内容合规,其内容不代表本站立场,本站不负责内容的准确性和版权。如果存在侵权、或不希望被转载的媒体或个人可与我们联系,我们将立即进行删除处理。
在此留言
评论区 (5)
#插入话题
  1. [GetPortalCommentsPageByObjectIdResponse(id=373922, encodeId=f7493e39226d, content=优秀, beContent=null, objectType=article, channel=null, level=null, likeNumber=93, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://cdnapi.center.medsci.cn/medsci/head/2019/10/15/27ae114b7ca9b1c1b19d3b551eeb001a.jpg, createdBy=bce35208361, createdName=14754838m84暂无昵称, createdTime=Tue Oct 15 00:09:09 CST 2019, time=2019-10-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=355555, encodeId=51f635555520, content=感谢提供!一直用spss做不好, beContent=null, objectType=article, channel=null, level=null, likeNumber=90, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=840e2502049, createdName=1249f76dm18(暂无昵称), createdTime=Sun Dec 16 11:29:31 CST 2018, time=2018-12-16, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466067, encodeId=65a3146606e62, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=57, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487416, encodeId=1180148e416df, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=67, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1542973, encodeId=a66a15429e364, content=<a href='/topic/show?id=3f53e894718' target=_blank style='color:#2F92EE;'>#统计方法#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=71, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=78947, encryptionId=3f53e894718, topicName=统计方法)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=127213510199, createdName=12498761m60暂无昵称, createdTime=Fri Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=)]
    2019-10-15 14754838m84暂无昵称

    优秀

    0

  2. [GetPortalCommentsPageByObjectIdResponse(id=373922, encodeId=f7493e39226d, content=优秀, beContent=null, objectType=article, channel=null, level=null, likeNumber=93, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://cdnapi.center.medsci.cn/medsci/head/2019/10/15/27ae114b7ca9b1c1b19d3b551eeb001a.jpg, createdBy=bce35208361, createdName=14754838m84暂无昵称, createdTime=Tue Oct 15 00:09:09 CST 2019, time=2019-10-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=355555, encodeId=51f635555520, content=感谢提供!一直用spss做不好, beContent=null, objectType=article, channel=null, level=null, likeNumber=90, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=840e2502049, createdName=1249f76dm18(暂无昵称), createdTime=Sun Dec 16 11:29:31 CST 2018, time=2018-12-16, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466067, encodeId=65a3146606e62, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=57, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487416, encodeId=1180148e416df, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=67, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1542973, encodeId=a66a15429e364, content=<a href='/topic/show?id=3f53e894718' target=_blank style='color:#2F92EE;'>#统计方法#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=71, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=78947, encryptionId=3f53e894718, topicName=统计方法)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=127213510199, createdName=12498761m60暂无昵称, createdTime=Fri Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=)]
    2018-12-16 1249f76dm18(暂无昵称)

    感谢提供!一直用spss做不好

    0

  3. [GetPortalCommentsPageByObjectIdResponse(id=373922, encodeId=f7493e39226d, content=优秀, beContent=null, objectType=article, channel=null, level=null, likeNumber=93, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://cdnapi.center.medsci.cn/medsci/head/2019/10/15/27ae114b7ca9b1c1b19d3b551eeb001a.jpg, createdBy=bce35208361, createdName=14754838m84暂无昵称, createdTime=Tue Oct 15 00:09:09 CST 2019, time=2019-10-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=355555, encodeId=51f635555520, content=感谢提供!一直用spss做不好, beContent=null, objectType=article, channel=null, level=null, likeNumber=90, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=840e2502049, createdName=1249f76dm18(暂无昵称), createdTime=Sun Dec 16 11:29:31 CST 2018, time=2018-12-16, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466067, encodeId=65a3146606e62, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=57, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487416, encodeId=1180148e416df, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=67, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1542973, encodeId=a66a15429e364, content=<a href='/topic/show?id=3f53e894718' target=_blank style='color:#2F92EE;'>#统计方法#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=71, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=78947, encryptionId=3f53e894718, topicName=统计方法)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=127213510199, createdName=12498761m60暂无昵称, createdTime=Fri Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=)]
    2018-09-28 bbjsj_1981
  4. [GetPortalCommentsPageByObjectIdResponse(id=373922, encodeId=f7493e39226d, content=优秀, beContent=null, objectType=article, channel=null, level=null, likeNumber=93, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://cdnapi.center.medsci.cn/medsci/head/2019/10/15/27ae114b7ca9b1c1b19d3b551eeb001a.jpg, createdBy=bce35208361, createdName=14754838m84暂无昵称, createdTime=Tue Oct 15 00:09:09 CST 2019, time=2019-10-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=355555, encodeId=51f635555520, content=感谢提供!一直用spss做不好, beContent=null, objectType=article, channel=null, level=null, likeNumber=90, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=840e2502049, createdName=1249f76dm18(暂无昵称), createdTime=Sun Dec 16 11:29:31 CST 2018, time=2018-12-16, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466067, encodeId=65a3146606e62, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=57, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487416, encodeId=1180148e416df, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=67, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1542973, encodeId=a66a15429e364, content=<a href='/topic/show?id=3f53e894718' target=_blank style='color:#2F92EE;'>#统计方法#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=71, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=78947, encryptionId=3f53e894718, topicName=统计方法)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=127213510199, createdName=12498761m60暂无昵称, createdTime=Fri Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=)]
    2018-09-28 李研东
  5. [GetPortalCommentsPageByObjectIdResponse(id=373922, encodeId=f7493e39226d, content=优秀, beContent=null, objectType=article, channel=null, level=null, likeNumber=93, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=http://cdnapi.center.medsci.cn/medsci/head/2019/10/15/27ae114b7ca9b1c1b19d3b551eeb001a.jpg, createdBy=bce35208361, createdName=14754838m84暂无昵称, createdTime=Tue Oct 15 00:09:09 CST 2019, time=2019-10-15, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=355555, encodeId=51f635555520, content=感谢提供!一直用spss做不好, beContent=null, objectType=article, channel=null, level=null, likeNumber=90, replyNumber=0, topicName=null, topicId=null, topicList=[], attachment=null, authenticateStatus=null, createdAvatar=, createdBy=840e2502049, createdName=1249f76dm18(暂无昵称), createdTime=Sun Dec 16 11:29:31 CST 2018, time=2018-12-16, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1466067, encodeId=65a3146606e62, content=<a href='/topic/show?id=217c292009' target=_blank style='color:#2F92EE;'>#ATA#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=57, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1487416, encodeId=1180148e416df, content=<a href='/topic/show?id=7cea16e605a' target=_blank style='color:#2F92EE;'>#stata#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=67, 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 Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=), GetPortalCommentsPageByObjectIdResponse(id=1542973, encodeId=a66a15429e364, content=<a href='/topic/show?id=3f53e894718' target=_blank style='color:#2F92EE;'>#统计方法#</a>, beContent=null, objectType=article, channel=null, level=null, likeNumber=71, replyNumber=0, topicName=null, topicId=null, topicList=[TopicDto(id=78947, encryptionId=3f53e894718, topicName=统计方法)], attachment=null, authenticateStatus=null, createdAvatar=null, createdBy=127213510199, createdName=12498761m60暂无昵称, createdTime=Fri Sep 28 13:37:00 CST 2018, time=2018-09-28, status=1, ipAttribution=)]

相关资讯

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 回归,

用Stata处理RDD断点回归

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

Baidu
map
Baidu
map
Baidu
map