1 Take home STA 635 (Fall 2005) Lei Yu Problem 1 library(survival) library(rankreg) data (stanford2) subset=subset (stanford2, t5 != 'NA' ) rankaft(x=cbind(subset$age,subset$t5), y=log10(subset$time), delta=subset$status)$beta xnewX1 xnewX2 betag -0.02111191 -0.02654734 betal -0.02452541 -0.11022390 ################################ ..Repeat the following process.. ################################ rankaft(x=cbind(subset$t5), y=(log10(subset$time)-(-0.04021*subset$age)), delta=subset$status)$beta xnew betag 0.000255859 betal -0.098702690 RankRegV(x=cbind(subset$age,subset$t5), y=log10(subset$time), d=subset$status,beta=c(0.04021, 0.000255859)) $VEF [,1] [,2] [1,] 991237.41 10798.117 [2,] 10798.12 2568.356 $chisquare [,1] [1,] 2.706417 $Pval [,1] [1,] 0.2584099 2 ##################################### ..Repeat the following process.. ##################################### rankaft(x=cbind(subset$t5), y=(log10(subset$time)-(-0.0037*subset$age)), delta=subset$status)$beta xnew betag -0.04822398 betal -0.11693190 RankRegV(x=cbind(subset$age,subset$t5), y=log10(subset$time), d=subset$status,beta=c(0.0037, -0.04822398)) $VEF [,1] [,2] [1,] 996395.36 11871.333 [2,] 11871.33 2884.088 $chisquare [,1] [1,] 2.702716 $Pval [,1] [1,] 0.2588885 Therefore my 90% confidence interval for the estimate of age alone using the ATF model is (-0.04021, -0.0037). Problem 2 I am using PROC PHREG for this problem after importing the cancer dataset into SAS. Since most of the subjects (95 percent) are 50 years of age and older, I assume the subjects under this study are basically elder people and share a common baseline hazard in terms of age. I further assume that the baseline hazard is different between male and female. The option of Efron is used to handling the ties in the survival time. /*** Data Step Omitted ***/ proc phreg data=tmp2; model time*status(1)= age ph_ecog ph_karno /ties=efron; strata sex; run; 3 The result is presented as follows, the parameter estimates for age and ph_karno are not significant indicating age and Karnofsky performance score don’t have significant effect on the survival time of the cancer patients. While the estimate for ECOG performance score produces a highly significant p-value. A higher ECOG performance score are therefore more likely associated with the higher hazard. The PHREG Procedure Model Information Data Set Dependent Variable Censoring Variable Censoring Value(s) Ties Handling WORK.TMP2 time status 1 EFRON Summary of the Number of Event and Censored Values Stratum sex Total Event Censored Percent Censored 1 1 136 110 26 19.12 2 2 90 53 37 41.11 ------------------------------------------------------------------Total 226 163 63 27.88 Analysis of Maximum Likelihood Estimates Variable DF Parameter Estimate Standard Error Chi-Square Pr > ChiSq Hazard Ratio age ph_ecog ph_karno 1 1 1 0.01217 0.60752 0.01084 0.00937 0.17782 0.00960 1.6861 11.6723 1.2752 0.1941 0.0006 0.2588 1.012 1.836 1.011 data covals; input age ph_ecog ph_karno; cards; 50 1 70 ; run; proc phreg data=tmp2; model time*status(1)= age ph_ecog ph_karno /ties=efron; strata sex; baseline out=b covariates= covals survival=s logsurv=ls lower=lcl upper=ucl /nomean; run; data c; set b; if sex=1; hazard=-ls; run; goptions reset=global gunit=pct border cback=white ctext=black ftitle=zapfb ftext=zapfb htitle=3 htext=2 transparency noborder; symbol v=circle i=j c=blue w=3; 4 proc gplot; plot hazard*time; run; quit;