RE: COX Proportional Hazard Model with Time Dependent Covariate

From: Yaning Wang Date: August 14, 2007 technical Source: mail-archive.com
Both Splus and SAS can do it. They both use the counting-process syntax. In SAS, follow Example 54.5: Time-Dependent Repeated Measurements of a Covariate: proc phreg data=Tumor1; model (T1,T2)*Status(0)=NPap; OUTPUT OUT=Out1 SURVIVAL=sur/order=data; id ID Time Dead; run; Even though SAS can correctly estimate the slope for the time-dependent covariate, the survival prediction (SURVIVAL=sur) in the output file (OUT=Out1) is wrong. SAS document explains how SAS calculates these surivial predictions at http://support.sas.com/onlinedoc/913/getDoc/en/statug.hlp/phreg_sect31.h tm http://support.sas.com/onlinedoc/913/getDoc/en/statug.hlp/phreg_sect31. htm . Unfortunately, SAS doesn't follow the right equation described in the docuemnt (Empirical Cumulative Hazards Function Estimates). Instead, SAS calculates S(t,x)=S(t,0)**exp(beta*x), which only applies to time-independent covariate. But S(t,0) is correct from SAS if a new individual was created to have x=0 for all the time points. From S(t,0), you can write some code to follow the right equation in the SAS document to calculate S(t,x) correctly, which I tested to be consistent with Splus results. Nick and Rene: With the predicted S(t,x), a step function instead of a smooth function, you can simulate the event times. The hazard function can also be calculated. Of course, it is also a step function, not a smooth function. As a result, the integration step will be larger compared to NONMEM assuming a parametric smooth hazard function. Yaning Yaning Wang, Ph.D. Team Leader, Pharmacometrics Office of Clinical Pharmacology Office of Translational Science Center for Drug Evaluation and Research U.S. Food and Drug Administration Phone: 301-796-1624 Email: [EMAIL PROTECTED] "The contents of this message are mine personally and do not necessarily reflect any position of the Government or the Food and Drug Administration."
Quoted reply history
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zhao, Liang Sent: Tuesday, July 03, 2007 3:41 PM To: Nanayakkara, Nuwan; [email protected] Subject: RE: [NMusers] COX Proportional Hazard Model with Time Dependent Covariate Hi, Nuwan, Just want to share what I just have found how to do it with S-pus for my #2 question. It is easier to illustrate with an example. data.cov <-data.frame(start=c(0, 1, 2, 3), stop=c(1, 2, 3, 4), event=c(0, 0, 0, 1), age=(22, 23, 24, 25), transplant.surgery=c(0, 0, 1, 1), weight=c(70, 70, 69, 69)) survfit(your.previous.fit.outcome, data.cov, individual=T) Here, "age", "transplant.surgery", and "weight" are the time-dependent covariates that have been used to obtain "your.previous.fit.outcome". It means that corresponding to time 0-1, age=22, transplant.surgery=0, weight=70l; corresponding to time 1-2, age=23, transplant.surgery=0, weight=70 ... . Very important, the projected survival can only be obtained by flagging "individual=T". Cheers! Liang ________________________________ From: Nanayakkara, Nuwan [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 1:54 PM To: Zhao, Liang; [email protected] Subject: RE: [NMusers] COX Proportional Hazard Model with Time Dependent Covariate For (2), take a look at Survival Analysis Using SAS: A Practical Guide: Books: Paul D. Allison by Paul D. Allison. ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zhao, Liang Sent: Monday, July 02, 2007 2:34 PM To: [email protected] Subject: [NMusers] COX Proportional Hazard Model with Time Dependent Covariate Dear All, I have the following questions regarding with COX survial model with Time Dependent Covariate that needs your experience and expertise (1) Even we can do it with S-Plus or SAS, it can not be handled by NONMEM, am I right? If I am wrong, who has started the work? (2) How to make predictions with time-variant covariates based on COX model using S-plus or SAS, if not NONMEM? The question is asked because certain epidemic diseases are season-sensitive and none assumption on base hazard is advantageous over parametric approaches. Thank you in advance! Liang Zhao
Jul 02, 2007 Liang Zhao COX Proportional Hazard Model with Time Dependent Covariate
Jul 03, 2007 Jeffrey . a . Wald Re: COX Proportional Hazard Model with Time Dependent Covariate
Jul 03, 2007 Nuwan Nanayakkara RE: COX Proportional Hazard Model with Time Dependent Covariate
Jul 03, 2007 Liang Zhao RE: COX Proportional Hazard Model with Time Dependent Covariate
Aug 14, 2007 Yaning Wang RE: COX Proportional Hazard Model with Time Dependent Covariate