/* SAS code for fitting a proportional hazards model to data from the VA lung cancer trial of 137 male patients with inoperable lung cancer. This code is posted as vaphreg2.sas */ /* Variables Treatment: 1=standard, 2=test (chemotherapy) Celltype: 1=squamous, 2=smallcell, 3=adeno, 4=large Survival in days Status: 1=dead, 0=censored Karnofsky score: Measures patient performance of activities of daily living. SCORE FUNCTION 100 Normal, no evidence of disease 90 Able to perform normal activity with only minor symptoms 80 Able to perform normal activity with effort, some symptoms 70 Able to care for self but unable to do normal activities 60 Requires occasional assistance 50 Requires considerable assistance 40 Disabled, requires special assistance 30 Severely disabled 20 Very sick, requires supportive treatment 10 Moribund Months from Diagnosis Age in years Prior therapy: 0=no, 10=yes */ data va; infile 'c:\stat565\data\va.dat'; input rx cellt time status karno months age prior_rx; prior_rx = prior_rx/10; ct2=0; if(cellt=2) then ct2=1; ct3=0; if(cellt=3) then ct3=1; ct4=0; if(cellt=4) then ct4=1; run; proc format; value celltype 1 = 'squamous' 2 = 'smallcell' 3 = 'adeno' 4 = 'large'; proc phreg data=va; model time*status(0)= rx ct2 ct3 ct4 karno months age prior_rx/ties=efron selection=stepwise sle=.10 sls=.05; title "Results from Stepwise Selection"; run; proc phreg data=va; model time*status(0)= rx ct2 ct3 ct4 karno months age prior_rx/ties=efron selection=backward sls=.10; title "Results from Backward Elimination"; run; proc phreg data=va; model time*status(0)= rx ct2 ct3 ct4 karno months age prior_rx/ties=efron selection=score best=5 start=2 stop=6; title "Searching Through All Possible Models"; run;