I am doing a logistic regression in r, however the OR (OddsRatio) gives me the inverse, giving me the OR for the reference value but not for the variable that is on the same line
library(finalfit)
colon_s %>%
finalfit("mort_5yr", c("hospital", "sex.factor"))
results
Dependent: Mortality 5 year Alive Died OR (univariable)
hospital hospital_1 176 (96.2) 7 (3.8) -
hospital_2 120 (67.0) 59 (33.0) 12.36 (5.82-30.55, p<0.001)
hospital_3 106 (57.9) 77 (42.1) 18.26 (8.67-44.90, p<0.001)
hospital_4 89 (48.4) 95 (51.6) 26.84 (12.77-65.91, p<0.001)
hospital_5 20 (10.8) 166 (89.2) 208.69 (91.64-549.67, p<0.001)
Sex Female 243 (55.6) 194 (44.4) -
Male 268 (56.1) 210 (43.9) 0.98 (0.76-1.27, p=0.889)
How do I invert the OR, in the style of Stata? since it seems that the risk of hospital 2 is 12.36 compared to hospital 1, and it is not, it is of hospital 1, compared to hospital 2.
I would prefer that instead of 12 the risk of hospital 2 appear compared to hospital 1 which is 0.8