# Methodological question: adjusting for confounders in logistic regression

I have three attributes in a dataset (D0), representing the binary response of success or failure (R), some form of treatment or treatment group (T), and a potential confounder (C) respectively. Building a logistic regression model (with eg. logit link) to predict R with T and C as covariates, I can get the log-odds of success for R, whilst adjusting for C.

My question is: does it make sense to generate an "adjusted dataset" D1, whereby R has been adjusted for C? To be more specific, T and C in D1 will be exactly the same as that of in D0, but the values of R in D1 will be different: R in D1 will be dictated by the coefficients in the logistic model.

I recognize that for simple OLS regression, this is trivial. But since logistic regression is predicting log-odds (and hence also predicting the probabilities Pr(R = success)), there is an additional step to convert the probabilities into actual binary values.

Typically, we can use a data-driven threshold to convert the probabilities into binary values, by looking at various metrics such as specificity, sensitivity, etc. But these are driven by predictions and accuracy - what I am looking at is statistical adjustments.

Any ideas? Is such a procedure of generating "adjusted datasets" with logistic regression even valid?

Thanks!

• I'm not sure I understood what you mean. You want the vector of predicted values of D starting from T and C? Logistic regression indeed gives you a set of probabilities. Then you have to choose a threshold for binarization, usually 0.5, which will transform probabilities in 0|1 values. Most statistical software should be able to do this for you. – Bakaburg Nov 24 '15 at 10:15
• Reasons for using other thresholds are not driven by statistics but from your needs. for example, if you estimate the risk for death given clinical factors, maybe you would prefer using a lower threshold, since you prefer false positives (patient predicted to die but then survived) than false negatives (patient predicted to survive but the died). Or you could use other parameters to choose the threshold: eg. lower the dead|not dead threshold as much as the increase in costs for an aggressive therapy doesn't exceed a certain value. – Bakaburg Nov 24 '15 at 10:19