Let's say I have a treatment and a test group, and I am trying to interpret the magnitude of confounding variables using logistic regression.
From my understanding, to do so I need 1) the crude risk ratio ($RR_{crude}$), which from my understanding is the risk ratio of the regression model without the confounding variable(s) added to the model and 2) the adjusted risk ratio ($RR_{adjusted}$), which from my understanding is the risk ratio of the regression model with the confounding variable(s) added to the model.
With this information, if I want to get the magnitude of confounding I can use the following equation - source:
$magnitude of confounding =\frac{RR_{crude} - RR_{adjusted}}{RR_{crude}}$
Now here are my questions:
- How do I calculate RR, and is my interpretation of crude and adjusted RR correct (additionally is there a way to calculate RR in Python using
scipy
orstatsmodel
) - i.e. I do understand how to calculate Odds Ratios. - Is the way to calculate the magnitude of confounding above correct?
- How do I interpret the magnitude of confounding? Does it give me an indication as to by what percentage I need to adjust the results of my treatment group to take into account the effect of confounding variables (i.e. if I have a conversion rate on my treatment group of 9% and the magnitude of confounding, is 0.05, does it mean I need to reduce the conversion rate of my treatment group by 5% to take into account the influence of confounding variables?