How to get the Hazard Ratios in each level of the subgroup variable? For example, in my example below, I want to get HR/(95% CI) in male patients (treatment effect of arm1 to arm 2 in male patients) and HR/(95% CI) in female patients (treatment effect of arm 1 to arm 2 in female patients).
I read a discussion and it was suggested to include an interaction term, better than subsetting the data. But I do not see how to get HRs in each subset of patients.
What I want is like in the forest plot, HR of the two treatment arms in one category, and another category: