My data comes from patients who were treated with Drug A or Drug B. They were not randomized, so there are inequalities between the groups (Drug A group has higher rates of diabetes and is older than Drug B group). I have conducted a polytomous logistic regression to identify significant factors (including diabetes, age and the use of Drug A or B) predicting 4 different adverse events.

My question is, since patients were not randomized to Drug A or Drug B, is confounding an issue here with the results of the regression? I thought logistic regression controls for confounding (at least by the independent variables that have been added to the model) so it shouldn't be an issue, except for unrecognized confounders.

Thanks for any help you can provide!