How to calculate an adjusted difference?

Hi everybody!

In my data, I have 2 groups: one group treated by treatment A and another by treatment B. I calculate the proportion of response to treatment in each group and the difference of the proportion between group A and B. What I would like to calculate is an adjusted difference for categorical variables.

Do you know how I can do this?

Thank you very much!