Three essays on causal inference