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

Slides:



Advertisements
Similar presentations
1 Learning Causal Structure from Observational and Experimental Data Richard Scheines Carnegie Mellon University.
Advertisements

Causal Data Mining Richard Scheines Dept. of Philosophy, Machine Learning, & Human-Computer Interaction Carnegie Mellon.
Structural Equation Modeling
Discovering Cyclic Causal Models by Independent Components Analysis Gustavo Lacerda Peter Spirtes Joseph Ramsey Patrik O. Hoyer.
Topic Outline Motivation Representing/Modeling Causal Systems
Outline 1)Motivation 2)Representing/Modeling Causal Systems 3)Estimation and Updating 4)Model Search 5)Linear Latent Variable Models 6)Case Study: fMRI.
Challenges posed by Structural Equation Models Thomas Richardson Department of Statistics University of Washington Joint work with Mathias Drton, UC Berkeley.
1 Automatic Causal Discovery Richard Scheines Peter Spirtes, Clark Glymour Dept. of Philosophy & CALD Carnegie Mellon.
Regulatory Network (Part II) 11/05/07. Methods Linear –PCA (Raychaudhuri et al. 2000) –NIR (Gardner et al. 2003) Nonlinear –Bayesian network (Friedman.
Temporal Causal Modeling with Graphical Granger Methods
Ambiguous Manipulations
Pengujian Parameter Koefisien Korelasi Pertemuan 04 Matakuliah: I0174 – Analisis Regresi Tahun: Ganjil 2007/2008.
Chapter Topics Types of Regression Models
Stat 217 – Day 25 Regression. Last Time - ANOVA When?  Comparing 2 or means (one categorical and one quantitative variable) Research question  Null.
1 gR2002 Peter Spirtes Carnegie Mellon University.
Linear Regression Example Data
MACHINE LEARNING 6. Multivariate Methods 1. Based on E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1) 2 Motivating Example  Loan.
Pertemua 19 Regresi Linier
Causal Modeling for Anomaly Detection Andrew Arnold Machine Learning Department, Carnegie Mellon University Summer Project with Naoki Abe Predictive Modeling.
Chapter 14 Introduction to Linear Regression and Correlation Analysis
Chapter 7 Forecasting with Simple Regression
1 Richard Scheines Carnegie Mellon University Causal Graphical Models II: Applications with Search.
1 Center for Causal Discovery: Summer Workshop June 8-11, 2015 Carnegie Mellon University.
1 Day 2: Search June 9, 2015 Carnegie Mellon University Center for Causal Discovery.
CAUSAL SEARCH IN THE REAL WORLD. A menu of topics  Some real-world challenges:  Convergence & error bounds  Sample selection bias  Simpson’s paradox.
Bayes Net Perspectives on Causation and Causal Inference
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 12-1 Chapter 12 Simple Linear Regression Statistics for Managers Using.
Summary of the Bayes Net Formalism David Danks Institute for Human & Machine Cognition.
OPIM 303-Lecture #8 Jose M. Cruz Assistant Professor.
© 2003 Prentice-Hall, Inc.Chap 13-1 Basic Business Statistics (9 th Edition) Chapter 13 Simple Linear Regression.
1 Tutorial: Causal Model Search Richard Scheines Carnegie Mellon University Peter Spirtes, Clark Glymour, Joe Ramsey, others.
1 Causal Data Mining Richard Scheines Dept. of Philosophy, Machine Learning, & Human-Computer Interaction Carnegie Mellon.
Introduction to Linear Regression
Chap 12-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 12 Introduction to Linear.
1 Center for Causal Discovery: Summer Workshop June 8-11, 2015 Carnegie Mellon University.
Nov. 13th, Causal Discovery Richard Scheines Peter Spirtes, Clark Glymour, and many others Dept. of Philosophy & CALD Carnegie Mellon.
Slide 6.1 Linear Hypotheses MathematicalMarketing In This Chapter We Will Cover Deductions we can make about  even though it is not observed. These include.
Methodological Problems in Cognitive Psychology David Danks Institute for Human & Machine Cognition January 10, 2003.
Learning Linear Causal Models Oksana Kohutyuk ComS 673 Spring 2005 Department of Computer Science Iowa State University.
Penn State - March 23, The TETRAD Project: Computational Aids to Causal Discovery Peter Spirtes, Clark Glymour, Richard Scheines and many others.
Learning the Structure of Related Tasks Presented by Lihan He Machine Learning Reading Group Duke University 02/03/2006 A. Niculescu-Mizil, R. Caruana.
Controlling for Baseline
G Lecture 81 Comparing Measurement Models across Groups Reducing Bias with Hybrid Models Setting the Scale of Latent Variables Thinking about Hybrid.
1 BN Semantics 1 Graphical Models – Carlos Guestrin Carnegie Mellon University September 15 th, 2008 Readings: K&F: 3.1, 3.2, –  Carlos.
Talking Points Joseph Ramsey. LiNGAM Most of the algorithms included in Tetrad (other than KPC) assume causal graphs are to be inferred from conditional.
Estimating and Testing Hypotheses about Means James G. Anderson, Ph.D. Purdue University.
Lecture 2: Statistical learning primer for biologists
CAUSAL REASONING FOR DECISION AIDING SYSTEMS COGNITIVE SYSTEMS LABORATORY UCLA Judea Pearl, Mark Hopkins, Blai Bonet, Chen Avin, Ilya Shpitser.
1 BN Semantics 2 – Representation Theorem The revenge of d-separation Graphical Models – Carlos Guestrin Carnegie Mellon University September 17.
CHAPTER 3: BAYESIAN DECISION THEORY. Making Decision Under Uncertainty Based on E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1)
1 BN Semantics 1 Graphical Models – Carlos Guestrin Carnegie Mellon University September 15 th, 2006 Readings: K&F: 3.1, 3.2, 3.3.
Summary: connecting the question to the analysis(es) Jay S. Kaufman, PhD McGill University, Montreal QC 26 February :40 PM – 4:20 PM National Academy.
Bayesian Brain Probabilistic Approaches to Neural Coding 1.1 A Probability Primer Bayesian Brain Probabilistic Approaches to Neural Coding 1.1 A Probability.
1 Day 2: Search June 9, 2015 Carnegie Mellon University Center for Causal Discovery.
1 Day 2: Search June 14, 2016 Carnegie Mellon University Center for Causal Discovery.
Multiple Regression Reference: Chapter 18 of Statistics for Management and Economics, 7 th Edition, Gerald Keller. 1.
Tetrad 1)Main website: 2)Download:
Financial Econometrics Lecture Notes 4
Statistics for Managers using Microsoft Excel 3rd Edition
Workshop Files
Workshop Files
Center for Causal Discovery: Summer Short Course/Datathon
Center for Causal Discovery: Summer Short Course/Datathon
Causal Data Mining Richard Scheines
Causal Discovery Richard Scheines Peter Spirtes, Clark Glymour,
Extra Slides.
Searching for Graphical Causal Models of Education Data
Correlation and Prediction
Presentation transcript:

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

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

Tetrad IV: Complete Causal Modeling Tool 3

Tetrad 1)Main website: 2)Download site: 3)Data files: 4

Topic Outline 1)Motivation 2)Representing/Modeling Causal Systems 3)Estimation and Updating 4)Model Search 5)Linear Latent Variable Models 6)Case Study: fMRI 5

Statistical Causal Models: Goals 1)Policy, Law, and Science: How can we use data to answer a)subjunctive questions (effects of future policy interventions), or b)counterfactual questions (what would have happened had things been done differently (law)? c)scientific questions (what mechanisms run the world) 2)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? 6

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

Foundations of Causal Epistemology Some Causal Structures can parameterize the same set of probability distributions, some cannot 8 X ZY X ZY X ZY X ZY P 2 (X,YZ) P 1 (X,YZ)

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

10 Foreign Investment Does Foreign Investment in 3 rd World Countries inhibit Democracy? Timberlake, M. and Williams, K. (1984). Dependence, political exclusion, and government repression: Some cross-national evidence. American Sociological Review 49, N = 72 POdegree of political exclusivity CVlack of civil liberties ENenergy consumption per capita (economic development) FIlevel of foreign investment

11 Correlations po fi en fi en cv Foreign Investment

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

Alternatives Case Study 1: Foreign Investment 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.

Outline 1)Motivation 2)Representing/Modeling Causal Systems 1)Causal Graphs 2)Standard Parametric Models 1)Bayes Nets 2)Structural Equation Models 3)Other Parametric Models 1)Generalized SEMs 2)Time Lag models 14

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

16 Causal Graphs Not Cause Complete Common Cause Complete

17 Sweaters On Room Temperature Pre-experimental SystemPost Modeling Ideal Interventions Interventions on the Effect

18 Modeling Ideal Interventions Sweaters On Room Temperature Pre-experimental SystemPost Interventions on the Cause

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

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

21 Parametric Models

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

23 Causal Bayes Networks 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(  ) The Joint Distribution Factors According to the Causal Graph, All variables binary [0,1]:  = {  1,  2,  3,  4,  5, }

24 Tetrad Demo

25 Structural Equation Models zStructural Equations F or each variable X  V, an assignment equation: X := f X (immediate-causes(X),  X ) Causal Graph zExogenous Distribution : Joint distribution over the exogenous vars : P(  )

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

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

28 Instantiated Models

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

Outline 1)Motivation 2)Representing/Modeling Causal Systems 1)Causal Graphs 2)Standard Parametric Models 1)Bayes Nets 2)Structural Equation Models 3)Other Parametric Models 1)Generalized SEMs 2)Time Lag models 30

Generalized SEM 1)The Generalized SEM is a generalization of the linear SEM model. 2)Allows for arbitrary connection functions 3)Allows for arbitrary distributions 4)Simulation from cyclic models supported.

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

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

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 1)Estimate one Bayes PM for which you have an IM and data 2)Estimate one SEM PM for which you have an IM and data 3)Import data from charity.txt, and build and estimate model two models to estimate on those data

Hypothesis 1 37 Hypothesis 2

38 Updating

39 Tetrad Demo 1)Pick one of your Bayes IMs 2)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 3)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