Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
larmarange committed May 6, 2019
1 parent b29291f commit 46ebe64
Show file tree
Hide file tree
Showing 71 changed files with 87 additions and 81 deletions.
15 changes: 9 additions & 6 deletions analyse-R.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ <h1>
Introduction <br>à l’analyse d’enquêtes <br>avec R et RStudio
</h1>
<p>
Dernière mise à jour : 4 mai 2019
Dernière mise à jour : 6 mai 2019
</p>
</div>
<p><a href="https://zenodo.org/badge/latestdoi/34986666"><img src="https://zenodo.org/badge/34986666.svg" alt="DOI"></a></p>
Expand Down Expand Up @@ -16121,35 +16121,38 @@ <h2>Modèle de Cox</h2>
</div>
<p>Pour représenter ces rapports de risque, on peut ici encore avoir recours à la fonction <code data-pkg="GGally">ggcoef</code> de l’extension <code class="pkg">GGally</code>.</p>
<figure><div class="sourceCode" id="analyse-de-survie_cb61"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb61-1" title="1"><span class="kw">library</span>(GGally)</a></code></pre></div>
<pre><code>Registered S3 method overwritten by 'GGally':
method from
+.gg ggplot2</code></pre>
<pre><code>
Attaching package: 'GGally'</code></pre>
<pre><code>The following object is masked from 'package:dplyr':

nasa</code></pre>
<div class="sourceCode" id="analyse-de-survie_cb64"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb64-1" title="1"><span class="kw">ggcoef</span>(<span class="kw">tidy</span>(mod2, <span class="dt">exponentiate =</span> <span class="ot">TRUE</span>), <span class="dt">exponentiate =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<div class="sourceCode" id="analyse-de-survie_cb65"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb65-1" title="1"><span class="kw">ggcoef</span>(<span class="kw">tidy</span>(mod2, <span class="dt">exponentiate =</span> <span class="ot">TRUE</span>), <span class="dt">exponentiate =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="graphs/analyse-de-survie/unnamed-chunk-41-1.png" width="1050"></p>
<p>NB : dû à un bug<a href="#analyse-de-survie_fn5" class="footnote-ref" id="analyse-de-survie_fnref5"><sup>5</sup></a> en cours de résolution dans l’extension <code class="pkg">broom</code>, il est nécessaire d’appliquer <code>tidy</code> au modèle avant de le passer à <code>ggcoef</code>. En effet, si l’on fait directement <code>ggcoef(mod2, exponentiate = TRUE)</code>, les intervalles de confiance ne seront pas correctement représentés.</p>
<figcaption>
Coefficients du modèle avec ggcoef
</figcaption></figure><p>L’extension <code class="pkg">survminer</code> fournit également une fonction <code data-pkg="survminer">ggforest</code> qui permet de représenter de manière plus esthétique et complète les coefficients d’un modèle de Cox.</p>
<figure><div class="sourceCode" id="analyse-de-survie_cb65"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb65-1" title="1"><span class="kw">ggforest</span>(mod2)</a></code></pre></div>
<figure><div class="sourceCode" id="analyse-de-survie_cb66"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb66-1" title="1"><span class="kw">ggforest</span>(mod2)</a></code></pre></div>
<img src="graphs/analyse-de-survie/unnamed-chunk-42-1.png" width="1050"><figcaption>
Coefficients du modèle avec ggforest
</figcaption></figure>
</div>
<div id="analyse-de-survie_verification-de-la-validite-du-modele" class="section level2">
<h2>Vérification de la validité du modèle</h2>
<p>Un modèle de Cox n’est valable que sous l’hypothèse de la proportionnalité des risques relatifs. Selon cette hypothèse les <dfn>résidus de Schoenfeld</dfn><dfn data-index="Schoenfeld, résidus"></dfn> ne dépendent pas du temps. Cette hypothèse peut être testée avec la fonction <code data-pkg="survival">cox.zph</code>.</p>
<div class="sourceCode" id="analyse-de-survie_cb66"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb66-1" title="1">test &lt;-<span class="st"> </span><span class="kw">cox.zph</span>(mod2)</a>
<a class="sourceLine" id="analyse-de-survie_cb66-2" title="2">test</a></code></pre></div>
<div class="sourceCode" id="analyse-de-survie_cb67"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb67-1" title="1">test &lt;-<span class="st"> </span><span class="kw">cox.zph</span>(mod2)</a>
<a class="sourceLine" id="analyse-de-survie_cb67-2" title="2">test</a></code></pre></div>
<pre><code> rho chisq p
sexeféminin 0.0608 0.524 0.469
milieu -0.0305 0.132 0.717
rang_apres_idealoui -0.0359 0.181 0.670
GLOBAL NA 0.827 0.843</code></pre>
<p>Une valeur de p inférieure à 5 % indique que l’hypothèse n’est pas vérifiée. Il apparaît que p est supérieur à 5 % globalement et pour chaque variable prise individuellement. Notre modèle est donc valide.</p>
<p>Il est possible de représenter la distribution des résidus de Schoenfeld à l’aide de <code data-pkg="survminer">ggcoxzph</code> de l’extension <code class="pkg">survminer</code>, afin de voir si leur répartition change au cours du temps.</p>
<figure><div class="sourceCode" id="analyse-de-survie_cb68"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb68-1" title="1"><span class="kw">ggcoxzph</span>(test)</a></code></pre></div>
<figure><div class="sourceCode" id="analyse-de-survie_cb69"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="analyse-de-survie_cb69-1" title="1"><span class="kw">ggcoxzph</span>(test)</a></code></pre></div>
<img src="graphs/analyse-de-survie/unnamed-chunk-44-1.png" width="1050"><figcaption>
Résidus de Schoenfeld
</figcaption></figure>
Expand Down
Binary file modified analyse-R.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion analyse-de-reseaux.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion analyse-de-sequences.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
15 changes: 9 additions & 6 deletions analyse-de-survie.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down Expand Up @@ -1084,12 +1084,15 @@ <h2>Modèle de Cox</h2>
<p>Pour représenter ces rapports de risque, on peut ici encore avoir recours à la fonction <code data-pkg="GGally">ggcoef</code> de l’extension <code class="pkg">GGally</code>.</p>
<figure>
<div class="sourceCode" id="cb61"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb61-1" title="1"><span class="kw">library</span>(GGally)</a></code></pre></div>
<pre><code>Registered S3 method overwritten by &#39;GGally&#39;:
method from
+.gg ggplot2</code></pre>
<pre><code>
Attaching package: &#39;GGally&#39;</code></pre>
<pre><code>The following object is masked from &#39;package:dplyr&#39;:

nasa</code></pre>
<div class="sourceCode" id="cb64"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb64-1" title="1"><span class="kw">ggcoef</span>(<span class="kw">tidy</span>(mod2, <span class="dt">exponentiate =</span> <span class="ot">TRUE</span>), <span class="dt">exponentiate =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<div class="sourceCode" id="cb65"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb65-1" title="1"><span class="kw">ggcoef</span>(<span class="kw">tidy</span>(mod2, <span class="dt">exponentiate =</span> <span class="ot">TRUE</span>), <span class="dt">exponentiate =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="graphs/analyse-de-survie/unnamed-chunk-41-1.png" width="1050" /></p>
<p>NB : dû à un bug<a href="#fn5" class="footnote-ref" id="fnref5"><sup>5</sup></a> en cours de résolution dans l’extension <code class="pkg">broom</code>, il est nécessaire d’appliquer <code>tidy</code> au modèle avant de le passer à <code>ggcoef</code>. En effet, si l’on fait directement <code>ggcoef(mod2, exponentiate = TRUE)</code>, les intervalles de confiance ne seront pas correctement représentés.</p>
<figcaption>
Expand All @@ -1098,7 +1101,7 @@ <h2>Modèle de Cox</h2>
</figure>
<p>L’extension <code class="pkg">survminer</code> fournit également une fonction <code data-pkg="survminer">ggforest</code> qui permet de représenter de manière plus esthétique et complète les coefficients d’un modèle de Cox.</p>
<figure>
<div class="sourceCode" id="cb65"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb65-1" title="1"><span class="kw">ggforest</span>(mod2)</a></code></pre></div>
<div class="sourceCode" id="cb66"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb66-1" title="1"><span class="kw">ggforest</span>(mod2)</a></code></pre></div>
<img src="graphs/analyse-de-survie/unnamed-chunk-42-1.png" width="1050" />
<figcaption>
Coefficients du modèle avec ggforest
Expand All @@ -1108,8 +1111,8 @@ <h2>Modèle de Cox</h2>
<div id="verification-de-la-validite-du-modele" class="section level2">
<h2>Vérification de la validité du modèle</h2>
<p>Un modèle de Cox n’est valable que sous l’hypothèse de la proportionnalité des risques relatifs. Selon cette hypothèse les <dfn>résidus de Schoenfeld</dfn><dfn data-index="Schoenfeld, résidus"></dfn> ne dépendent pas du temps. Cette hypothèse peut être testée avec la fonction <code data-pkg="survival">cox.zph</code>.</p>
<div class="sourceCode" id="cb66"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb66-1" title="1">test &lt;-<span class="st"> </span><span class="kw">cox.zph</span>(mod2)</a>
<a class="sourceLine" id="cb66-2" title="2">test</a></code></pre></div>
<div class="sourceCode" id="cb67"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb67-1" title="1">test &lt;-<span class="st"> </span><span class="kw">cox.zph</span>(mod2)</a>
<a class="sourceLine" id="cb67-2" title="2">test</a></code></pre></div>
<pre><code> rho chisq p
sexeféminin 0.0608 0.524 0.469
milieu -0.0305 0.132 0.717
Expand All @@ -1118,7 +1121,7 @@ <h2>Vérification de la validité du modèle</h2>
<p>Une valeur de p inférieure à 5 % indique que l’hypothèse n’est pas vérifiée. Il apparaît que p est supérieur à 5 % globalement et pour chaque variable prise individuellement. Notre modèle est donc valide.</p>
<p>Il est possible de représenter la distribution des résidus de Schoenfeld à l’aide de <code data-pkg="survminer">ggcoxzph</code> de l’extension <code class="pkg">survminer</code>, afin de voir si leur répartition change au cours du temps.</p>
<figure>
<div class="sourceCode" id="cb68"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb68-1" title="1"><span class="kw">ggcoxzph</span>(test)</a></code></pre></div>
<div class="sourceCode" id="cb69"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb69-1" title="1"><span class="kw">ggcoxzph</span>(test)</a></code></pre></div>
<img src="graphs/analyse-de-survie/unnamed-chunk-44-1.png" width="1050" />
<figcaption>
Résidus de Schoenfeld
Expand Down
2 changes: 1 addition & 1 deletion analyse-des-correspondances-multiples.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion analyse-spatiale.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion annotations-mathematiques.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion calculer-un-age.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion cartes.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion classification-ascendante-hierarchique.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion combiner-plusieurs-graphiques.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion comparaisons-moyennes-et-proportions.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion conditions-et-comparaisons.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion couleurs.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion definir-un-plan-d-echantillonnage-complexe.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion diagramme-de-lexis.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion donnees-ponderees.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion ecrire-ses-propres-fonctions.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
2 changes: 1 addition & 1 deletion effets-d-interaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
</li>
<li><a href="analyse-R.pdf">PDF</a></li>
</ul>
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://tontonroger.org/">
<form id="rechercher" class="navbar-form navbar-right" role="search" style="padding-top: 5px;" method="get" action="https://duckduckgo.com/">
<div class="form-group">
<input name="q" type="text" class="form-control input-sm" placeholder="Rechercher">
</div>
Expand Down
Loading

0 comments on commit 46ebe64

Please sign in to comment.