Multiple linear and logistic regressions using Python
Having one dependent and one independent variable can provide a certain level of information in a predictive model. However, this information can be prone to the effects of other variables. In this case, the relationship between HbA1c and BMI could potentially be influenced by additional factors such as age and gender. These “other variables,” which were not in the main framework composed of dependent and independent variables, are called confounders. To be able to account for the effects of confounders, we must include them in the model. Once they are included, the model will allow for their interaction with the main variables of interest.
In this case, our main dependent variable is HbA1c and our main independent variable is BMI, but we want to include the age and gender variables in the model too because they are known to be clinically important. Refer to the following figure:
Figure...