倾向值评分匹配方法PSM-PPT参考幻灯片
- 格式:ppt
- 大小:83.63 KB
- 文档页数:17
倾向匹配得分教程(附PSM操作应用、平衡性检验、共同取值范围、核密度函数图)展开全文本文主要包括倾向匹配得分命令简介、语法格式、倾向匹配得分操作步骤思路,涉及倾向匹配得分应用、平衡性检验、共同取值范围检验、核密度函数图等内容。
1命令简介Stata does not have a built-in command for propensity score matching, a non-experimental method of sampling that produces a control group whose distribution of covariates is similar to that of the treated group. However, there are several user-written modules for this method. The following modules are among the most popular:Stata没有一个内置的倾向评分匹配的命令,一种非实验性的抽样方法,它产生一个控制组,它的协变量分布与被处理组的分布相似。
但是,这个方法有几个用户编写的模块。
以下是最受欢迎的模块(主要有如下几个外部命令)psmatch2.adopscore.adonnmatch.adopsmatch2.ado was developed by Leuven and Sianesi (2003) and pscore.ado by Becker and Ichino (2002). More recently, Abadie, Drukker, Herr, and Imbens (2004) introduced nnmatch.ado. All three modules support pair-matching as well as subclassification.You can find these modules using the .net command as follows:net search psmatch2net search pscorenet search nnmatchYou can install these modules using the .ssc or .net command, for example:ssc install psmatch2, replaceAfter installation, read the help files to find the correct usage, for example:help psmatch2上述主要介绍了如何获得PSM相关的命令,总结一下目前市面上用的较好的命令为psmatch2.PSM 相关命令help psmatch2help nnmatchhelp psmatchhelp pscore持续获取最新的 PSM 信息和程序findit propensity scorefindit matchingpsmatch2 is being continuously improved and developed. Make sure to keep your version up-to-date as follows ssc install psmatch2, replacewhere you can check your version as follows:which psmatch22语法格式语法格式为:help psmatch2••••••psmatch2 depvar [indepvars] [if exp] [in range] [, outcome(varlist) pscore(varname) neighbor(integer) radius caliper(real) mahalanobis(varlist) ai(integer) population altvariance kernel llr kerneltype(type) b width(real) spline nknots(integer) common trim(real ) noreplacement descending odds index logit ties q uietly w(matrix) ate]选项含义为:depvar因变量;indepvars表示协变量;outcome(varlist)表示结果变量;logit指定使用logit模型进行拟合,默认的是probit模型;neighbor(1)指定按照1:1进行匹配,如果要按照1:3进行匹配,则设定为neighbor(3);radius表示半径匹配核匹配 (Kernel matching)其他匹配方法广义精确匹配(Coarsened Exact Matching) || help cem局部线性回归匹配 (Local linear regression matching)样条匹配 (Spline matching)马氏匹配 (Mahalanobis matching)pstest $X, both做匹配前后的均衡性检验,理论上说此处只能对连续变量做均衡性检验,对分类变量的均衡性检验应该重新整理数据后运用χ2检验或者秩和检验。
核密度函数图)倾向匹配得分教程(附PSM操作应⽤、平衡性检验、共同取值范围、核密度函数图)本⽂主要包括倾向匹配得分命令简介、语法格式、倾向匹配得分操作步骤思路,涉及倾向匹配得分应⽤、平衡性检验、共同取值范围检验、核密度函数图等内容。
1命令简介Stata does not have a built-in command for propensity score matching, a non-experimental method of sampling that produces a control group whose distribution of covariates is similar to that of the treated group. How following modules are among the most popular:Stata没有⼀个内置的倾向评分匹配的命令,⼀种⾮实验性的抽样⽅法,它产⽣⼀个控制组,它的协变量分布与被处理组的分布相似。
但是,这个⽅法有⼏个⽤户编写的模块。
以下是最受欢迎的模块(主要有如下⼏个psmatch2.adopscore.adonnmatch.adopsmatch2.ado was developed by Leuven and Sianesi (2003) and pscore.ado by Becker and Ichino (2002). More recently, Abadie, Drukker, Herr, and Imbens (2004) introduced nnmatch.ado. All three modules suppo You can find these modules using the .net command as follows:net search psmatch2net search pscorenet search nnmatchYou can install these modules using the .ssc or .net command, for example:ssc install psmatch2, replaceAfter installation, read the help files to find the correct usage, for example:help psmatch2上述主要介绍了如何获得PSM相关的命令,总结⼀下⽬前市⾯上⽤的较好的命令为psmatch2.PSM 相关命令help psmatch2help nnmatchhelp psmatchhelp pscore持续获取最新的 PSM 信息和程序findit propensity scorefindit matchingpsmatch2 is being continuously improved and developed. Make sure to keep your version up-to-date as followsssc install psmatch2, replacewhere you can check your version as follows:which psmatch22语法格式语法格式为:help psmatch2psmatch2 depvar [indepvars] [if exp] [in range] [,outcome(varlist) pscore(varname) neighbor(integer) radius caliper(real) mahalanobis(varlist) ai(integer) population altvariance kernel llr kerneltype(type) bwidth(real) spline nknots(integer) common trim(real) no 选项含义为:depvar因变量;indepvars表⽰协变量;outcome(varlist)表⽰结果变量;logit指定使⽤logit模型进⾏拟合,默认的是probit模型;neighbor(1)指定按照1:1进⾏匹配,如果要按照1:3进⾏匹配,则设定为neighbor(3);radius表⽰半径匹配核匹配 (Kernel matching)其他匹配⽅法⼴义精确匹配(Coarsened Exact Matching) || help cem局部线性回归匹配 (Local linear regression matching)样条匹配 (Spline matching)马⽒匹配 (Mahalanobis matching)pstest $X, both做匹配前后的均衡性检验,理论上说此处只能对连续变量做均衡性检验,对分类变量的均衡性检验应该重新整理数据后运⽤χ2检验或者秩和检验。
倾向性得分匹配(PSM)倾向值(Propensity Score,倾向性得分)分析近些年来火的一塌糊涂,PubMed自由词搜索Propensity Score,相关文章近些年大有井喷之势(图标数据截止2020.05.21)。
但严格来说,倾向性得分算不得一种“分析”方法,而是一种用于数据处理的方式,常用于观察性研究混杂因素的控制。
比如你想研究施加某种干预对结局指标是否有改善,数据来自回顾性的既有资料的收集,由于是观察性研究,大概率存在混杂因素在组间不均衡的问题(如基线不平),这个时候你就可以考虑倾向性得分分析了。
PS就是以干预因素(组别)为因变量,以所有观测到的非研究性因素为自变量进行logistic或probit回归,在给定的协变量条件下,个体接受干预因素处理的概率。
根据PS,我们就可以对试验组和对照组进行筛选,使得不同组的非研究性因素实现均衡,从而达到控制的目的。
倾向性得分本身并不能控制混杂,而是通过PS匹配、加权、分层或进入回归模型直接调整混杂等方式,不同程度地提高对比组间的均衡性,从而削弱或平衡协变量对效应估计的影响,达到“类随机化”的效果,又称为事后随机化。
简单理解,就是从大量的样本数据中将具有共同特征的干预组和对照组样本挑选出来,然后对这些符合要求的样本进行分析。
倾向性得分可以同时调整大量的混杂因素,省时间省钱,但是需要的样本量较大,只能均衡已观测的指标变量,而且可能会以丢失样本为代价。
大部分软件给出的是两水平的干预因素的倾向性得分,SPSS直接给出了1:1的倾向性得分匹配结果。
数据来自STATA16的自带数据,是一项关于孕期妇女吸烟对新生儿体重的影响的观察性研究,由Cattaneo (2010)报道。
调查数据涉及众多变量包括新生儿出生体重(bweight)外,还有孕母的婚姻状况(mmarried)、孕期是否饮酒(alcohol)、年龄(mage)、教育水平(medu)、是否吸烟(mbsmoke)、母亲是否白人(mrace)、是否首胎(fbaby)、首次产前检查是否在头三个月内(prenatal1)以及父亲的年龄(fage)、是否白人(frace)等众多变量。
核密度函数图)倾向匹配得分教程(附PSM操作应用、平衡性检验、共同取值范围、核密度函数本文主要包括倾向匹配得分命令简介、语法格式、倾向匹配得分操作步骤思路,涉及倾向匹配得分应用、平衡性检验、共同取值范围检验、核密度函数图等内容。
1命令简介Stata does not have a built-in command for propensity score matching, a non-experimental method of sampling that produces a control group whose distribution of covariates is similar to that of the treated grou Stata没有一个内置的倾向评分匹配的命令,一种非实验性的抽样方法,它产生一个控制组,它的协变量分布与被处理组的分布相似。
但是,这个方法有几个用户编写的模块。
以下是最受欢迎的模块(主要有如下几个psmatch2.adopscore.adonnmatch.adopsmatch2.ado was developed by Leuven and Sianesi (2003) and pscore.ado by Becker and Ichino (2002). More recently, Abadie, Drukker, Herr, and Imbens (2004) introduced nnmatch.ado. All three modules suppor You can find these modules using the .net command as follows:net search psmatch2net search pscorenet search nnmatchYou can install these modules using the .ssc or .net command, for example:ssc install psmatch2, replaceAfter installation, read the help files to find the correct usage, for example:help psmatch2上述主要介绍了如何获得PSM相关的命令,总结一下目前市面上用的较好的命令为psmatch2.PSM 相关命令help psmatch2help nnmatchhelp psmatchhelp pscore持续获取最新的 PSM 信息和程序findit propensity scorefindit matchingpsmatch2 is being continuously improved and developed. Make sure to keep your version up-to-date as followsssc install psmatch2, replacewhere you can check your version as follows:which psmatch22语法格式语法格式为:help psmatch2psmatch2 depvar [indepvars] [if exp] [in range] [,outcome(varlist) pscore(varname) neighbor(integer) radius caliper(real) mahalanobis(varlist) ai(integer) population altvariance k 选项含义为:depvar因变量;indepvars表示协变量;outcome(varlist)表示结果变量;logit指定使用logit模型进行拟合,默认的是probit模型;neighbor(1)指定按照1:1进行匹配,如果要按照1:3进行匹配,则设定为neighbor(3);radius表示半径匹配核匹配 (Kernel matching)其他匹配方法广义精确匹配(Coarsened Exact Matching) || help cem局部线性回归匹配 (Local linear regression matching)样条匹配 (Spline matching)马氏匹配 (Mahalanobis matching)pstest $X, both做匹配前后的均衡性检验,理论上说此处只能对连续变量做均衡性检验,对分类变量的均衡性检验应该重新整理数据后运用χ2检验或者秩和检验。