{"id":2417,"date":"2020-02-07T16:52:00","date_gmt":"2020-02-07T16:52:00","guid":{"rendered":"https:\/\/mribeirodantas.xyz\/blog\/?p=2417"},"modified":"2025-01-31T04:38:20","modified_gmt":"2025-01-31T02:38:20","slug":"spurious-independence-is-it-real","status":"publish","type":"post","link":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/","title":{"rendered":"Spurious Independence: is it real?"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><b>Reading time: <\/span> <span class=\"rt-time\"> 14<\/span> <span class=\"rt-label rt-postfix\">minutes<\/b><\/span><\/span>\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif?w=640&#038;ssl=1\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">First things first: Spurious Dependence<\/h3>\n\n\n\n<p>Depending on your background, you have already heard of spurious dependence in a way or another. It goes by the names of spurious association, spurious dependence, the famous quote &#8220;<em>correlation does not imply causation<\/em>&#8221; and also other versions based on the same idea that you can not say that  <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> necessarily causes <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> (or vice versa) solely because <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> are associated, that is, because they tend to occur together. Even if one of the events always happens before the other, let&#8217;s say <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> preceding <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>, still, you can not say that <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> causes <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>. There is a statistical test very famous in economics known as Granger causality.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The&nbsp;<strong>Granger causality test<\/strong>&nbsp;is a&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Statistical_hypothesis_testing\">statistical hypothesis test<\/a>&nbsp;for determining whether one&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Time_series\">time series<\/a>&nbsp;is useful in&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Forecasting\">forecasting<\/a>&nbsp;another, first proposed in 1969.<sup><a href=\"https:\/\/en.wikipedia.org\/wiki\/Granger_causality#cite_note-1\">[1]<\/a><\/sup>&nbsp;Ordinarily,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Regression_analysis\">regressions<\/a>&nbsp;reflect &#8220;mere&#8221;&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Correlation\">correlations<\/a>, but&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Clive_Granger\">Clive Granger<\/a>&nbsp;argued that&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Causality\">causality<\/a>&nbsp;in&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Economics\">economics<\/a>&nbsp;could be tested for by measuring the ability to predict the future values of a time series using prior values of another time series. Since the question of &#8220;true causality&#8221; is deeply philosophical, and because of the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Post_hoc_ergo_propter_hoc\">post hoc ergo propter hoc<\/a>&nbsp;fallacy of assuming that one thing preceding another can be used as a proof of causation,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Econometrician\">econometricians<\/a>&nbsp;assert that the Granger test finds only &#8220;predictive causality&#8221;.<\/p><cite><a href=\"https:\/\/en.wikipedia.org\/wiki\/Granger_causality\">Granger Causality at Wikipedia.<\/a><\/cite><\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p>The <em>post hoc ergo propter hoc fallacy<\/em> is also known as <a href=\"https:\/\/en.wikipedia.org\/wiki\/Post_hoc_ergo_propter_hoc\">&#8220;after this, therefore because of this&#8221;<\/a>. It&#8217;s pretty clear today that Granger causality is not an adequate tool to infer causal relationships and this is one of the reasons that when <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> are tested by the granger causality test, and an association is found, it&#8217;s said that <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> <em>Granger-causes<\/em> <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> instead of saying that <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> causes <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>. Maybe it&#8217;s not clear to you why the association between two variables and the notion that one always precedes the other is not enough to say that one is causing the other. One explanation for a hypothetical situation, for example, would be a third <a href=\"https:\/\/en.wikipedia.org\/wiki\/Confounding\">lurking variable<\/a> <span class=\"wp-katex-eq\" data-display=\"false\">C<\/span>, also known as a confounder,  that causes both events, a phenomenon known as <em>confounding<\/em>. By ignoring the existence of <span class=\"wp-katex-eq\" data-display=\"false\">C<\/span> (which in some contexts happens by design and is a strong assumption called <em>unconfoundedness<\/em>), you fail to realize that the events <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> are actually independent when taking into consideration this third variable <span class=\"wp-katex-eq\" data-display=\"false\">C<\/span>, the confounder. Since you ignored it, they seem dependent, associated. A very famous and straight forward example is the positive correlation between (a) ice cream sales and death by drowning or (b) ice cream sales and homicide rate.<\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"440\" data-attachment-id=\"2437\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/icecream-a\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-A.png?fit=667%2C459&amp;ssl=1\" data-orig-size=\"667,459\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"icecream-A\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-A.png?fit=300%2C206&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-A.png?fit=640%2C440&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-A.png?resize=640%2C440&#038;ssl=1\" alt=\"\" class=\"wp-image-2437\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-A.png?w=667&amp;ssl=1 667w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-A.png?resize=300%2C206&amp;ssl=1 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Source: <a href=\"https:\/\/www.lifehack.org\/624604\/the-most-common-bias-people-have-that-leads-to-wrong-decisions\">Life Hack<\/a>.<\/figcaption><\/figure><\/div>\n\n\n\n<p>One can clearly see that it&#8217;s possible to reasonably fit a line with <span class=\"wp-katex-eq\" data-display=\"false\">a&gt;0<\/span> in the plot above, which implies a positive [linear] correlation between the number of ice creams sold and the murder rate.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"426\" data-attachment-id=\"2438\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/icecream-b\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-B.png?fit=684%2C455&amp;ssl=1\" data-orig-size=\"684,455\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"icecream-B\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-B.png?fit=300%2C200&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-B.png?fit=640%2C426&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-B.png?resize=640%2C426&#038;ssl=1\" alt=\"\" class=\"wp-image-2438\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-B.png?w=684&amp;ssl=1 684w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-B.png?resize=300%2C200&amp;ssl=1 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Source: <a href=\"https:\/\/www.lifehack.org\/624604\/the-most-common-bias-people-have-that-leads-to-wrong-decisions\">Life Hack<\/a>.<\/figcaption><\/figure><\/div>\n\n\n\n<p>Though it can sound counter-intuitive in these cases, in some other cases it can sound solid. Apart from confounding bias, there are many other biases, such as collider bias.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>A clear example of collider bias was provided by Sackett in his 1979 paper. He analysed data from 257 hospitalized individuals and detected an association between locomotor disease and respiratory disease (odds ratio 4.06). The association seemed plausible at the time \u2013 locomotor disease could lead to inactivity, which could cause respiratory disease. But Sackett repeated the analysis in a sample of 2783 individuals from the general population and found no association (odds ratio 1.06). The original analysis of hospitalized individuals was biased because both diseases caused individuals to be hospitalized. By looking only within the stratum of hospitalized individuals, Sackett had observed a distorted association. In contrast, in the general population (including a mix of hospitalized and non-hospitalized individuals) locomotor disease and respiratory disease are not associated. In 1979, Sackett termed this phenomenon \u201cadmission rate bias\u201d.<\/p><cite><a href=\"https:\/\/catalogofbias.org\/biases\/collider-bias\/\">Collider bias at Catalog of Bias<\/a>.<\/cite><\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p>Causal graphs are usually shown through Directed Acyclic Graphs (DAGs) where nodes or vertices represent random variables, edges represent causal association between variables and the orientation of edges (direction of arrowhead) identifies which variable causes which (<span class=\"wp-katex-eq\" data-display=\"false\">A \\rightarrow B<\/span> or <span class=\"wp-katex-eq\" data-display=\"false\">B \\rightarrow A<\/span>).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/pbs.twimg.com\/media\/ENjy2F3U4AYb3Px?format=png&amp;name=large\" alt=\"\"\/><figcaption>One-page DAG tutorial from <a href=\"https:\/\/twitter.com\/MariaGlymour\/status\/1213987114573955072\/photo\/1\">here<\/a>.<\/figcaption><\/figure>\n\n\n\n<p>The DAG for the Sackett initial analysis on hospitalized patients can be seen below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"279\" data-attachment-id=\"2449\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/sackket\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/sackket.png?fit=967%2C421&amp;ssl=1\" data-orig-size=\"967,421\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"sackket\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/sackket.png?fit=300%2C131&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/sackket.png?fit=640%2C279&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/sackket.png?resize=640%2C279&#038;ssl=1\" alt=\"\" class=\"wp-image-2449\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/sackket.png?w=967&amp;ssl=1 967w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/sackket.png?resize=300%2C131&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/sackket.png?resize=768%2C334&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Created using <a href=\"http:\/\/dagitty.net\">Dagitty<\/a>.<\/figcaption><\/figure><\/div>\n\n\n\n<p>One must never condition on a collider. If it is not clear to you what I mean by conditioning or controlling, think of C in <span class=\"wp-katex-eq\" data-display=\"false\">P(A,B|C)<\/span>. The collision of arrows means no flow of information through this path. However, if you control for it you open the path and therefore you add bias to your estimation of the effect from the exposure variable on the outcome variable. Since both variables cause hospitalization, knowing that someone has one of them and is hospitalized helps you guess if the patient also has a respiratory disease. When you go to the general population though, as Sackett realized, knowing that someone has locomotor disease tells you nothing about the same person also having a respiratory disease. I won&#8217;t go into much detail on causality and causal graphs here, but <a href=\"https:\/\/www.amazon.com.br\/Book-Why-Science-Cause-Effect\/\">The Book of Why<\/a> is an excellent introductory book for causality and causal graphs in a very light language. If you want something shorter, there is <a href=\"https:\/\/fabiandablander.com\/r\/Causal-Inference.html\">this very good article<\/a> on causal inference. This association effect when conditioning on a collider is known as explaining away effect. Let&#8217;s go to one last example. Let&#8217;s say there are only two ways your car stops moving (<span class=\"wp-katex-eq\" data-display=\"false\">S<\/span>) against your will: either the engine stopped working (<span class=\"wp-katex-eq\" data-display=\"false\">E<\/span>) or you ran out of fuel (<span class=\"wp-katex-eq\" data-display=\"false\">F<\/span>). <span class=\"wp-katex-eq\" data-display=\"false\">E \\rightarrow S \\leftarrow F<\/span>. Since they&#8217;re independent, you can not guess <span class=\"wp-katex-eq\" data-display=\"false\">E<\/span> based on <span class=\"wp-katex-eq\" data-display=\"false\">F<\/span>. A car stopped in the street can be with both the engine broken and without fuel, for example. A car moving can be with the engine working and with fuel. But if you condition on <span class=\"wp-katex-eq\" data-display=\"false\">S<\/span> (car stopped working against your will) and you verified that there is fuel (<span class=\"wp-katex-eq\" data-display=\"false\">F<\/span>), you <em>explain away<\/em> this cause and therefore it must be the engine that stopped working (<span class=\"wp-katex-eq\" data-display=\"false\">E<\/span>). You can read about it <a href=\"https:\/\/martin-thoma.com\/explaining-away\/\">here<\/a> and more <a href=\"https:\/\/stats.stackexchange.com\/questions\/54849\/why-does-explaining-away-make-intuitive-sense\">here<\/a>.<\/p>\n\n\n\n<p>Regarding the two analyses on ice cream sales, there is a third variable that happens to be a confounder: Temperature. In the summer, when it&#8217;s warmer, people tend to swim more often, go out more often and buy ice cream more often. The DAG for this can be seen below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2444\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/icecream-dag\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-dag.png?fit=1194%2C554&amp;ssl=1\" data-orig-size=\"1194,554\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"icecream-dag\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-dag.png?fit=300%2C139&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-dag.png?fit=640%2C297&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-dag.png?fit=1024%2C475&amp;ssl=1\" alt=\"\" class=\"wp-image-2444\" width=\"578\" height=\"268\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-dag.png?w=1194&amp;ssl=1 1194w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-dag.png?resize=300%2C139&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-dag.png?resize=1024%2C475&amp;ssl=1 1024w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/icecream-dag.png?resize=768%2C356&amp;ssl=1 768w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><figcaption>Created using <a href=\"http:\/\/dagitty.net\">Dagitty<\/a>.<\/figcaption><\/figure><\/div>\n\n\n\n<p> Ice cream sales (<span class=\"wp-katex-eq\" data-display=\"false\">I<\/span>) and Homicide rate (<span class=\"wp-katex-eq\" data-display=\"false\">H<\/span>) are actually independent and you can verify this by conditioning on temperature (<span class=\"wp-katex-eq\" data-display=\"false\">T<\/span>), that is, <span class=\"wp-katex-eq\" data-display=\"false\">P(I, H|T) = P(I|T)P(H|T)<\/span>. The idea is to adjust for temperature so that you remove the effect temperature has in the effect by ice cream sales to the homicide rate. The same can be seen for death by drowning. You <strong>must<\/strong> remove confounding in order to properly estimate the effect by the exposure variable (ice cream) on the outcome variable (homicide rate).<\/p>\n\n\n\n<p>You can see many more examples of spurious correlation <a href=\"https:\/\/www.tylervigen.com\/spurious-correlations\">here<\/a>. This is not what brought me here today to write this post, though :-). Now that you&#8217;re introduced to spurious dependence, or understood what I mean by spurious association (or lack thereof), we can finally move to spurious independence :).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Ok, time for a bit of coding.<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">library(tidyverse)\nset.seed(42)\nN = 10000\n# X and Y cause CD, that is, CD is a collider variable\n# in relation to X and Y\n# X -> CD &lt;- Y\nX = rnorm(N)\nY = rnorm(N)\nCD = 1\/2 * X + 1\/2 * Y + rnorm(N)\ndf = data.frame(\n    X=X,\n    Y=Y,\n    CD=CD\n)\ncor.test(df$X, df$Y)$estimate<\/pre>\n\n\n\n<p>The output of the correlation test above is <span class=\"wp-katex-eq\" data-display=\"false\">-0.007281603<\/span>.  This is very close to zero, which means these variables can be said to be linearly independent (let&#8217;s ignore how significant our results are, for example, for the sake of this example). What if we condition on the collider and then assess the correlation between <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>?<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">collider_df = df %>% filter(CD > 1)\ncor.test(collider_df$X, collider_df$Y)$estimate<\/pre>\n\n\n\n<p>The output of the correlation test above is <span class=\"wp-katex-eq\" data-display=\"false\">-0.1688186<\/span>. A&nbsp;Pearson correlation&nbsp;is a number between -1 and 1 that indicates the extent to which two variables are linearly related. The farther from zero, the more associated they are. As you can see from the results above, <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> look more associated after conditioning on the collider <span class=\"wp-katex-eq\" data-display=\"false\">CD<\/span>. What about confounding?<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">library(tidyverse)\nset.seed(42)\nN = 10000\n# X and Y are caused by CF, that is, CF is a confounder variable\n# in relation to X and Y\n# X &lt;- CF -> Y\nCF = rnorm(N)\nX = 0.6 * CF + rnorm(N)\nY = 0.4 * CF + rnorm(N)\ndf = data.frame(\n    X=X,\n    Y=Y,\n    CF=CF\n)\ncor.test(df$X, df$Y)$estimate<\/pre>\n\n\n\n<p>The output of the correlation test above is <span class=\"wp-katex-eq\" data-display=\"false\">0.196769<\/span>. What if we condition on the confounder and then assess the correlation between <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>?<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">confounder_df = df %>% filter(CF > 1)\ncor.test(confounder_df$X, confounder_df$Y)$estimate<\/pre>\n\n\n\n<p>The output of the correlation test above is <span class=\"wp-katex-eq\" data-display=\"false\">0.07287249<\/span>, which is inferior to the value previously calculated. That is, our initial correlation test was biased because of the confounder.<\/p>\n\n\n\n<p>Takeaways for spurious dependence:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Do not control for colliders. You will bias your causal inference between the two variables colliding at the collider.<\/li><li>Control for confounders, otherwise you will obtain a biased estimate of the two variables being caused by the confounder.<\/li><li>In dense graphs (big number of nodes and edges), things can get a bit more complicated, though solutions, when found, can be pretty simple. If you&#8217;re interested in this, check <a href=\"http:\/\/bayes.cs.ucla.edu\/BOOK-2K\/d-sep.html\">this link<\/a> on d-separation set.<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Spurious Independence<\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/media.giphy.com\/media\/UDjF1zMreMld6\/source.gif?w=640&#038;ssl=1\" alt=\"\"\/><\/figure><\/div>\n\n\n\n<p>In this post, I&#8217;m interested in sharing with you some thoughts on a different spurious relationship: independence. If it&#8217;s the first time you&#8217;re running into this, there is a reasonable chance you&#8217;re feeling the same way I felt at first sight: &#8220;How can you have spurious independence!?&#8221;.  It&#8217;s reasonable to have the impression that <span class=\"wp-katex-eq\" data-display=\"false\">A<\/span> is causing <span class=\"wp-katex-eq\" data-display=\"false\">B<\/span>, mostly if <span class=\"wp-katex-eq\" data-display=\"false\">A<\/span> always precedes <span class=\"wp-katex-eq\" data-display=\"false\">B<\/span>, and then understand what&#8217;s going on when you&#8217;re made aware of another thing that is the cause of both of them. Or to restrict your samples to a subset that may look like they&#8217;re associated (Sackett&#8217;s example). But, come on, how can two things that look independent be associated in reality? It can be a bit trickier to understand this one and that&#8217;s why I gave a lengthy introduction to spurious dependence before. Let&#8217;s have a quick look at graphs so that I can give you a graphical explanation for that.<\/p>\n\n\n\n<p>If you think in terms of a DAG with unshielded triplets, that is, three nodes with only two edges, there are four possibilities (three if you ignore orientation for chains) you can draw:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"496\" data-attachment-id=\"2451\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/dag_triplets\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/DAG_triplets.jpg?fit=1200%2C496&amp;ssl=1\" data-orig-size=\"1200,496\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"DAG_triplets\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/DAG_triplets.jpg?fit=300%2C124&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/DAG_triplets.jpg?fit=640%2C264&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/DAG_triplets.jpg?fit=1024%2C423&amp;ssl=1\" alt=\"\" class=\"wp-image-2451\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/DAG_triplets.jpg?w=1200&amp;ssl=1 1200w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/DAG_triplets.jpg?resize=300%2C124&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/DAG_triplets.jpg?resize=1024%2C423&amp;ssl=1 1024w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2019\/12\/DAG_triplets.jpg?resize=768%2C317&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>Chains (<span class=\"wp-katex-eq\" data-display=\"false\"> X \\rightarrow Y \\rightarrow Z<\/span> or <span class=\"wp-katex-eq\" data-display=\"false\">X \\leftarrow Y \\leftarrow Z<\/span>), forks and colliders (also called v-structures). Colliders are particularly pretty interesting, you can play with them <a href=\"https:\/\/watzilei.com\/shiny\/collider\/\">here<\/a>.<\/p>\n\n\n\n<p>The concept of &#8220;controlling for&#8221; or &#8220;conditioning on&#8221; a node can also be seen as <em>data slicing<\/em>. Thinking of it this way can also help you understand the bias found by Sackett. Let&#8217;s say we&#8217;re analyzing the wage gap. We could have a binary variable position (<span class=\"wp-katex-eq\" data-display=\"false\">p<\/span>) with two possible values: management position or non-management position. We want to control for that, that is, to make this variable constant, so we can check the direct effect of something (such as gender, <span class=\"wp-katex-eq\" data-display=\"false\">g<\/span>) on the wage (<span class=\"wp-katex-eq\" data-display=\"false\">w<\/span>). By making \u200b<span class=\"wp-katex-eq\" data-display=\"false\">p=management<\/span>, for example, you&#8217;re slicing the data (you are removing the wages of non-management positions from your data). Let&#8217;s abstract a little. What about immigrants in management positions? And young immigrants in management positions? What about young latin-americans that like rock and roll in management positions? As you can see, the more variables (parameters) we condition on, the less data we have compared to not conditioning at all (full dataset). Save this reasoning, it will be useful soon.<\/p>\n\n\n\n<p>By conditioning on nodes in a DAG you can either close or open a path through which information can flow. In chains and forks, the path is open so you can close the path by controlling for a variable in this path. For example, if <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> causes <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> causes <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span>, and <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> does not cause <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> unless through <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> (which means <span class=\"wp-katex-eq\" data-display=\"false\">X \\rightarrow Y \\rightarrow Z<\/span>) , you can make <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> independent from <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> by conditioning on <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> (check the chain unshielded triplet figure already shown in this post). In colliders, the path is closed by default but you can open the path by conditioning on the collider. If <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> cause <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> but <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> is marginally independent from <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span>, there is no dependence between <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> (<span class=\"wp-katex-eq\" data-display=\"false\">X \\rightarrow Y \\leftarrow Z<\/span>). However, if you condition on <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>, you create a spurious dependence between <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span>. If you do not control for a confounder in forks, you are creating spurious dependence. If you control for a collider in a v-structure, you are creating spurious dependence. As you can see, when thinking of an unshielded triplet of nodes, even though it is clear how to obtain spurious dependence, it is not clear how you would create spurious independence either by controlling or not controlling. However, it is possible to have spurious independence and here I will talk about 4 situations related to spurious independence.<\/p>\n\n\n\n<p>In the network discovery\/inference field, you have basically two main approaches: constraint-based methods (e.g. PC algorithm) and score-based methods (e.g. Bayesian networks). In the constraint-based methods, the algorithm starts with a fully connected graph, also known as a complete graph, and by measuring the lack of statistical association between the nodes, that is, by testing positive for independence, the algorithm removes the edge. If <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>, initially connected, are shown to be [marginally] independent, there is no reason to have an edge between them, for an edge indicates that there is a <strong>direct<\/strong> association between them. Apart from marginal independence, these methods also consider conditional independence, that is, they try to measure the independence of <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> given a third variable <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> or even a set of variables <span class=\"wp-katex-eq\" data-display=\"false\">s = Z_1, Z_2, ..., Z_N<\/span>, known as a <em>separation set<\/em>. It&#8217;s called like this because the set separates <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> from <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1) Too many variables, too few samples<\/h4>\n\n\n\n<p>One of the problems you can run into with these methods is that if you have a number of nodes <span class=\"wp-katex-eq\" data-display=\"false\">N<\/span> given that <span class=\"wp-katex-eq\" data-display=\"false\">N<\/span> is very large, and your sample size is small, there is a chance that by conditioning on a big number of these nodes (repeatedly slicing your data) you will somehow make <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> look independent even if in reality they are not. This is a limitation of traditional constraint-based methods. A dataset with a small sample size with a huge number of variables can work as a poison for these methods.<\/p>\n\n\n\n<p>In <a href=\"http:\/\/kinefold.curie.fr\/isambertlab\/\">Isambert team<\/a> at <a href=\"https:\/\/curie.fr\">Institut Curie<\/a>, we (and many other researchers through the years) have developed a mixed method for causal network discovery called <a href=\"https:\/\/miic.curie.fr\">MIIC<\/a> (<a href=\"https:\/\/www.ncbi.nlm.nih.gov\/pubmed\/29300827\">Sella et al (2018)<\/a>, <a href=\"https:\/\/www.ncbi.nlm.nih.gov\/pubmed\/28968390\">Verny et al (2017)<\/a>, <a href=\"https:\/\/www.ncbi.nlm.nih.gov\/pubmed\/26823190\">Affeldt et al (2016)<\/a> and <a href=\"http:\/\/auai.org\/uai2015\/proceedings\/papers\/293.pdf\">Affeldt and Isambert (2015)<\/a>). It searches for independence between variables, such as constraint-based methods, at the same time that it makes use of scores, just like the score-based methods. Instead of blindly adding variables to the separation set to check if it&#8217;s possible that <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> are independent given these other covariates, we expanded the formulation of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Mutual_information\">mutual information<\/a> to a multivariate mutual information where we add nodes one by one to the separation set and check, one by one, if they contribute to the independence between <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>. If they do not, we do not keep them in the set. We call these nodes contributors and the idea is pretty straightforward: If <span class=\"wp-katex-eq\" data-display=\"false\">MI(X,Y|Z_1) &lt; MI(X,Y)<\/span>, this means that <span class=\"wp-katex-eq\" data-display=\"false\">Z_1<\/span> is <em>contributing<\/em> to explain <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> from <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> and vice-versa. <span class=\"wp-katex-eq\" data-display=\"false\">Z_1<\/span> could be a common cause, a confounder, for example. Therefore, we keep <span class=\"wp-katex-eq\" data-display=\"false\">Z_1<\/span> in the separation set for <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>. If <span class=\"wp-katex-eq\" data-display=\"false\">MI(X,Y|\\{Z_1,Z_2\\} &gt;= MI(X,Y|Z_1)<\/span>, <span class=\"wp-katex-eq\" data-display=\"false\">Z_2<\/span> is not contributing and therefore we do not keep <span class=\"wp-katex-eq\" data-display=\"false\">Z_2<\/span> in the separation set. Then we go to <span class=\"wp-katex-eq\" data-display=\"false\">Z_3<\/span>, given that there is a <span class=\"wp-katex-eq\" data-display=\"false\">Z_3<\/span>. MI means <a href=\"https:\/\/en.wikipedia.org\/wiki\/Mutual_information\">Mutual Information<\/a> and it is the measure we chose to test for association between random variables. Differently from Pearson correlation that only works fine for variables that are linearly associated, MI has good performance over different data relationships.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2880\" height=\"1315\" data-attachment-id=\"2789\" data-permalink=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/pearson-correlation\/\" data-orig-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?fit=2880%2C1315&amp;ssl=1\" data-orig-size=\"2880,1315\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pearson-correlation\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?fit=300%2C137&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?fit=640%2C293&amp;ssl=1\" src=\"https:\/\/i2.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?fit=1024%2C468&amp;ssl=1\" alt=\"\" class=\"wp-image-2789\" srcset=\"https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?w=2880&amp;ssl=1 2880w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?resize=300%2C137&amp;ssl=1 300w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?resize=1024%2C468&amp;ssl=1 1024w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?resize=768%2C351&amp;ssl=1 768w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?resize=1536%2C701&amp;ssl=1 1536w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?resize=2048%2C935&amp;ssl=1 2048w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?w=1280&amp;ssl=1 1280w, https:\/\/i0.wp.com\/mribeirodantas.xyz\/blog\/wp-content\/uploads\/2020\/02\/pearson-correlation.png?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Several sets of (<em>x<\/em>,&nbsp;<em>y<\/em>) points, with the Pearson correlation coefficient of&nbsp;<em>x<\/em>&nbsp;and&nbsp;<em>y<\/em>&nbsp;for each set. The correlation reflects the noisiness and direction of a linear relationship (top row), but not the slope of that relationship (middle), nor many aspects of nonlinear relationships (bottom). N.B.: the figure in the center has a slope of 0 but in that case the correlation coefficient is undefined because the variance of&nbsp;<em>Y<\/em>&nbsp;is zero. Source: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Correlation_and_dependence\">Correlation and Dependence on Wikipedia<\/a>.<\/figcaption><\/figure>\n\n\n\n<p>As you probably know, if <span class=\"wp-katex-eq\" data-display=\"false\">MI(X,Y) = 0<\/span>, then <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and  <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> are independent, that is, <span class=\"wp-katex-eq\" data-display=\"false\">X \\! \\perp \\! Y<\/span>. MIIC makes use of multivariate mutual information and a complexity term (Normalized Maximum Likelihood, NML) taking into consideration sample size, for example, to decide if nodes are independent.<\/p>\n\n\n\n<p>The idea to write this post actually came up when I saw a poster addressing this case by <a href=\"https:\/\/papers.nips.cc\/paper\/8492-conditional-independence-testing-using-generative-adversarial-networks\">Bellot and van der Schaar (2019)<\/a> at NeurIPS 2019. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(2) Spurious conditional independence due to sampling<\/h4>\n\n\n\n<p>When we have a sample of a population we assume that this sample is representative and has the same characteristics as the real distribution. We usually assume that the conditional dependencies or independences that we see in our sampled data are the same as in the population. However, this is not always the case. The existence of such cases is a big problem in constraint-based methods for the order of evaluation can change the final network. That&#8217;s why PC original algorithm is called <em>order-dependent<\/em>. PC has an Oracle and a Sample version, where the sample version is the realistic one in which we do not know the conditional dependencies at beforehand and therefore we must estimate them. This version is the order-dependent one. If the algorithm evaluates first the nodes with the spurious conditional independence (sample noise), we may remove edges that will puzzle our calculations when evaluating nodes with conditional dependencies that are found in the same way in the real population. If by chance we leave them for last, we do not have this cascade effect.<\/p>\n\n\n\n<p>Let&#8217;s say you have a set of cards with what directions (right, left, backward, upward) to take to get to the exit of a labyrinth, and they&#8217;re given to you in the right order. However, one of them is wrong. If the wrong card is the last one, this is fine. You&#8217;re very close to the exit and you will probably be able to leave. The exit can even be just in front of you at the end. However, if it&#8217;s the first card, there is a chance that all the other cards, that have correct coordinates, will lead you to the wrong path and therefore leave you lost in the labyrinth.<\/p>\n\n\n\n<p>A modified version of PC (PC-Stable) by <a href=\"http:\/\/jmlr.org\/papers\/volume15\/colombo14a\/colombo14a.pdf\">Colombo and Maathuis (2014)<\/a> improves PC by making it order-independent and therefore safer regarding this issue.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(3) Contributor node is not in the path<\/h4>\n\n\n\n<p>There is also another type of cause for spurious independence. One that can be clearly seen through graphical models. Consider the graph <span class=\"wp-katex-eq\" data-display=\"false\">X \\rightarrow Y \\rightarrow Z<\/span>. There are only these two edges in this graph. We can lower <span class=\"wp-katex-eq\" data-display=\"false\">MI(Y,Z)<\/span> by conditioning on <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span>, that is, <span class=\"wp-katex-eq\" data-display=\"false\">MI(Y,Z|X) &lt; MI(Y,Z)<\/span>. However, <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> is a father of <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> (there is an oriented edge from <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> to <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span>), and this is the only path between <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span>. This means that having <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> in the separation set, together with other variables, could make <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> independent of <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> even if <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> is independent of <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> conditioning on <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> . That is, there is no path between <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> not passing through <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> and still <span class=\"wp-katex-eq\" data-display=\"false\">X<\/span> can make <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> independent of <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span>. A node <strong style=\"-webkit-user-select: auto;\">must<\/strong> be in a path between <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span> in order to be considered to be in the separation set for the statistical association between <span class=\"wp-katex-eq\" data-display=\"false\">Y<\/span> and <span class=\"wp-katex-eq\" data-display=\"false\">Z<\/span>. The original implementation of PC and other algorithms based on PC do not take this into consideration, which can lead to spurious independence.<\/p>\n\n\n\n<p>MIIC is not vulnerable to this for it searches for consistent separation sets. <a href=\"http:\/\/papers.nips.cc\/paper\/9573-constraint-based-causal-structure-learning-with-consistent-separating-sets\">Li et al (2019)<\/a> wrote a fix for the PC-Stable (and derived) algorithms to also look for consistent separation sets.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(4) Contributor is in a collided path<\/h4>\n\n\n\n<p>After obtaining the final causal graph, it can happen that a node that is in the non-oriented path between two other variables can not be in the separation set because there is a collider in this path. Since information does not flow through colliders, this node can not affect the outcome variable and therefore can not be in the separation set. This could have happened during the skeleton phase, in a step that the graph is still not oriented and therefore the algorithm can not know if nodes are colliders or not.<\/p>\n\n\n\n<p>The previous fix by <a href=\"http:\/\/papers.nips.cc\/paper\/9573-constraint-based-causal-structure-learning-with-consistent-separating-sets\">Li et al (2019)<\/a> also makes MIIC safe regarding this possibility.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Independence or death!<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/i.imgflip.com\/3ok6vz.jpg?w=640&#038;ssl=1\" alt=\"\"\/><figcaption>Trying to understand the causal mechanisms, that is the data generating process or how the variables interact with each other, can be a great ally on avoiding biased estimates.<\/figcaption><\/figure>\n\n\n\n<p>You probably heard about data torture to get what you want and most people are aware of p-hacking and other bad conducts. However, this post goes beyond that to situations in which researchers are not aware of the possibility of some biases affecting their estimates. It can be mindblowing to some people that correlation does not imply causation, or when made aware of confounding effect. Just the same, but less obvious maybe, there is also spurious independence. Now you know \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><b>Reading time: <\/span> <span class=\"rt-time\"> 14<\/span> <span class=\"rt-label rt-postfix\">minutes<\/b><\/span><\/span>First things first: Spurious Dependence Depending on your background, you have already heard of spurious dependence in a way or another. It goes by the names of spurious association, spurious dependence, the famous quote &#8220;correlation does not imply causation&#8221; and also other versions based on the same idea that you can not say that necessarily &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[196,69,3,24],"tags":[9,194,195,10],"class_list":["post-2417","post","type-post","status-publish","format-standard","hentry","category-causality","category-data-science","category-phd","category-r","tag-causality","tag-spurious-dependence","tag-spurious-independence","tag-statistics"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spurious Independence: is it real? - The Dataist Storyteller<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spurious Independence: is it real? - The Dataist Storyteller\" \/>\n<meta property=\"og:description\" content=\"Reading time:  14 minutesFirst things first: Spurious Dependence Depending on your background, you have already heard of spurious dependence in a way or another. It goes by the names of spurious association, spurious dependence, the famous quote &#8220;correlation does not imply causation&#8221; and also other versions based on the same idea that you can not say that necessarily ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/\" \/>\n<meta property=\"og:site_name\" content=\"The Dataist Storyteller\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-07T16:52:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-31T02:38:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif\" \/>\n<meta name=\"author\" content=\"mribeirodantas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"mribeirodantas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/\"},\"author\":{\"name\":\"mribeirodantas\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957\"},\"headline\":\"Spurious Independence: is it real?\",\"datePublished\":\"2020-02-07T16:52:00+00:00\",\"dateModified\":\"2025-01-31T02:38:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/\"},\"wordCount\":3840,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957\"},\"image\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif\",\"keywords\":[\"causality\",\"spurious dependence\",\"spurious independence\",\"statistics\"],\"articleSection\":[\"Causality\",\"Data Science\",\"PhD\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/\",\"url\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/\",\"name\":\"Spurious Independence: is it real? - The Dataist Storyteller\",\"isPartOf\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif\",\"datePublished\":\"2020-02-07T16:52:00+00:00\",\"dateModified\":\"2025-01-31T02:38:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#primaryimage\",\"url\":\"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif\",\"contentUrl\":\"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mribeirodantas.xyz\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spurious Independence: is it real?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#website\",\"url\":\"https:\/\/mribeirodantas.xyz\/blog\/\",\"name\":\"The Dataist Storyteller\",\"description\":\"Telling stories backed by data\",\"publisher\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mribeirodantas.xyz\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957\",\"name\":\"mribeirodantas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6687720529e55feab1680cbd98da5c7f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6687720529e55feab1680cbd98da5c7f?s=96&d=mm&r=g\",\"caption\":\"mribeirodantas\"},\"logo\":{\"@id\":\"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spurious Independence: is it real? - The Dataist Storyteller","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/","og_locale":"en_US","og_type":"article","og_title":"Spurious Independence: is it real? - The Dataist Storyteller","og_description":"Reading time:  14 minutesFirst things first: Spurious Dependence Depending on your background, you have already heard of spurious dependence in a way or another. It goes by the names of spurious association, spurious dependence, the famous quote &#8220;correlation does not imply causation&#8221; and also other versions based on the same idea that you can not say that necessarily ...","og_url":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/","og_site_name":"The Dataist Storyteller","article_published_time":"2020-02-07T16:52:00+00:00","article_modified_time":"2025-01-31T02:38:20+00:00","og_image":[{"url":"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif","type":"","width":"","height":""}],"author":"mribeirodantas","twitter_card":"summary_large_image","twitter_misc":{"Written by":"mribeirodantas","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#article","isPartOf":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/"},"author":{"name":"mribeirodantas","@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957"},"headline":"Spurious Independence: is it real?","datePublished":"2020-02-07T16:52:00+00:00","dateModified":"2025-01-31T02:38:20+00:00","mainEntityOfPage":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/"},"wordCount":3840,"commentCount":1,"publisher":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957"},"image":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#primaryimage"},"thumbnailUrl":"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif","keywords":["causality","spurious dependence","spurious independence","statistics"],"articleSection":["Causality","Data Science","PhD","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/","url":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/","name":"Spurious Independence: is it real? - The Dataist Storyteller","isPartOf":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#primaryimage"},"image":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#primaryimage"},"thumbnailUrl":"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif","datePublished":"2020-02-07T16:52:00+00:00","dateModified":"2025-01-31T02:38:20+00:00","breadcrumb":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#primaryimage","url":"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif","contentUrl":"https:\/\/media.giphy.com\/media\/dXICCcws9oxxK\/source.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/2020\/02\/07\/spurious-independence-is-it-real\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mribeirodantas.xyz\/blog\/"},{"@type":"ListItem","position":2,"name":"Spurious Independence: is it real?"}]},{"@type":"WebSite","@id":"https:\/\/mribeirodantas.xyz\/blog\/#website","url":"https:\/\/mribeirodantas.xyz\/blog\/","name":"The Dataist Storyteller","description":"Telling stories backed by data","publisher":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mribeirodantas.xyz\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/2856ebf8edffabf1f4bbca59bade5957","name":"mribeirodantas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6687720529e55feab1680cbd98da5c7f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6687720529e55feab1680cbd98da5c7f?s=96&d=mm&r=g","caption":"mribeirodantas"},"logo":{"@id":"https:\/\/mribeirodantas.xyz\/blog\/#\/schema\/person\/image\/"}}]}},"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"mribeirodantas","author_link":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/author\/mribeirodantas\/"},"uagb_comment_info":20,"uagb_excerpt":"Reading time: 14 minutesFirst things first: Spurious Dependence Depending on your background, you have already heard of spurious dependence in a way or another. It goes by the names of spurious association, spurious dependence, the famous quote &#8220;correlation does not imply causation&#8221; and also other versions based on the same idea that you can not&hellip;","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paw9jx-CZ","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2417"}],"version-history":[{"count":145,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2417\/revisions"}],"predecessor-version":[{"id":4777,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2417\/revisions\/4777"}],"wp:attachment":[{"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mribeirodantas.xyz\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}