I have been thinking about our conversation about testing the proportional hazards assumption in a Cox regression. As we discussed, if we have *one* factor in our model with values x=1 and x=0 then entering this factor as a 'stratum' in a Cox regression produces two log(-log S(t)) curves on the same plot, one for each level of x. [The values of S(t) which SPSS uses are the Kaplan Meier estimates when the data is divided into 2 groups, one group for x=1 and one group for x=0].
I have a question, if we had, say, *two* binary variables in the model with levels x=1, x=0, y=1, y=0 in order to assess the proportional hazards assumption for each variable we would
need 4 divisions of the data corresponding to:
x=0, y=0
x=0, y=1
x=1, y=0
x=1, y=1
Do you know of a way in the Cox regression procedure whereby I can derive the four associated log(-log S(t)) curves on the same plot? If not, it will just be a case of deriving Kaplan Meier estimates (S(t)'s) for these 4 groups and then doing subsequent calculations by hand to derive the associated 4 log(-log(S(t)) plots.