## Appendix B Functional Relationships of Synthetic Data Generator  
Each variable in the DAG is associated with one of the following four functions:  
* _identity_\(\rightarrow\) The value of this variable is set beforehand;
* _randint_\(\rightarrow\) A random integer is selected from a range of predefined values;
* _normal_\(\rightarrow\) A random value drawn from a normal gaussian distribution;
* _variable name_\(\rightarrow\) Custom functions defined specifically for the generation of these variables;
* _parametric_\(\rightarrow\) The value of the variable depends on the generated values of all incoming nodes. Specifically, given that some variables \((x_{1},x_{2},\ldots,x_{n})\) directly affect a variable \(y\) in the causal DAG, the output value of \(y\) is of course dependent on the outputs of its parents, along with some inherent to the parent variables and exogenous noise factors \(u\). Therefore, we generate the output of \(y\) as \(y=\sum_{i}^{n}a_{i}x_{i}u_{i}+U\). The parameters of each function were based on values found in the literature, taking into consideration the context of the use cases described in the manuscript (i.e., menopausal women under aromatase inhibitor treatment). All relationships are described in the Table 1, where \(N(\mu,\sigma^{2})\) refers to noise drawn from a normal Gaussian distribution. In addition, the custom functions for each variable mentioned in Table 1 are defined below. For the _BMD Loss_ function, we differentiate between the following cases:  
**Case 1:** Low Exercise \(\rightarrow\) the function is as follows:  
\[\text{bmd loss} = -0.1\cdot\frac{\text{calcium}}{10}-\frac{\text{formation}}{3} \cdot\mathcal{N}(0.5,1)+\frac{\text{ resorption}}{3}+\frac{\text{age}-50}{50}\cdot \mathcal{N}(0.5,1)\] \[+\mathcal{N}(0.5,0.5)+\frac{\text{max}(\text{pa},1)}{4}\cdot \mathcal{N}(1,0.5)+0.5\]  
**Case 2:** Intense Exercise \(\rightarrow\) the function is as follows:  
\[\text{bmd loss} = -0.1\cdot\frac{\text{calcium}}{10}-\frac{\text{formation}}{3} \cdot\mathcal{N}(0.5,1)+\frac{\text{ resorption}}{3}+\frac{\text{age}-50}{50}\cdot \mathcal{N}(0.5,1)\] \[+\mathcal{N}(0.5,0.5)-\frac{\text{pa}}{4}\cdot\mathcal{N}(0.5,0.5)\]  
For _Back Pain_:  
\[\text{back pain}= \begin{cases}\text{randint}(0,1),&\text{if bmd loss}=0\\ \text{randint}(2,3),&\text{if bmd loss}=1\\ \text{randint}(3,4),&\text{if bmd loss}=2\end{cases} \]  
For the _Calcium in Blood_ function, we differentiate between the following cases:  
\[\text{calc in blood}=\text{max}\left((-0.9)^{\text{alcohol}}\cdot(1.1)^{ \text{nutri}}\cdot\frac{\text{vit\_d}}{20}+\mathcal{N}(1,1)\cdot\frac{\text{ bone\_res}}{2}+\mathcal{N}(1,1),\mathcal{N}(0.5,1)\right)\]  
**Case 2:** Calcium Supplementation  
\[\text{calc in blood} = \text{max}\left(\left(6.5+\left(\frac{10.2-8.5}{50-20}\right) \cdot(-0.9)^{\text{alcohol}}\cdot(1.1)^{\text{nutri}}\cdot\frac{\text{vit\_d}}{20}\right.\right.\] \[\left.\left.+\,\mathcal{N}(1,1)\cdot\frac{\text{bone\_res}}{2}+ \mathcal{N}(1,1)\right),7.5+\mathcal{N}(1,1)\right)\]  
For the generation of the _Estrogens_ level, we calculate the following. Let (\(g(f,\,b,\,r,\) aroma, factor) be defined as follows:  
\[g(f,b,r,\text{ aroma, factor})=-\text{factor}\cdot(1.1)^{f}\cdot(1.1)^{r} \cdot(0.9)^{b}\cdot(1.9)^{\text{ aroma}}\]  
**Case 1:** Pre-menopausal patient  
\[u = \max(\text{abs}(\mathcal{N}(50,5)-\text{age}),1)\] \[f_{1} = 400+g(\text{family},\text{bmi},\text{ heritage},\text{ai},9.3)\cdot u\]  
**Case 2:** Menopausal patient  
\[u = \max(\text{abs}(\text{age}-\mathcal{N}(60,10)),1)\] \[f_{1} = 30+g(\text{family},\text{bmi},\text{ heritage},\text{ai},2.31)\cdot u\]