# Path Analysis Tab

The Path Analysis tab reveals how causal influence flows through your Digital Twin. While the Relationships tab shows individual connections, Path Analysis shows the bigger picture—how changes propagate through chains of causation.

Understanding causal paths is essential for effective intervention. A variable might influence an outcome through multiple routes, some direct and some indirect. Path Analysis helps you see which routes carry the most influence and where intervention would be most effective.

(SCREENSHOT: Path Analysis tab showing a Sankey diagram of causal flows)

***

### Sankey Diagrams

The primary visualization is a Sankey diagram—a flow chart where the width of each connection represents the strength of causal influence.

**Reading the Diagram:**

* **Nodes** on the left are upstream causes
* **Nodes** on the right are downstream effects
* **Flow width** indicates how much influence passes through each path
* **Colors** distinguish different variables

The wider a flow, the more that path matters for transmitting causal effect.

(SCREENSHOT: Close-up of Sankey diagram showing flow widths and node labels)

***

### Selecting a Focus

Path Analysis is most useful when focused on a specific variable. You have two options:

**Focus on a Node**

Select a variable to see all paths into and out of it:

1. Click a node in the graph, or
2. Select from the Relationships tab before switching to Path Analysis

**Focus on an Edge**

Select a specific relationship to see:

* Upstream paths feeding into the source
* Downstream paths flowing from the target

(SCREENSHOT: Focus selector showing selected node with path counts)

***

### Direction Controls

Filter which paths to display:

**Incoming Paths**

Shows all causal chains that lead *into* the selected variable. This answers: "What drives this outcome?"

Enable this to see:

* Direct causes (one hop away)
* Indirect causes (multiple hops)
* Relative contribution of each path

**Outgoing Paths**

Shows all causal chains that flow *out of* the selected variable. This answers: "What does this variable affect?"

Enable this to see:

* Direct effects
* Downstream ripple effects
* How far influence propagates

(SCREENSHOT: Direction checkboxes for incoming and outgoing paths)

***

### Path Depth

By default, paths extend 2 hops from the focus variable. This captures immediate and secondary effects without overwhelming the visualization.

**Deeper Paths**

For complex models, you might want to trace paths further:

* More depth reveals longer causal chains
* But can make the diagram harder to read
* Use judiciously based on your question

***

### Node Filtering

When your model has many variables, the Sankey can become crowded. Node filtering helps:

**Hiding Nodes**

1. Click the "Hide node..." dropdown
2. Select a variable to hide
3. It disappears from the diagram

Hidden nodes' paths are still calculated, but not displayed.

**Show All / Hide All**

Quick buttons to reset visibility:

* **Show All** – Reveal all hidden nodes
* **Hide All** – Hide everything except the focus

**Show Only Sankey Nodes**

Hides nodes that aren't in the current path analysis, reducing clutter.

(SCREENSHOT: Node filtering dropdown with hide/show controls)

***

### Interpreting Flow Strengths

The Sankey normalizes flows so they sum to 100% for each target node:

**Reading Contributions:**

If node X has three incoming paths with widths 60%, 25%, and 15%, those are the relative contributions of each path to X.

**Comparing Paths:**

When multiple paths lead to the same outcome:

* Wide flows are major contributors
* Narrow flows are minor contributors
* Missing connections mean no direct causal link

**Example:**

If `revenue` has incoming paths from `sales_volume` (70%) and `price` (30%), sales volume is the dominant driver.

(SCREENSHOT: Sankey with percentage labels showing relative contributions)

***

### Use Cases

**Finding Root Causes**

To understand what drives a key outcome:

1. Select the outcome variable
2. Enable "Incoming paths"
3. Trace back to find the primary drivers

**Understanding Intervention Effects**

To see how an intervention propagates:

1. Select the intervention variable
2. Enable "Outgoing paths"
3. See all downstream effects and their relative magnitudes

**Identifying Indirect Effects**

Sometimes A affects C not directly but through B:

1. Select A and enable outgoing
2. See A → B → C chains
3. Understand the mechanism of indirect influence

**Comparing Influence Routes**

If multiple variables affect an outcome:

1. Select the outcome
2. Enable incoming
3. Compare flow widths to prioritize interventions

(SCREENSHOT: Path analysis showing an intervention's downstream effects)

***

### Exporting Path Data

Export the path analysis for external use or reporting:

* Diagram can be saved as an image
* Underlying path data can inform presentations

***

### Best Practices

**Start with Key Outcomes**

Focus first on the variables you care most about. What drives them?

**Trace Back Systematically**

For important outcomes, trace all incoming paths. You might discover unexpected drivers.

**Validate with Domain Knowledge**

If a path doesn't make sense, it might indicate a spurious relationship. Check with the Relationships tab.

**Use for Communication**

Path diagrams are excellent for explaining causal models to non-technical stakeholders. They show influence intuitively.

***

### Next Steps

With causal paths understood:

* Run [Simulations](https://docs.rootcause.ai/user-guide/digital-twin/tabs/simulation-tab) targeting the most influential paths
* Check [Evaluation Tab](https://docs.rootcause.ai/user-guide/digital-twin/tabs/evaluation-tab) to verify path predictions are accurate
* Share diagrams in [Reports](https://gitlab.com/perceptura/gitbooks-docs/-/blob/main/user-guide/digital-twin/reports.md) to communicate findings
