Regression-Based Estimation of Causal Effects in the Presence of Selection Bias and Confounding