A Semiparametric Approach to Causal Inference