Study design in causal models