1 / 39

Tetrad: Machine Learning and Graphcial Causal Models

Tetrad: Machine Learning and Graphcial Causal Models. Richard Scheines Joe Ramsey Carnegie Mellon University. Peter Spirtes, Clark Glymour. Goals. Convey rudiments of graphical causal models Basic working knowledge of Tetrad IV. Tetrad IV: Complete Causal Modeling Tool. Tetrad.

hazina
Download Presentation

Tetrad: Machine Learning and Graphcial Causal Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tetrad: Machine Learning and Graphcial Causal Models Richard Scheines Joe Ramsey Carnegie Mellon University Peter Spirtes, Clark Glymour

  2. Goals Convey rudiments of graphical causal models Basic working knowledge of Tetrad IV

  3. Tetrad IV: Complete Causal Modeling Tool

  4. Tetrad Main website: http://www.phil.cmu.edu/projects/tetrad/ Download site: http://www.phil.cmu.edu/projects/tetrad_download/ Data files: www.phil.cmu.edu/projects/tetrad_download/download/workshop/Data/

  5. Topic Outline Motivation Representing/Modeling Causal Systems Estimation and Updating Model Search Linear Latent Variable Models Case Study: fMRI

  6. StatisticalCausal Models: Goals • Policy, Law, and Science: How can we use data to answer • subjunctive questions (effects of future policy interventions), or • counterfactual questions (what would have happened had things been done differently (law)? • scientific questions (what mechanisms run the world) • Rumsfeld Problem: Do we know what we do and don’t know: Can we tell when there is or is not enough information in the data to answer causal questions?

  7. Causal Inference Requires More than Probability Prediction from Observation ≠ Prediction from Intervention P(Lung Cancer 1960 = y | Tar-stained fingers 1950 = no) ≠ P(Lung Cancer 1960 = y | Tar-stained fingers 1950 set = no) In general: P(Y=y | X=x, Z=z) ≠ P(Y=y | Xset=x, Z=z) Causal Prediction vs. Statistical Prediction: Non-experimental data (observational study) P(Y=y | X=x, Z=z) P(Y,X,Z) P(Y=y | Xset=x, Z=z) Causal Structure Background Knowledge

  8. Foundations of Causal Epistemology Some Causal Structures can parameterize the sameset of probability distributions, some cannot P1(X,YZ) Y Z X Y Z X P2(X,YZ) Y Z X Y Z X

  9. Causal Search Causal Search: Find/compute all the causal models that are indistinguishable given background knowledge and data Represent features common to all such models Multiple Regressionis often the wrong tool for Causal Search: Example: Foreign Investment & Democracy

  10. Does Foreign Investment in 3rd World Countries inhibit Democracy? Foreign Investment Timberlake, M. and Williams, K. (1984). Dependence, political exclusion, and government repression: Some cross-national evidence. American Sociological Review 49, 141-146. N = 72 PO degree of political exclusivity CV lack of civil liberties EN energy consumption per capita (economic development) FI level of foreign investment

  11. Foreign Investment Correlations po fi en fi -.175 en -.480 0.330 cv 0.868 -.391 -.430

  12. Case Study 1: Foreign Investment Regression Results po = .227*fi - .176*en + .880*cv SE (.058) (.059) (.060) t 3.941 -2.99 14.6 Interpretation: foreign investment increases political repression

  13. Case Study 1: Foreign Investment Alternatives There is no model with testable constraints (df > 0) in which FI has a positive effect on PO that is not rejected by the data.

  14. Outline • Motivation • Representing/Modeling Causal Systems • Causal Graphs • Standard Parametric Models • Bayes Nets • Structural Equation Models • Other Parametric Models • Generalized SEMs • Time Lag models

  15. Causal Graphs Causal Graph G = {V,E} Each edge X  Y represents a direct causal claim: X is a direct cause of Y relative to V Years of Education Income Years of Education Skills and Knowledge Income

  16. Causal Graphs Not Cause Complete Common Cause Complete

  17. Modeling Ideal Interventions Interventions on the Effect Post Pre-experimental System Room Temperature Sweaters On

  18. Modeling Ideal Interventions Interventions on the Cause Post Pre-experimental System Sweaters On Room Temperature

  19. Pre-intervention graph “Soft” Intervention “Hard” Intervention Interventions & Causal Graphs Model an ideal intervention by adding an “intervention” variable outside the original system as a direct cause of its target. Intervene on Income

  20. Tetrad Demo Build and Save an acyclic causal graph: with 3 measured variables, no latents with at least 3 measured variables, and at least 1 latent

  21. Parametric Models

  22. Causal Bayes Networks The Joint Distribution Factors According to the Causal Graph, P(S,YF, L) = P(S) P(YF | S) P(LC | S)

  23. Causal Bayes Networks The Joint Distribution Factors According to the Causal Graph, P(S = 0) = 1 P(S = 1) = 1 - 1 P(YF = 0 | S = 0) = 2 P(LC = 0 | S = 0) = 4 P(YF = 1 | S = 0) = 1- 2 P(LC = 1 | S = 0) = 1- 4 P(YF = 0 | S = 1) = 3 P(LC = 0 | S = 1) = 5 P(YF = 1 | S = 1) = 1- 3 P(LC = 1 | S = 1) = 1- 5 P(S) P(YF | S) P(LC | S) = f() All variables binary [0,1]:  = {1, 2,3,4,5,}

  24. Tetrad Demo

  25. Structural Equation Models Causal Graph • Structural Equations For each variable X  V, an assignment equation: X := fX(immediate-causes(X), eX) • Exogenous Distribution: Joint distribution over the exogenous vars : P(e)

  26. Linear Structural Equation Models Causal Graph Path diagram Equations: Education := Education Income :=Educationincome Longevity :=EducationLongevity Exogenous Distribution: P(ed, Income,Income) - i≠jei ej(pairwise independence) - no variance is zero E.g. (ed, Income,Income) ~N(0,2) 2 diagonal, - no variance is zero Structural Equation Model: V = BV + E

  27. Tetrad Demo • Interpret your causal graph with 3 measured variables with at least 2 parametric models: • Bayes Parametric Model • SEM Parametric Model • Interpret your other graph with a parametric model of your choice

  28. Instantiated Models

  29. Tetrad Demo Instantiate at least one Bayes PM with a Bayes IM Instantiate at least one SEM PM with a SEM IM Instantiate at least one SEM PM with a Standardized SEM IM Generate two data sets (N= 50, N=5,000) for each

  30. Outline • Motivation • Representing/Modeling Causal Systems • Causal Graphs • Standard Parametric Models • Bayes Nets • Structural Equation Models • Other Parametric Models • Generalized SEMs • Time Lag models

  31. Generalized SEM • The Generalized SEM is a generalization of the linear SEM model. • Allows for arbitrary connection functions • Allows for arbitrary distributions • Simulation from cyclic models supported.

  32. Hands On • Create a DAG. • Parameterize it as a Generalized SEM. • Open the Generalized SEM and select Apply Templates from the Tools menu. • Apply the default template to variables, which will make them all linear functions. • For errors, select a non-Gaussian distribution, such as U(0, 1). • Save.

  33. Time Series Simulation (Hands On) • Tetrad includes support for doing time series simulations. • First, one creates a time series graph. • Then one parameterizes the time series graph as a SEM. • Then one instantiates the SEM. • Then one simulates data from the SEM Instantiated Model.

  34. Time Series Simulation • One can, e.g., calculate a vector auto-regression for it. (One can do this as well from time series data loaded in.) • Attach a data manipulation box to the data. • Select vector auto-regression. • One can create staggered time series data • Attach a data manipulation box. • Select create time series data. • Should give the time lag graph with some extra edges in the highest lag.

  35. Estimation

  36. Tetrad Demo Estimate one Bayes PM for which you have an IM and data Estimate one SEM PM for which you have an IM and data Import data from charity.txt, and build and estimate model two models to estimate on those data

  37. Hypothesis 1 Hypothesis 2

  38. Updating

  39. Tetrad Demo Pick one of your Bayes IMs Find a variable X to update conditional on Y such that:The marginal on X changes when Y is passively observed = y, but does not change when Y is manipulated = y Find a variable Z to update conditional on W such that:The marginal on Z changes when W is passively observed = w, and changes in exactly the same way when W is manipulated = w

More Related