您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 旅游娱乐 > Meta-analysis in Stata
Meta-analysisinStata柏建岭南京医科大学公共卫生学院流统系STATA简介•由美国计算机资源中心(ComputerResourceCenter)研制;•现在为Stata公司的产品;•目前最高版本9.0;•与SAS、SPSS一起并称为三大权威统计软件。•操作灵活、简单、易学易用,同时具有数据管理软件、统计分析软件、绘图软件、矩阵计算软件和程序语言的特点。STATA的进入和退出进入:双击STATA软件图标退出:菜单方式:File→Exit窗口方式命令方式:exitSTATA的用户界面命令回顾变量列表结果输出命令输入菜单和工具栏STATA数据管理•数据的输入与储存•数据库的排序•删除变量或记录•保留变量或记录•产生新变量•替换已存在的变量值数据的输入与存储•数据输入–数据编辑窗口;–复制和粘贴。•数据储存–save命令–FileSaveAs数据编辑窗口数据编辑按钮窗口使用数据编辑窗口输入每一行代表一条记录每一列代表一个变量数据库的排序sort变量名1变量名2……gsort+/-变量清单sortx对变量x中数值从小到大进行排列gsortx对变量x中数值从小到大进行排列gsort-x对变量x中数值从大到小进行排列删除(或保留)变量或记录删除变量或记录dropvarlistdropifexpdropinrange保留变量或记录keepvarlistkeepifexpkeepinrange[ifexp]删除变量或记录•dropx1x2/*删除变量x1和x2•dropx1-x3/*删除数据库中介于x1和x3间的所有变量(包括x1和x3)•dropifx0/*删去x0的所有记录•dropin1/3/*删去第1~3个记录•dropifx==./*删去x为缺失值的所有记录•dropifx==.|y==./*删去x或y之一为缺失值的所有记录•dropifx==.&y==./*删去x和y同时为缺失值的所有记录•drop_all/*删掉数据库中所有变量和数据保留变量或记录•keepin1/5/*保留第1~5个记录,其余记录删除•keepx1-x3/*保留数据库中介于x1和x3间的所有变量(包括x1和x3),其余变量删除•keepifx0/*保留x0的所有记录,其余记录删除用generate产生新变量generate新变量=表达式geny=x+1/*产生新变量y,其值为x+1。geny=log(x)ifx0/*产生新变量y,其值为所有x0的对数log(x),当x=0时,用缺失值代替。替换已存在的变量值replace变量=表达式–replacebolck=6ifblock==0/*将block=0的数全部替换为6。–replacez=.ifz0/*将所有小于0的z值用缺失值代替。–replaceage=25in2/*将第2条记录中的变量age替换为25。Fixedandrandomeffectsmeta-analysismetanvarlist[ifexp][inrange][,rrorrdfixedrandomfixedirandomipetoby(byvar)label(namevar=name,yearvar=year)]•rrpoolsriskratios[default]•orpoolsoddsratios•rdpoolsriskdifferences•fixedspecifiesafixedeffectmodel•randomspecifiesarandomeffectsmodelThefollowingnewvariablestothedataset_ESEffectsize(ES)_seESStandarderrorofESor,whenORorRRarespecfied:_selogESthestandarderrorofitslogarithm_LCILowerconfidencelimitforES_UCIUpperconfidencelimitforES_WTStudypercentageweight_SSStudysamplesizeExample1StudyCountryCaseControlCCAACCAAMisraRREuropean5311246103HouSMEuropean32712869ZhouWEuropean166428166499SpitzMREuropean4714139159David-BeabesGL1European346758197LingGAsian148396848ChenSAsian11512041ParkJYAsian12200145David-beabesGL2European117913130Stataresultmetancaseccaseacontrolccontrolaifcountry==European,orlabel(namevar=study)metanabcd,orlabel(namevar=study)Study|OR[95%Conf.Interval]%Weight---------------------+----------------------------------------------MisraRR|1.0600.6581.70714.60HouSM|1.1110.6062.0368.85ZhouW|1.1660.9071.49850.23SpitzMR|1.3590.8402.19912.68David-BeabesGL1|1.7241.0392.8599.72David-beabesGL2|1.3920.5953.2583.92---------------------+----------------------------------------------M-HpooledOR|1.2331.0351.469100.00---------------------+----------------------------------------------Heterogeneitychi-squared=2.61(d.f.=5)p=0.760I-squared(variationinORattributabletoheterogeneity)=0.0%TestofOR=1:z=2.34p=0.019ForestplotOddsratio.30689013.25849StudyOddsratio(95%CI)%WeightMisraRR1.06(0.66,1.71)14.6HouSM1.11(0.61,2.04)8.8ZhouW1.17(0.91,1.50)50.2SpitzMR1.36(0.84,2.20)12.7David-BeabesGL11.72(1.04,2.86)9.7David-beabesGL21.39(0.59,3.26)3.9Overall1.23(1.03,1.47)100.0Stataresultmetancaseccaseacontrolccontrolaifcountry==Asian,orlabel(namevar=study)Study|OR[95%Conf.Interval]%Weight---------------------+---------------------------------------------LingG|2.3580.9026.16625.55ChenS|0.4420.1901.02771.85ParkJY|1.9800.08048.9272.60---------------------+---------------------------------------------M-HpooledOR|0.9720.5441.737100.00---------------------+---------------------------------------------Heterogeneitychi-squared=6.81(d.f.=2)p=0.033I-squared(variationinORattributabletoheterogeneity)=70.6%TestofOR=1:z=0.10p=0.923Stataresultmetancaseccaseacontrolccontrolaifcountry==Asian,orlabel(namevar=study)randomStudy|OR[95%Conf.Interval]%Weight---------------------+----------------------------------------------LingG|2.3580.9026.16642.15ChenS|0.4420.1901.02744.27ParkJY|1.9800.08048.92713.57---------------------+----------------------------------------------D+LpooledOR|1.0970.2794.316100.00---------------------+----------------------------------------------Heterogeneitychi-squared=6.81(d.f.=2)p=0.033I-squared(variationinORattributabletoheterogeneity)=70.6%Estimateofbetween-studyvarianceTau-squared=0.9175TestofOR=1:z=0.13p=0.894ForestplotOddsratio.020438148.9273StudyOddsratio(95%CI)%WeightLingG2.36(0.90,6.17)42.2ChenS0.44(0.19,1.03)44.3ParkJY1.98(0.08,48.93)13.6Overall1.10(0.28,4.32)100.0Stataresultmetancaseccaseacontrolccontrola,orby(country)label(namevar=study)Study|OR[95%Conf.Interval]%Weight-------------------------+---------------------------------------------------AsianLingG|2.3580.9026.1662.38ChenS|0.4420.1901.0276.69ParkJY|1.9800.08048.9270.24Sub-totalM-HpooledOR|0.9720.5441.7379.32-------------------------+---------------------------------------------------EuropeanMisraRR|1.0600.6581.70713.24HouSM|1.1110.6062.0368.02ZhouW|1.1660.9071.49845.55SpitzMR|1.3590.8402.19911.50David-BeabesGL1|1.7241.0392.8598.81David-beabesGL2|1.3920.5953.2583.56Sub-totalM-HpooledOR|1.2331.0351.46990.68-------------------------+---------------------------------------------------OverallM-HpooledOR|1.2091.0221.430100.00----------------
本文标题:Meta-analysis in Stata
链接地址:https://www.777doc.com/doc-3379921 .html