Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Apr 23, 2024
1 parent d360af0 commit e004f97
Show file tree
Hide file tree
Showing 42 changed files with 2,320 additions and 672 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
76578e17
626ca465
46 changes: 26 additions & 20 deletions 01-introduccion.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@
<a href="./09-modelos-jerarquicos.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Modelos jerárquicos</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./13-exp-naturales.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">10</span>&nbsp; <span class="chapter-title">Otros métodos para inferencia causal</span></span></a>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -360,14 +366,14 @@ <h3 class="unnumbered anchored" data-anchor-id="ejemplo-cálculos-renales">Ejemp
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">A</td>
<td style="text-align: left;">B</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">sin_mejora</td>
<td style="text-align: left;">mejora</td>
</tr>
<tr class="even">
<td style="text-align: left;">B</td>
<td style="text-align: left;">grandes</td>
<td style="text-align: left;">mejora</td>
<td style="text-align: left;">sin_mejora</td>
</tr>
<tr class="odd">
<td style="text-align: left;">B</td>
Expand All @@ -380,34 +386,34 @@ <h3 class="unnumbered anchored" data-anchor-id="ejemplo-cálculos-renales">Ejemp
<td style="text-align: left;">mejora</td>
</tr>
<tr class="odd">
<td style="text-align: left;">B</td>
<td style="text-align: left;">grandes</td>
<td style="text-align: left;">sin_mejora</td>
<td style="text-align: left;">A</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">mejora</td>
</tr>
<tr class="even">
<td style="text-align: left;">B</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">mejora</td>
<td style="text-align: left;">sin_mejora</td>
</tr>
<tr class="odd">
<td style="text-align: left;">A</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">B</td>
<td style="text-align: left;">grandes</td>
<td style="text-align: left;">mejora</td>
</tr>
<tr class="even">
<td style="text-align: left;">A</td>
<td style="text-align: left;">grandes</td>
<td style="text-align: left;">sin_mejora</td>
<td style="text-align: left;">B</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">mejora</td>
</tr>
<tr class="odd">
<td style="text-align: left;">A</td>
<td style="text-align: left;">B</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">mejora</td>
</tr>
<tr class="even">
<td style="text-align: left;">A</td>
<td style="text-align: left;">grandes</td>
<td style="text-align: left;">mejora</td>
<td style="text-align: left;">B</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">sin_mejora</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -660,8 +666,8 @@ <h3 class="unnumbered anchored" data-anchor-id="ejemplo-cálculos-renales">Ejemp
<span id="cb8-14"><a href="#cb8-14" aria-hidden="true" tabindex="-1"></a><span class="st">"</span>, <span class="at">width =</span> <span class="dv">200</span>, <span class="at">height =</span> <span class="dv">50</span>)</span></code><button title="Copiar al portapapeles" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<div id="htmlwidget-7784c180be73fdc6a1f1" style="width:100%;height:162px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-7784c180be73fdc6a1f1">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.2]\n node [shape=plaintext]\n T \n M \n C\n edge [minlen = 3]\n T -> M\n C -> T\n C -> M\n{ rank = same; M; T }\n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
<div id="htmlwidget-4b30c64dd3ac1151f95c" style="width:100%;height:162px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-4b30c64dd3ac1151f95c">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.2]\n node [shape=plaintext]\n T \n M \n C\n edge [minlen = 3]\n T -> M\n C -> T\n C -> M\n{ rank = same; M; T }\n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>Es decir, el tamaño de los cálculos es una causa común de tratamiento (T) y resultado (M). Veremos más adelante que la decisión de condicionar a el tipo de cálculos proviene de un análisis relativamente simple de este diagrama causal, independientemente de los métodos que usemos para estimar las proporciones de interés (en este ejemplo, examinar las tablas cruzadas es equivalente a hacer estimaciones de máxima verosimlitud).</p>
Expand Down Expand Up @@ -782,8 +788,8 @@ <h3 class="unnumbered anchored" data-anchor-id="ejemplo-cálculos-renales-2">Eje
<span id="cb11-14"><a href="#cb11-14" aria-hidden="true" tabindex="-1"></a><span class="st">"</span>, <span class="at">width =</span> <span class="dv">200</span>, <span class="at">height =</span> <span class="dv">50</span>)</span></code><button title="Copiar al portapapeles" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<div id="htmlwidget-aa9918a4e18cccfb6157" style="width:100%;height:162px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-aa9918a4e18cccfb6157">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.2]\n node [shape=plaintext]\n P\n T \n M \n edge [minlen = 3]\n T -> P\n P -> M\n T -> M\n{ rank = same; M; T}\n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
<div id="htmlwidget-816e766c6800ad74f50e" style="width:100%;height:162px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-816e766c6800ad74f50e">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.2]\n node [shape=plaintext]\n P\n T \n M \n edge [minlen = 3]\n T -> P\n P -> M\n T -> M\n{ rank = same; M; T}\n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>Nótese que el análisis más apropiado no está en los datos: en ambos casos la tabla de datos es exactamente la misma. Los supuestos acerca del proceso que genera los datos sin embargo nos lleva a respuestas opuestas.</p>
Expand Down
14 changes: 10 additions & 4 deletions 02-flujo-basico-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@
<a href="./09-modelos-jerarquicos.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Modelos jerárquicos</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./13-exp-naturales.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">10</span>&nbsp; <span class="chapter-title">Otros métodos para inferencia causal</span></span></a>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -320,8 +326,8 @@ <h3 data-number="3.1.1" class="anchored" data-anchor-id="paso-1-modelo-generativ
<span id="cb1-28"><a href="#cb1-28" aria-hidden="true" tabindex="-1"></a><span class="st">"</span>)<span class="co">#, width = 200, height = 50)</span></span></code><button title="Copiar al portapapeles" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<div class="grViz html-widget html-fill-item" id="htmlwidget-92a8d589bcc60bd45909" style="width:100%;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-92a8d589bcc60bd45909">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.3, rankdir = LR]\n node [shape=circle]\n p\n Npos\n node [shape=plaintext]\n N\n Npos [label = <N<SUB>+<\/SUB>>]\n Nobs [label = <N<SUB>obs<\/SUB>>]\n #Nneg [label = <N<SUB>-<\/SUB>>]\n #sens\n #esp\n edge [minlen = 3]\n p -> Npos\n #p -> Nneg\n N -> Npos\n Npos -> Nobs\n #N -> Nneg\n esp -> Nobs\n sens -> Nobs\n #esp -> Nneg\n #sens -> Nneg\n{ rank = same; p; N }\n{ rank = same; Npos}\n{ rank = max; sens; esp}\n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
<div class="grViz html-widget html-fill-item" id="htmlwidget-7ed2662484eee6bd62f8" style="width:100%;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-7ed2662484eee6bd62f8">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.3, rankdir = LR]\n node [shape=circle]\n p\n Npos\n node [shape=plaintext]\n N\n Npos [label = <N<SUB>+<\/SUB>>]\n Nobs [label = <N<SUB>obs<\/SUB>>]\n #Nneg [label = <N<SUB>-<\/SUB>>]\n #sens\n #esp\n edge [minlen = 3]\n p -> Npos\n #p -> Nneg\n N -> Npos\n Npos -> Nobs\n #N -> Nneg\n esp -> Nobs\n sens -> Nobs\n #esp -> Nneg\n #sens -> Nneg\n{ rank = same; p; N }\n{ rank = same; Npos}\n{ rank = max; sens; esp}\n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>Donde vemos ahora que el estado real de cada persona de la prueba es desconocido, aunque el resultado de la prueba depende de ese estado, y la cantidad de positivos que observamos es ahora <span class="math inline">\(N_{obs}\)</span>, que depende también de la sensibilidad y especificidad de la prueba.</p>
Expand Down Expand Up @@ -563,8 +569,8 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="prevalencia-con-datos-de-
<span id="cb17-28"><a href="#cb17-28" aria-hidden="true" tabindex="-1"></a><span class="st">"</span>)<span class="co">#, width = 200, height = 50)</span></span></code><button title="Copiar al portapapeles" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<div class="grViz html-widget html-fill-item" id="htmlwidget-27d91863e5672c82db68" style="width:100%;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-27d91863e5672c82db68">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.3, rankdir = LR]\n node [shape=circle]\n theta\n esp\n sens\n Npos [label = <N<SUB>+<\/SUB>>]\n node [shape=plaintext]\n Nobs [label = <N<SUB>obs<\/SUB>>]\n # Nneg [label = <N<SUB>-<\/SUB>>]\n edge [minlen = 3]\n theta -> Npos\n #p -> Nneg\n N -> Npos\n Npos -> Nobs\n #N -> Nneg\n esp -> Nobs\n sens -> Nobs\n #esp -> Nneg\n #sens -> Nneg\n esp -> Ref\n sens -> Ref\n{ rank = same; theta; N }\n#{ rank = same; Npos; Nneg}\n{ rank = max; sens; esp}\n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
<div class="grViz html-widget html-fill-item" id="htmlwidget-e15dea8330fc9900da1d" style="width:100%;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-e15dea8330fc9900da1d">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.3, rankdir = LR]\n node [shape=circle]\n theta\n esp\n sens\n Npos [label = <N<SUB>+<\/SUB>>]\n node [shape=plaintext]\n Nobs [label = <N<SUB>obs<\/SUB>>]\n # Nneg [label = <N<SUB>-<\/SUB>>]\n edge [minlen = 3]\n theta -> Npos\n #p -> Nneg\n N -> Npos\n Npos -> Nobs\n #N -> Nneg\n esp -> Nobs\n sens -> Nobs\n #esp -> Nneg\n #sens -> Nneg\n esp -> Ref\n sens -> Ref\n{ rank = same; theta; N }\n#{ rank = same; Npos; Nneg}\n{ rank = max; sens; esp}\n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>Usando argumentos como los del modelo original, las distribuciones de esp y sens son beta y podemos incorporarlas en la simulación de la posterior. Nuestra nueva función para simular el proceso generativo es:</p>
Expand Down
14 changes: 10 additions & 4 deletions 02-flujo-basico.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@
<a href="./09-modelos-jerarquicos.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Modelos jerárquicos</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./13-exp-naturales.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">10</span>&nbsp; <span class="chapter-title">Otros métodos para inferencia causal</span></span></a>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -339,8 +345,8 @@ <h2 data-number="2.1" class="anchored" data-anchor-id="paso-1-modelo-generativo"
<span id="cb1-27"><a href="#cb1-27" aria-hidden="true" tabindex="-1"></a><span class="st">"</span>, <span class="at">width =</span> <span class="dv">300</span>, <span class="at">height =</span> <span class="dv">100</span>)</span></code><button title="Copiar al portapapeles" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<div id="htmlwidget-3e16bdcaed83c4cb54ec" style="width:100%;height:216px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-3e16bdcaed83c4cb54ec">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.3, rankdir = LR]\n node [shape=circle]\n theta [label = <&theta;>]\n node [shape=plaintext]\n N\n Npos [label = <N<SUB>+<\/SUB>>]\n Nneg [label = <N<SUB>-<\/SUB>>]\n #sens\n #esp\n edge [minlen = 3]\n theta -> Npos\n theta -> Nneg\n N -> Npos\n N -> Nneg\n #esp -> Pos\n #sens -> Pos\n #esp -> Neg\n #sens -> Neg\n{ rank = same; theta; N }\n{ rank = same; Npos; Nneg}\n#{ rank = max; sens; esp}\n\n \n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
<div id="htmlwidget-d00020356163866f7343" style="width:100%;height:216px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-d00020356163866f7343">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.3, rankdir = LR]\n node [shape=circle]\n theta [label = <&theta;>]\n node [shape=plaintext]\n N\n Npos [label = <N<SUB>+<\/SUB>>]\n Nneg [label = <N<SUB>-<\/SUB>>]\n #sens\n #esp\n edge [minlen = 3]\n theta -> Npos\n theta -> Nneg\n N -> Npos\n N -> Nneg\n #esp -> Pos\n #sens -> Pos\n #esp -> Neg\n #sens -> Neg\n{ rank = same; theta; N }\n{ rank = same; Npos; Nneg}\n#{ rank = max; sens; esp}\n\n \n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>Que también podríamos simplificar (suponiendo la <span class="math inline">\(N\)</span> fija y conocida, pues <span class="math inline">\(N_+\)</span> y <span class="math inline">\(M\)</span> dan <span class="math inline">\(N_{-}\)</span>) como:</p>
Expand Down Expand Up @@ -373,8 +379,8 @@ <h2 data-number="2.1" class="anchored" data-anchor-id="paso-1-modelo-generativo"
<span id="cb2-24"><a href="#cb2-24" aria-hidden="true" tabindex="-1"></a><span class="st">"</span>, <span class="at">width =</span> <span class="dv">300</span>, <span class="at">height =</span> <span class="dv">100</span>)</span></code><button title="Copiar al portapapeles" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<div id="htmlwidget-6872825996a96c51ef94" style="width:100%;height:216px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-6872825996a96c51ef94">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.3, rankdir = LR]\n node [shape=circle]\n theta [label = <&theta;>]\n node [shape=plaintext]\n N\n Npos [label = <N<SUB>+<\/SUB>>]\n #sens\n #esp\n edge [minlen = 3]\n theta -> Npos\n N -> Npos\n #esp -> Pos\n #sens -> Pos\n #esp -> Neg\n #sens -> Neg\n{ rank = same; theta; N }\n{ rank = same; Npos}\n#{ rank = max; sens; esp}\n\n \n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
<div id="htmlwidget-01ad265c74b1ea33f487" style="width:100%;height:216px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-01ad265c74b1ea33f487">{"x":{"diagram":"\ndigraph {\n graph [ranksep = 0.3, rankdir = LR]\n node [shape=circle]\n theta [label = <&theta;>]\n node [shape=plaintext]\n N\n Npos [label = <N<SUB>+<\/SUB>>]\n #sens\n #esp\n edge [minlen = 3]\n theta -> Npos\n N -> Npos\n #esp -> Pos\n #sens -> Pos\n #esp -> Neg\n #sens -> Neg\n{ rank = same; theta; N }\n{ rank = same; Npos}\n#{ rank = max; sens; esp}\n\n \n}\n","config":{"engine":"dot","options":null}},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>Y ahora construimos el modelo generativo. Supondremos que la muestra de <span class="math inline">\(N\)</span> personas se toma de manera aleatoria de la población (una población grande, así que podemos ignorar el efecto de muestreo). Supondremos provisionalmente, además, que la prueba es perfecta, es decir, no hay falsos positivos o negativos.</p>
Expand Down
Loading

0 comments on commit e004f97

Please sign in to comment.