Causal Inference with Complex Data Structures and Non-Standard Effects