Skip to Content
BayesiaLabKey ConceptsCausal Estimation

Causal Estimation

From Identification to Estimation

A causal DAG is a qualitative representation of our theory about the data-generating process. In the three-node tutoring example, the graph tells us to adjust for initial math score ZZ to identify the effect of tutoring XX on final math score YY. It tells us nothing yet about how many score points a student might gain. For estimation we now consider the graph as a model representing the joint probability distribution P(X,Y,Z)P(X,Y,Z) and use applicant data to estimate its probabilities. Causal Identification · Joint Probability Distribution

Suppose we compare assigning zero and twelve hours of tutoring to the same population of applicants. In Pearl’s notation, P(Y∣do⁡(X=x))P(Y \mid \operatorname{do}(X=x)) describes the outcome under assignment to dose xx. The observed distribution P(Y∣see⁡(X=x))P(Y \mid \operatorname{see}(X=x)) describes applicants who chose that dose. In these records, students who chose twelve hours generally started with lower scores. We want the zero-hour and twelve-hour estimates to refer to the same mix of initial scores. The data must also cover the tutoring hours we wish to compare within the relevant initial-score groups. The examples below use synthetic cohorts for which those comparisons are possible.

Estimation With Likelihood Matching

In statistics, matching makes the confounder distributions of the groups being compared as similar as possible. With BayesiaLab’s Likelihood Matching, we match the distributions of the relevant nodes on the basis of the joint probability distribution represented by the Bayesian network. In Observation Mode, Direct Effects applies Likelihood Matching to the nodes designated as Confounders. With no evidence set, their reference distributions are those of the whole modeled cohort.

First assign the roles established by path analysis. To designate the outcome, right-click it and choose Set as Target Node. In these models, BayesiaLab treats the eligible nodes other than the selected driver and the Target Node as Confounders by default. To allow one of those nodes to vary, right-click it, choose Properties > Classes > Add Predefined Class, and select Non_Confounder\mathrm{Non\_Confounder}. Each downloadable example has the roles described below.

To reproduce a curve after checking the roles, enter Validation Mode, use Observation Mode, clear any evidence, and select only the tutoring node being varied. Choose Analysis > Visual > Target > Target's Posterior > Curves > Direct Effects. Choose Mean for both Target and Variables, enable Use Hard Evidence, and click Show Sensitivity Chart. This evaluates the four recorded tutoring doses individually. Direct Effect Curves in the User Guide

Example 1. Estimate the Effect on Final Math Score

Assign the roles. Set Final Math Score\mathit{Final\ Math\ Score} as the Target Node and select Math Tutoring\mathit{Math\ Tutoring} as the driver. The remaining node, Initial Math Score\mathit{Initial\ Math\ Score}, is the Confounder. The three-node model needs no Non_Confounder\mathrm{Non\_Confounder} assignment. Adjustment Criterion · Download the model (.xbl)

Read the estimate. The model groups final math scores into four intervals and retains the mean score within each interval. At each assigned dose, the curve gives the expected final math score in points. Matching keeps the initial-score distribution at its reference so that each dose is evaluated across the same mix of applicants.

Loading SVG...
Click to Zoom
Math tutoring hours assignedMean final math score
075.03
479.57
882.50
1283.53

Assigning twelve hours in place of zero raises the estimated mean final score by 8.50 points. The difference between four and eight hours is smaller, about 2.92 points. Reading the curve at the two doses of interest lets us make either comparison.

Example 2. Estimate the Effect on University Admission

Assign the roles. Set University Admission\mathit{University\ Admission} as the Target Node and select Math Tutoring\mathit{Math\ Tutoring} as the driver. Keep Initial Math Score\mathit{Initial\ Math\ Score} as the Confounder. Assign Final Math Score\mathit{Final\ Math\ Score} to Non_Confounder\mathrm{Non\_Confounder}. It was the outcome in the preceding example. Here it is the mediator through which tutoring can change admission. Identification for the four-node model · Download the model (.xbl)  · Applicant data (.csv) 

Read the estimate. Admission is coded 0 or 1, so its mean is the probability of admission. Applicants start with the same mix of initial scores at each assigned dose. Their final scores can change in response to tutoring.

Math tutoring hours assignedEstimated probability of admission
040.5%
451.0%
858.0%
1260.5%

Assigning twelve hours in place of zero raises the estimated probability of admission by 20.0 percentage points. This is the total causal effect of the change in tutoring in this model. We obtained it with the BayesiaLab command named Direct Effects because the class assignment left the mediated path open. If we also held the final-score distribution fixed, this graph would give the same admission probability at every dose. All of tutoring’s effect on admission passes through the final score.

The evidence setting matters when comparing curves. With Use Hard Evidence cleared, a mean of four tutoring hours can represent a mix of doses. The model then gives 49.4% admission. Assigning every applicant exactly four hours gives the 51.0% shown above. At zero and twelve hours, both settings agree.

Example 3. Estimate the Effects of Math and Essay Tutoring

Assign the roles. Set University Admission\mathit{University\ Admission} as the Target Node in both analyses. The two presets use the same seven-node graph, data, and probability tables. Following the identification result, both presets use Initial Math Score\mathit{Initial\ Math\ Score} and Initial Essay Score\mathit{Initial\ Essay\ Score} as Confounders. Adjustment Criterion

Selected driverNodes assigned to the Non_Confounder class
Math TutoringFinal Math Score\mathit{Final\ Math\ Score}, Final Essay Score\mathit{Final\ Essay\ Score}, and Essay Tutoring\mathit{Essay\ Tutoring}
Essay TutoringFinal Math Score\mathit{Final\ Math\ Score}, Final Essay Score\mathit{Final\ Essay\ Score}, and Math Tutoring\mathit{Math\ Tutoring}

Open the preset for the subject being assigned. A tutoring node in Non_Confounder\mathrm{Non\_Confounder} is excluded from the list of candidate drivers, which is why each subject has its own preset. The other subject’s tutoring is free to follow its usual distribution, and both final scores are free to respond. In each analysis, run Direct Effects with the selected subject as the sole driver. Math tutoring preset (.xbl)  · Essay tutoring preset (.xbl)  · Applicant data (.csv) 

Read the estimates. Each column is a separate intervention. The entries are the estimated probabilities of admission when applicants receive the specified hours in that subject.

Hours assigned in one subjectAssign math tutoringAssign essay tutoring
039.2%40.5%
447.1%47.3%
852.8%52.9%
1255.0%54.4%

Changing the assignment from zero to twelve hours raises estimated admission by 15.8 percentage points for math and 13.9 percentage points for essay. The two zero-hour probabilities differ because zero math hours still allows essay tutoring, and zero essay hours still allows math tutoring.

The User Guide puts the four-node admission estimate beside the prediction for applicants who chose each dose. Chapter 10 develops the matching method used here. Total and Direct Effect Curves · Effect Estimation in Chapter 10 · Likelihood Matching