I tried to do relative survival analysis specifically poisson regression in relsurv package in R. And I want to include covariate x time interaction term since the hazard (or excess hazard) in my model is not proportional.
I'm not smart enough for all that. Suppose you want to look at the simplest possible interaction say x1 with x2. The interaction term is x1*x2. Now compute x3=x1*x2 and just add x3 to your model. easy to do for a small number of interactions. What do you think? Best wishes, David Booth
David Eugene Booth Thanks for your answer. How about if both of the variables are categorical. Let's say gender(male, female) and age group (group 1, group 2 and group 3), any idea how the dummy table look's like?
In this case, gender would be a 0,1 variable and age a 0,1,2 variable. now do the same as before. looks like quite a few zero's, etc. here x3= gender*age. now just multiply as before. Best, David Booth