Counterfactual Reasoning with Probabilistic Graphical Models for Analyzing Socioecological Systems