Hello, we're using PROC PHREG to model a Cox regression with 3 time-dependent covariates and want to test if all 3 interactions from this time-dependent covariates equals zero, but we are unable to create a correct TEST statement. The code without the TEST statement (which we assume as valid): proc phreg data = tteana;<br /> class trtpn(ref="1") region; * TRTPN has values 0 or 1, REGION has 4 categories ;<br /> model aval * cnsr(1) = trtpn region aeno1 aeno2 aeno3 aeno1*trtpn aeno2*trtpn aeno3*trtpn / rl;<br /> * TIM1, TIM2, and TIM3 as well as AVAL are time variables ;<br /> if tim1 <= .z or aval <= tim1 then do;<br /> aeno1 = 0; aeno2 = 0; aeno3 = 0; <br /> end;<br /> else do;<br /> if (aval > tim1 and (aval <= tim2 or tim2 = .)) THEN DO;<br /> aeno1 = 1; aeno2 = 0; aeno3 = 0; <br /> end; <br /> else do;<br /> if (aval > tim2 and (aval <= tim3 or tim3 = .)) THEN DO;<br /> aeno1 = 0; aeno2 = 1; aeno3 = 0;<br /> end; <br /> else do;<br /> if (aval > tim3 ) THEN DO;<br /> aeno1 = 0; aeno2 = 0; aeno3 = 1;<br /> end; <br /> end;<br /> end;<br /> end;<br /> *T1: test aeno1*trtpn = aeno2*trtpn = aeno3*trtpn = 0;<br />run; The TEST statement does not work and issues an error message (the * is not allowed). The idea we had, was to create 3 new variables DUMMY1-DUMMY3, which are the same as the interaction terms the following way: proc phreg data = tteana;<br /> class trtpn(ref="1") region ;<br /> model aval * cnsr(1) = trtpn region aeno1 aeno2 aeno3 dummy1 dummy2 dummy3 / RL;<br /> if tim1 <= .z or aval <= tim1 then do;<br /> aeno1 = 0; dummy1 = aeno1*trtpn;<br /> aeno2 = 0; dummy2 = aeno2*trtpn;<br /> aeno3 = 0; dummy3 = aeno3*trtpn;<br /> end;<br /> else do;<br /> if (aval > tim1 and (aval <= tim2 or tim2 = .)) then do;<br /> aeno1 = 1; dummy1 = aeno1*trtpn;<br /> aeno2 = 0; dummy2 = aeno2*trtpn;<br /> aeno3 = 0; dummy3 = aeno3*trtpn;<br /> end; <br /> else do;<br /> if (aval > tim2 and (aval <= tim3 or tim3 = .)) then do;<br /> aeno1 = 0; dummy1 = aeno1*trtpn;<br /> aeno2 = 1; dummy2 = aeno2*trtpn;<br /> aeno3 = 0; dummy3 = aeno3*trtpn;<br /> end; <br /> else do;<br /> if (aval > tim3 ) then do;<br /> aeno1 = 0; dummy1 = aeno1*trtpn;<br /> aeno2 = 0; dummy2 = aeno2*trtpn;<br /> aeno3 = 1; dummy3 = aeno3*trtpn;<br /> end; <br /> end;<br /> end;<br /> end;<br /> T1: Test dummy1 = dummy2 = dummy3 = 0;<br />run; We get a result from the TEST statement, but the estimates for AENO1, AENO2, AENO3 are different from the ones in the first procedure run, the estimates for REGION are the same, the estimates for DUMMY1-DUMMY3 are the negative of the estimates of AEON1*TRTPN, AEON2*TRTPN, AEON3*TRTPN above. Our questions: Are the both models the same? If yes, why are the estimates for different? If no, what exactly is the difference between the two models? Is there any other way to get the test result we want? Any help would be greatly appreciated and thanks in advance trying to understand our problem!
... View more