/* PubH 7450 Exampel 8.2 (continued): fitting a PHM using the larynx cancer data and conducting local tests; see Tables 8.3-8.4 on p.270-271. NOTE: coding for Satge is now the same as that in the textbook! */ options ls=80 center pagesize=60 number label; goptions device = PS; /* graphs are saved in a file names sasgraph.ps */ data larynx; infile '/home/merganser/weip/public_html/course/7450/data/larynx.txt' firstobs=19; input stage time age year status ; if stage=2 then Z1=1; else Z1=0; if stage=3 then Z2=1; else Z2=0; if stage=4 then Z3=1; else Z3=0; /* To test for interactions b/w stage and age:*/ /*full model: covb requests to give Cov(b) */ proc phreg; Z5=Z1*Age; Z6=Z2*Age; Z7=Z3*Age; model time*status(0) = Z1 Z2 Z3 age Z5 Z6 Z7 / covb; title 'Full model with 3 interaction terms'; /*reduced model:*/ proc phreg; Z5=Z1*Age; Z6=Z2*Age; Z7=Z3*Age; model time*status(0) = Z1 Z2 Z3 age Z5; title 'Reduced model with only 1 interaction term'; /* alternatively, a Wald test can be specified by TEST statement: */ proc phreg; Z5=Z1*Age; Z6=Z2*Age; Z7=Z3*Age; model time*status(0) = Z1 Z2 Z3 age Z5 Z6 Z7 ; test1: test Z6=Z7=0; /* In the reduced model, how to calculate RR(Stage II vs Stage I)? */ ***************************** Full model with 3 interaction terms 1 Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 394.426 370.155 AIC 394.426 384.155 SBC 394.426 397.539 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 24.2709 7 0.0010 Score 28.5852 7 0.0002 Wald 24.1136 7 0.0011 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio Z1 1 -7.94614 3.67821 4.6670 0.0307 0.000 Z2 1 -0.12250 2.46833 0.0025 0.9604 0.885 Z3 1 0.84702 2.42571 0.1219 0.7270 2.333 age 1 -0.00256 0.02605 0.0096 0.9218 0.997 Z5 1 0.12025 0.05231 5.2853 0.0215 1.128 Z6 1 0.01135 0.03745 0.0919 0.7618 1.011 Z7 1 0.01367 0.03597 0.1445 0.7038 1.014 Estimated Covariance Matrix Variable Z1 Z2 Z3 age Z1 13.52924052 2.93236220 2.95628293 0.04489138 Z2 2.93236220 6.09266544 2.95717875 0.04411237 Z3 2.95628293 2.95717875 5.88408080 0.04417708 age 0.04489138 0.04411237 0.04417708 0.00067864 Z5 -0.19073359 -0.04382437 -0.04421827 -0.00068777 Z6 -0.04386625 -0.09147457 -0.04420681 -0.00067504 Z7 -0.04504689 -0.04424959 -0.08588510 -0.00068052 Variable Z5 Z6 Z7 Z1 -0.19073359 -0.04386625 -0.04504689 Z2 -0.04382437 -0.09147457 -0.04424959 Z3 -0.04421827 -0.04420681 -0.08588510 age -0.00068777 -0.00067504 -0.00068052 Z5 0.00273606 0.00067091 0.00069054 Z6 0.00067091 0.00140243 0.00067714 Z7 0.00069054 0.00067714 0.00129362 ********************************* Reduced model with only 1 interaction term 3 Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 394.426 370.316 AIC 394.426 380.316 SBC 394.426 389.876 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 24.1097 5 0.0002 Score 27.9849 5 <.0001 Wald 23.7747 5 0.0002 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio Z1 1 -7.38147 3.40279 4.7056 0.0301 0.001 Z2 1 0.62156 0.35581 3.0516 0.0807 1.862 Z3 1 1.75350 0.42394 17.1084 <.0001 5.775 age 1 0.00597 0.01488 0.1610 0.6882 1.006 Z5 1 0.11166 0.04767 5.4855 0.0192 1.118 ********************************* Linear Hypotheses Testing Results Wald Label Chi-Square DF Pr > ChiSq test1 0.1613 2 0.9225