Methods for graphical models and causal inference