I am trying to visualize the impact of offer number (max_offer) on 3-year graft failure (deathorretx3). So I am using the following code- stcox, then margins and marginsplot to visualize the change in predicted hazard of graft failure over different values of offer number.
stset px_stat_time_yrs3, fail(deathorretx3) id(pt_code)
stcox maxoffer
margins, at(maxoffer=(1(1)20))
marginsplot

This code turns out how I expect it (i.e. predicted hazard on the y-axis is 1, or baseline, for offer number=1).
However, when I try to plot with adjustment for covariates, using a multivariable Cox model that I developed, the baseline is no longer 1 and the predicted hazard is greater than 1 for offer number=1. Why is this happening and is there a way to recenter the graph to have all the hazards for offer numbers>1 compared to a baseline of hazard = 1 for offer number=1?
Thank you!
stset px_stat_time_yrs3, fail(deathorretx3) id(pt_code)
stcox maxoffer age60 race_nonwhite bmi_calc dm dialysis smoking surg2 dayswait_chron newera crt_2 tbili_3 pvr_recip_3 age_don_55 cva_ddr ischtime6
margins, at(maxoffer=(1(1)20))
marginsplot
stset px_stat_time_yrs3, fail(deathorretx3) id(pt_code)
stcox maxoffer
margins, at(maxoffer=(1(1)20))
marginsplot
This code turns out how I expect it (i.e. predicted hazard on the y-axis is 1, or baseline, for offer number=1).
However, when I try to plot with adjustment for covariates, using a multivariable Cox model that I developed, the baseline is no longer 1 and the predicted hazard is greater than 1 for offer number=1. Why is this happening and is there a way to recenter the graph to have all the hazards for offer numbers>1 compared to a baseline of hazard = 1 for offer number=1?
Thank you!
stset px_stat_time_yrs3, fail(deathorretx3) id(pt_code)
stcox maxoffer age60 race_nonwhite bmi_calc dm dialysis smoking surg2 dayswait_chron newera crt_2 tbili_3 pvr_recip_3 age_don_55 cva_ddr ischtime6
margins, at(maxoffer=(1(1)20))
marginsplot
Comment