《用stata进行单个率meta分析程序总结.doc》由会员分享,可在线阅读,更多相关《用stata进行单个率meta分析程序总结.doc(4页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、用stata进行单个率meta分析程序总结感谢版主对我的方法进行验证,这里整理一下方面大家研究谷歌的程序(标红部分,分批录入stata12.0.可得到结果。)clearinput study cases total1 20 10002 40 50003 30 15004 25 3300end gen p = .gen se = . / get proportions and std errors forv i =1(1)4 cii totali casesiqui replace p = r(mean) in iqui replace se = r(se) in i/ get the inve
2、rse variance-weighted proportion/ use the official Stata -vwls- command gen cons =1vwls p cons, sd(se) / use the user written -metan- command / for fixed-effects meta-analysismetan p se, nograph fixed / for random-effects meta-analysismetan p se, nograph random我的数据,用谷歌方法运行的命令:clearinput study cases
3、total1 76 4512 86 2023 24 974 401 2502end gen p = .gen se = . forv i =1(1)4 cii totali casesiqui replace p = r(mean) in iqui replace se = r(se) in igen cons =1vwls p cons, sd(se) metan p se, nograph fixed metan p se, nograph random我自已编的程序结果见贴子中的图片:录入格式,r nclearinput study r n1 0.831 1542 0.828 1343 0.88 100end generate ser=sqrt(r*(1-r)/n)metan r ser, fixed label(namevar=study) metan r ser, random label(namevar=study) metafunnel r ser