生存分析及cox比例风险模型..

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

生存分析生存分析的主要内容生存过程的描述生存时间的分布特点估计生存率估计平均生存时间绘制生存率曲线生存过程的统计推断生存时间的影响因素研究生存分析需具备的资料生存时间或称时间变量观察结果或称截尾变量暴露变量及混杂因素肾移植例一般手术(A组):391520202630414664+64135223365450596+680+900+900+改进手术(B组):1070+70+120225366390+475+518+647+801+1001+1045+1045+手术方式生存时间观察结果treattimeoutcome1311911411146116411640………………190002101………………28010210010210450210450生存资料的定义(1)将数据定义为生存资料格式stset时间变量[,failure(截尾变量)]failure(截尾变量)stata以所有不等于0的非缺失值为预期的出现结果;若failure选择项缺省,则stata默认所有纪录均出现结果生存资料的定义(2)四个变量---定义数据库后,stata系统自动产生的_st/*数据库中该条记录是否被定义为生存资料_d/*该条记录是否出现预期结果_t/*观察对象被随访的时间_t0/*观察对象第一次被观察到的时间(开始过程的时间为0)stsettime,failure(outcome)failureevent:outcome!=0&outcome.obs.timeinterval:(0,time]exitonorbefore:failure------------------------------------------------------------------33totalobs.0exclusions------------------------------------------------------------------33obs.remaining,representing18failuresinsinglerecord/singlefailuredata11370totalanalysistimeatrisk,atriskfromt=0earliestobservedentryt=0lastobservedexitt=1045生存资料的描述stci,[by(分组变量)选择项]p(#)/*生存时间的百分位数level(#)/*可信区间的可信度media/*计算中位生存时间,为默认选项rmean/*计算平均生存时间.stci,by(treat)failure_d:outcomeanalysistime_t:time|no.oftreat|subjects50%Std.Err.[95%Conf.Interval]-------+-------------------------------------------------------------1|196446.8995204502|14..225.-------+-------------------------------------------------------------total|33365143.400164..stci,rmeanby(treat)failure_d:outcomeanalysistime_t:time|no.ofrestrictedtreat|subjectsmeanStd.Err.[95%Conf.Interval]-------+-------------------------------------------------------------1|19297.0329(*)83.96867132.457461.602|14766.4481(*)116.2397538.622994.274-------+-------------------------------------------------------------total|33512.9716(*)83.84662348.635677.308(*)largestobservedanalysistimeiscensored,meanisunderestimated.生存率的估计输出生存率、生存概率的标准误等统计量stslist[,by(分组变量)选择项]failure/*输出死亡函数(1-S(t))level/*规定所输出可信区间的可信度.stslist,by(treat)failure_d:outcomeanalysistime_t:timeBeg.NetSurvivorStd.TimeTotalFailLostFunctionError[95%Conf.Int.]-------------------------------------------------------------------------------treat=1319100.94740.05120.68120.9924…...6803010.23680.10150.07580.44759002020.23680.10150.07580.4475treat=21014100.92860.06880.59080.98967013020.92860.06880.59080.9896…...10013010.67530.13440.34640.864710452020.67530.13440.34640.8647-------------------------------------------------------------------------------绘制生存(死亡)曲线(1)绘制Kaplan-Meier生存(死亡)曲线stsgraph[,by(分组变量)separate选择项]failure/*指定绘制“死亡”曲线,缺省时绘制生存曲线Gwood/*绘制生存(或死亡)曲线及其Greenwood可信区间lost/*在曲线上标出该时间点截尾值例数Kaplan-Meiersurvivalestimates,bytreatanalysistime050010000.000.250.500.751.00treat1treat2212622绘制生存(死亡)曲线(2)绘制Kaplan-Meier生存曲线与Cox预测曲线stcoxkm[,by(分组变量)separate绘图命令选择项]Observedvs.PredictedSurvivalProbabilitiesByCategoriesoftreatanalysistimeObserved:treat=1Observed:treat=2Predicted:treat=1Predicted:treat=2310450.000.250.500.751.00生存率的比较ststest分组变量[,选择项]logrank/*进行log-rank检验,为缺省值.ststesttreatfailure_d:outcomeanalysistime_t:timeLog-ranktestforequalityofsurvivorfunctions|EventsEventstreat|observedexpected------+-------------------------1|148.572|49.43------+-------------------------Total|1818.00chi2(1)=6.71Prchi2=0.0096例8.8某临床试验比较A,B两治疗方案对某病的治疗效果,A组(group=0)12人,B组(group=1)13人。病人分组后检验其肾功能(kidney),功能正常者记为0,不正常者记为1;治疗后生存时间为stime(天);问不同治疗方案及肾功能对病人的生存时间是否有影响?编号NO.治疗生存观察肾功能kidney编号NO.治疗生存观察肾功能kidney方案时间结果方案时间结果Groupstimecensorgroupstimecensor108111311801020852001416321030521115122400040220101611951050631117176106081018170107019760019113118012960020123119014600021112961010063112212101011013280023170010120365002411811251199000例8.8Cox比例风险模型(1)估计Cox比例风险模型的命令格式为stcox[协变量][,nohr选择项]nohr/*指定输出回归系数b而不是危险比exp(b)level(#)/*可信区间的可信度例8.8Stsetstime,failure(censor)Stcoxgroupkidney,nolognohrfailure_d:censoranalysistime_t:stimeCoxregression--BreslowmethodfortiesNo.ofsubjects=25Numberofobs=25No.offailures=17Timeatrisk=15334LRchi2(2)=22.67Loglikelihood=-35.707534Probchi2=0.0000------------------------------------------------------------------------------_t|_d|Coef.Std.Err.zP|z|[95%Conf.Interval]-------------+----------------------------------------------------------------group|1.243078.59931772.070.038.06843652.417719kidney|4.1054551.1645333.530.0001.8230126.387898------------------------------------------------------------------------------Cox比例风险函数:(t)=0(t)exp(1.243group+4.105kidney)肾功能正常者接受B治疗方案比接受A治疗方案在某时刻的相对危险度为:RR=(t|group=1,kidney=0)/(t|group=0,kidney=0)=0(t)exp(1.243*1+4.105*0)/0(t)exp(1.243*0+4.105*1)=3.466肾功能不正常者接受B治疗方案比接受A治疗方案在某时刻的相对危险度为3.466肾功能不正常者接受B治疗方案比肾功能正常者接受A治疗方案在某时刻的相对危险度为210.300Weibull回归和指数回归streg[协变量],[选项]dist(分布类型)/*拟合模型的分布类型。exponential(指数分布)weibull(weibull分布)nohr/*指定输出回归系数b而不是危险比exp(b)level(#)/*可信区间的可信度

1 / 25
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功