Skip to content

Need help? Join our Discord Community!

Discover Causals
What-if Analysis

What-if Analysis

What is What-if analysis

What-if analysis is a subset of Causal Analysis. It is a widely utilized method for analyzing the potential outcomes of different scenarios. It helps individuals comprehend the connection between various elements by examining the potential results of different situations. This method is frequently employed to evaluate the potential consequences of an event or to consider the effects of different actions in a given situation.

In RATH, it is possible to conduct a what-if analysis based on a previously established causal model once the causal discovery process has been completed. This can be done by manipulating one or more variables and observing how it affects the other variables in the model. What-if Analysis based on a Causal Model

Conduct What-if analysis

To facilitate the utilization of what-if analysis, RATH embeds causal discovery algorithms such as DECI, which are capable of discovering nonlinear influences in high-dimensional data through deep learning and using these insights for prediction and inference.

The DECI (Deep End-to-end Causal Inference) algorithm is a causal inference method based on deep learning. It models the causal relationship by constructing a deep neural network and estimates the parameters of the causal relationship through the training of the model. In practice, it can be used to predict the impact of one event on another or to estimate the effect of a measure on an outcome. What if Analysis based on DECI

In this example, we use the "Smoker Status Prediction using Bio-Signals" (opens in a new tab) database from

Consider the relationship between smoking cessation and weight and use RATH's causal discovery feature to produce a causal model. In the what-if analysis module, smoking cessation is selected as an independent variable and adjusted by increasing its value. RATH will estimate and predict the influence of "smoking cessation" on other dependent variables, such as weight, which is expected to increase with the degree of smoking cessation. As the data suggests, quitting smoking may lead to weight gain.

In the case of a slightly more complex dataset, the DECI algorithm can be selected for causal discovery and a preliminary causal structure diagram generated. Initial exploration of the graph can be conducted by clicking on nodes of interest and highlighting these nodes and adjacent edges, with the information of the selected node set displayed on the right. Further exploration functions can be found in the Causal Analysis chapter. What if Analysis based on DECI

In the what-if analysis module, variables of interest can be selected and controlled by clicking on the "triangle button" on the left side of the variable and adjusting its value. The impact of the controlled independent variable on the value of the dependent variable can be observed, with the changes in the values of affected nodes also reflected in the causal graph on the left. RATH supports the simultaneous control of multiple variables to enable multidimensional and complex causal analysis. What if Analysis based on DECI What if Analysis based on DECI

Categorical variables

For some categorical variables, it is more difficult for us to directly observe the influence of this variable by other variables numerically. In the what If analysis module, you only need to click on the category variables, and they will be automatically decomposed into new variables composed of several values (similar to one hot encoding), and then what if will tell you the impact on the decomposed variables effect. (For example, if we have a variable of "taking medicine", it will be decomposed into whether to take medicine A, whether to take medicine B, whether to take a placebo, etc.) Categorial Variables in What-if Analysis

Change graphical visualization layouts

RATH integrates a variety of algorithms for different graphical visualization layouts. For different causal topological structures, you can freely choose the appropriate layout algorithm. To study the inter-variable structure from different perspectives. Change causal analysis graphics

Next steps