Causal Inference with Non-IID Data using Linear Graphical Models