I calculated univariate odds ratio as follows:
table(d[,c("copd", "nsurgrespicatelectbpnards")])
nsurgrespicatelectbpnards
copd N Y
N 73 19
Y 26 31
m <- glm(nsurgrespicatelectbpnards~copd, data = d, family = 'binomial')
exp(cbind(OR=coef(m)[2], CI95lo=confint(m)[2,1], CI95hi=confint(m)[2,2]))
OR CI95lo CI95hi
copdY 4.580972 2.2436010 9.6223563
My intrepretation is that people with COPD (lung disease) have an odds ratio of 4.58 of having a postoperative respiratory complication (nsurgrespicatelectbpnards) compared to people not having COPD. 0.26 being the odds of having a complication while not having COPD (i.e 19/73).
Is that correct, disregarding regression diagnostics?