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 Mar 6, 2024
1 parent a15a423 commit 09da392
Show file tree
Hide file tree
Showing 36 changed files with 1,462 additions and 168 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f2bbd923
74fb27e2
64 changes: 46 additions & 18 deletions 01-introduccion.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.550">
<meta name="generator" content="quarto-1.4.551">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -242,6 +242,12 @@
<a href="./07-buenos-malos-controles.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Buenos y malos controles</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-mcmc.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Markov Chain Monte Carlo</span></span></a>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -348,24 +354,24 @@ <h3 class="unnumbered anchored" data-anchor-id="ejemplo-cálculos-renales">Ejemp
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">B</td>
<td style="text-align: left;">grandes</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;">A</td>
<td style="text-align: left;">grandes</td>
<td style="text-align: left;">mejora</td>
</tr>
<tr class="odd">
<td style="text-align: left;">B</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">A</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;">mejora</td>
<td style="text-align: left;">sin_mejora</td>
</tr>
<tr class="odd">
<td style="text-align: left;">A</td>
Expand All @@ -374,13 +380,13 @@ <h3 class="unnumbered anchored" data-anchor-id="ejemplo-cálculos-renales">Ejemp
</tr>
<tr class="even">
<td style="text-align: left;">A</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">mejora</td>
<td style="text-align: left;">grandes</td>
<td style="text-align: left;">sin_mejora</td>
</tr>
<tr class="odd">
<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;">grandes</td>
<td style="text-align: left;">sin_mejora</td>
</tr>
<tr class="even">
<td style="text-align: left;">A</td>
Expand All @@ -389,7 +395,7 @@ <h3 class="unnumbered anchored" data-anchor-id="ejemplo-cálculos-renales">Ejemp
</tr>
<tr class="odd">
<td style="text-align: left;">B</td>
<td style="text-align: left;">chicos</td>
<td style="text-align: left;">grandes</td>
<td style="text-align: left;">mejora</td>
</tr>
<tr class="even">
Expand Down Expand Up @@ -648,8 +654,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-34d677d7d3a05a9d1f71" style="width:100%;height:162px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-34d677d7d3a05a9d1f71">{"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-e0451b30eabdcd93b4f9" style="width:100%;height:162px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-e0451b30eabdcd93b4f9">{"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 @@ -770,8 +776,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-69be4cb7ffd90f6c5b77" style="width:100%;height:162px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-69be4cb7ffd90f6c5b77">{"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-236b5b3a392f0ad2df09" style="width:100%;height:162px;" class="grViz html-widget"></div>
<script type="application/json" data-for="htmlwidget-236b5b3a392f0ad2df09">{"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 Expand Up @@ -1226,6 +1232,24 @@ <h2 data-number="1.4" class="anchored" data-anchor-id="modelación-y-análisis-i
// clear code selection
e.clearSelection();
});
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp('/' + window.location.host + '/');
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
Expand Down Expand Up @@ -1260,7 +1284,11 @@ <h2 data-number="1.4" class="anchored" data-anchor-id="modelación-y-análisis-i
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
Expand Down
42 changes: 35 additions & 7 deletions 02-flujo-basico-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es"><head>

<meta charset="utf-8">
<meta name="generator" content="quarto-1.4.550">
<meta name="generator" content="quarto-1.4.551">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">

Expand Down Expand Up @@ -220,6 +220,12 @@
<a href="./07-buenos-malos-controles.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Buenos y malos controles</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./08-mcmc.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Markov Chain Monte Carlo</span></span></a>
</div>
</li>
</ul>
</div>
Expand Down Expand Up @@ -308,8 +314,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-b1338b7bfe0af10d34c6" style="width:100%;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-b1338b7bfe0af10d34c6">{"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-87f86096e590855eba9f" style="width:100%;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-87f86096e590855eba9f">{"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 @@ -551,8 +557,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-7f604ce9ecd8aa3e844a" style="width:100%;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-7f604ce9ecd8aa3e844a">{"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-c33d8d6aef5de5b4fda5" style="width:100%;height:480px;"></div>
<script type="application/json" data-for="htmlwidget-c33d8d6aef5de5b4fda5">{"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 Expand Up @@ -646,7 +652,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="prevalencia-con-datos-de-

All 4 chains finished successfully.
Mean chain execution time: 0.0 seconds.
Total execution time: 0.7 seconds.</code></pre>
Total execution time: 0.6 seconds.</code></pre>
</div>
<div class="sourceCode cell-code" id="cb23"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a>sims <span class="ot">&lt;-</span> ajuste<span class="sc">$</span><span class="fu">draws</span>(<span class="fu">c</span>(<span class="st">"theta"</span>, <span class="st">"sens"</span>, <span class="st">"esp"</span>), <span class="at">format =</span> <span class="st">"df"</span>)</span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a>resumen <span class="ot">&lt;-</span> ajuste<span class="sc">$</span><span class="fu">summary</span>(<span class="fu">c</span>(<span class="st">"theta"</span>))</span></code><button title="Copiar al portapapeles" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down Expand Up @@ -778,6 +784,24 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="prevalencia-con-datos-de-
// clear code selection
e.clearSelection();
});
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp('/' + window.location.host + '/');
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
Expand Down Expand Up @@ -812,7 +836,11 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="prevalencia-con-datos-de-
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
Expand Down
Loading

0 comments on commit 09da392

Please sign in to comment.