Hi I would like to calculate the hazard ratio for each level of the scorequartile variable (0-4) for each treatment in procedure =1 and procedure = 0
I have tried the following, but it doesn't really make any sense
Scorequartile is an ordinal variable
1 - Patient score 0 - 26
2 - Patient score 26.25-36
3 - Patient score 36.25 = 42
4 - Patient score 42.5 - 48
Procedure - categorical variable where 0 is control 1 = new treatment
AiM: To plot hazard ratio for each score quartile for procedure = 0 and procedure 1
Using this as a sensitivity analysis
The output doesn't make sense, with margins of 1256 which doesn't make sense as my initial cox model output makes sense where at the quartile increases to 4 the hazard ratio decreases which makes sense, patients are more satisfied therefore less likely for procedure to be called a failure.
Is there something wrong my margins code?
Which I don't understand
I have tried the following, but it doesn't really make any sense
Scorequartile is an ordinal variable
1 - Patient score 0 - 26
2 - Patient score 26.25-36
3 - Patient score 36.25 = 42
4 - Patient score 42.5 - 48
Procedure - categorical variable where 0 is control 1 = new treatment
AiM: To plot hazard ratio for each score quartile for procedure = 0 and procedure 1
Using this as a sensitivity analysis
Code:
stset survvialt [pw=attweight], failure(failed==1) stcox i.scorequartile i.procedure age##age margins, at(scorequartile=(1 2 3 4) procedure=(0 1))
Is there something wrong my margins code?
Which I don't understand