Skip to content

Commit 40d9549

Browse files
01a_reg_lin correction mineure
1 parent febe733 commit 40d9549

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

inst/tutorials/01a_reg_lin/reg_lin_simp.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ question("D'après votre analyse, pouvons nous considérer qu'il y a ...",
265265

266266
```{r}
267267
x <- seq(from = 5, to = 15, by = 0.25)
268-
268+
set.seed(42)
269269
a <- x*1 + 3 + rnorm(sd = 0.5, n = length(x))
270270
b <- x*1.1 + 3 + rnorm(sd = 0.5, n = length(x))
271271
c <- x*1.2 + 3 + rnorm(sd = 0.5, n = length(x))
@@ -279,7 +279,6 @@ mais <- tibble(
279279
)
280280
```
281281

282-
283282
Réalisez la régression linéaire de `value` en fonction de `x` sur le jeu de données `mais`. Vous avez à votre dispositon un nuage de points et un résumé des données pour avoir une première connaissance de données.
284283

285284
```{r}
@@ -295,6 +294,7 @@ lm_result <- broom::tidy(lm_reg)
295294
```
296295

297296
```{r reg1-prep}
297+
set.seed(42)
298298
x <- seq(from = 5, to = 15, by = 0.25)
299299
300300
a <- x*1 + 3 + rnorm(sd = 0.5, n = length(x))

inst/tutorials/01a_reg_lin/reg_lin_simp.html

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ <h2>Corrélation</h2>
100100
</div>
101101
<p>Répondez à la question ci-dessous</p>
102102

103-
<div id="htmlwidget-6aa6fc76439b429914f3" style="width:100%;height:auto;", class = "quiz html-widget">
103+
<div id="htmlwidget-3df863f24ac0b9c240ae" style="width:100%;height:auto;", class = "quiz html-widget">
104104
<div class="panel panel-default">
105105
<div class="panel-body quizArea">
106106
</div>
107107
</div>
108108
</div>
109109

110-
<script type="application/json" data-for="htmlwidget-6aa6fc76439b429914f3">{"x":{"question":"Quelles sont les combinaisons de variables les plus corrélées ?","answers":[{"option":"x-y","correct":true,"message":null},{"option":"x-z","correct":false,"message":null},{"option":"x-a","correct":false,"message":null},{"option":"y-z","correct":false,"message":null},{"option":"y-a","correct":false,"message":null},{"option":"z-a","correct":false,"message":null}],"label":"qu_corr1","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":true,"randomSortAnswers":true,"json":{"info":{"name":"","main":""},"questions":[{"q":"Quelles sont les combinaisons de variables les plus corrélées ?","a":[{"option":"x-y","correct":true,"message":null},{"option":"x-z","correct":false,"message":null},{"option":"x-a","correct":false,"message":null},{"option":"y-z","correct":false,"message":null},{"option":"y-a","correct":false,"message":null},{"option":"z-a","correct":false,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
110+
<script type="application/json" data-for="htmlwidget-3df863f24ac0b9c240ae">{"x":{"question":"Quelles sont les combinaisons de variables les plus corrélées ?","answers":[{"option":"x-y","correct":true,"message":null},{"option":"x-z","correct":false,"message":null},{"option":"x-a","correct":false,"message":null},{"option":"y-z","correct":false,"message":null},{"option":"y-a","correct":false,"message":null},{"option":"z-a","correct":false,"message":null}],"label":"qu_corr1","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":true,"randomSortAnswers":true,"json":{"info":{"name":"","main":""},"questions":[{"q":"Quelles sont les combinaisons de variables les plus corrélées ?","a":[{"option":"x-y","correct":true,"message":null},{"option":"x-z","correct":false,"message":null},{"option":"x-a","correct":false,"message":null},{"option":"y-z","correct":false,"message":null},{"option":"y-a","correct":false,"message":null},{"option":"z-a","correct":false,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
111111
<ul>
112112
<li>Réalisez une matrice de correlation avec la méthode de Spearman</li>
113113
</ul>
@@ -129,14 +129,14 @@ <h2>Corrélation</h2>
129129
</div>
130130
<p>Répondez à la question ci-dessous</p>
131131

132-
<div id="htmlwidget-7bbd18e1158c9117cc46" style="width:100%;height:auto;", class = "quiz html-widget">
132+
<div id="htmlwidget-6d1817a09071ea6916d6" style="width:100%;height:auto;", class = "quiz html-widget">
133133
<div class="panel panel-default">
134134
<div class="panel-body quizArea">
135135
</div>
136136
</div>
137137
</div>
138138

139-
<script type="application/json" data-for="htmlwidget-7bbd18e1158c9117cc46">{"x":{"question":"Quelles sont les combinaisons de variables les moins corrélées ?","answers":[{"option":"x-y","correct":false,"message":null},{"option":"x-z","correct":false,"message":null},{"option":"x-a","correct":false,"message":null},{"option":"y-z","correct":false,"message":null},{"option":"y-a","correct":false,"message":null},{"option":"z-a","correct":true,"message":null}],"label":"qu_corr2","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":true,"randomSortAnswers":true,"json":{"info":{"name":"","main":""},"questions":[{"q":"Quelles sont les combinaisons de variables les moins corrélées ?","a":[{"option":"x-y","correct":false,"message":null},{"option":"x-z","correct":false,"message":null},{"option":"x-a","correct":false,"message":null},{"option":"y-z","correct":false,"message":null},{"option":"y-a","correct":false,"message":null},{"option":"z-a","correct":true,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
139+
<script type="application/json" data-for="htmlwidget-6d1817a09071ea6916d6">{"x":{"question":"Quelles sont les combinaisons de variables les moins corrélées ?","answers":[{"option":"x-y","correct":false,"message":null},{"option":"x-z","correct":false,"message":null},{"option":"x-a","correct":false,"message":null},{"option":"y-z","correct":false,"message":null},{"option":"y-a","correct":false,"message":null},{"option":"z-a","correct":true,"message":null}],"label":"qu_corr2","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":true,"randomSortAnswers":true,"json":{"info":{"name":"","main":""},"questions":[{"q":"Quelles sont les combinaisons de variables les moins corrélées ?","a":[{"option":"x-y","correct":false,"message":null},{"option":"x-z","correct":false,"message":null},{"option":"x-a","correct":false,"message":null},{"option":"y-z","correct":false,"message":null},{"option":"y-a","correct":false,"message":null},{"option":"z-a","correct":true,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
140140
<ul>
141141
<li>Reproduisez le graphique ci-dessous en vous basant sur vos matrices réalisées précédements</li>
142142
</ul>
@@ -186,28 +186,29 @@ <h2>Homoscédasicité</h2>
186186
<pre class="text"><code># TODO</code></pre>
187187
</div>
188188

189-
<div id="htmlwidget-ac4619e1a21646ad7c98" style="width:100%;height:auto;", class = "quiz html-widget">
189+
<div id="htmlwidget-2be8afc5e70c9632d8cf" style="width:100%;height:auto;", class = "quiz html-widget">
190190
<div class="panel panel-default">
191191
<div class="panel-body quizArea">
192192
</div>
193193
</div>
194194
</div>
195195

196-
<script type="application/json" data-for="htmlwidget-ac4619e1a21646ad7c98">{"x":{"question":"D&#39;après votre analyse, pouvons nous considérer qu&#39;il y a ...","answers":[{"option":"homoscédasticité","correct":false,"message":null},{"option":"hétéroscédasticité","correct":false,"message":null}],"label":"qu_homo","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":false,"randomSortAnswers":false,"json":{"info":{"name":"","main":""},"questions":[{"q":"D&#39;après votre analyse, pouvons nous considérer qu&#39;il y a ...","a":[{"option":"homoscédasticité","correct":false,"message":null},{"option":"hétéroscédasticité","correct":false,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
196+
<script type="application/json" data-for="htmlwidget-2be8afc5e70c9632d8cf">{"x":{"question":"D&#39;après votre analyse, pouvons nous considérer qu&#39;il y a ...","answers":[{"option":"homoscédasticité","correct":false,"message":null},{"option":"hétéroscédasticité","correct":false,"message":null}],"label":"qu_homo","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":false,"randomSortAnswers":false,"json":{"info":{"name":"","main":""},"questions":[{"q":"D&#39;après votre analyse, pouvons nous considérer qu&#39;il y a ...","a":[{"option":"homoscédasticité","correct":false,"message":null},{"option":"hétéroscédasticité","correct":false,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
197197
</div>
198198
<div id="section-regression-lineaire" class="section level2">
199199
<h2>Régression linéaire</h2>
200200
<p>Réalisez la régression linéaire de <code>value</code> en fonction de <code>x</code> sur le jeu de données <code>mais</code>. Vous avez à votre dispositon un nuage de points et un résumé des données pour avoir une première connaissance de données.</p>
201201
<p><img src="reg_lin_simp_files/figure-html/unnamed-chunk-6-1.png" width="624" /></p>
202202
<pre><code> x value area
203-
Min. : 5.0 Min. : 7.894 a:41
204-
1st Qu.: 7.5 1st Qu.:10.980 b:41
205-
Median :10.0 Median :13.911 c:41
206-
Mean :10.0 Mean :13.980
207-
3rd Qu.:12.5 3rd Qu.:16.804
208-
Max. :15.0 Max. :21.165 </code></pre>
203+
Min. : 5.0 Min. : 7.647 a:41
204+
1st Qu.: 7.5 1st Qu.:11.036 b:41
205+
Median :10.0 Median :13.818 c:41
206+
Mean :10.0 Mean :13.956
207+
3rd Qu.:12.5 3rd Qu.:16.726
208+
Max. :15.0 Max. :21.259 </code></pre>
209209
<div class="tutorial-exercise-support" data-label="reg1-prep" data-caption="Code R" data-completion="1" data-diagnostics="1" data-startover="1" data-lines="0">
210-
<pre class="text"><code>x &lt;- seq(from = 5, to = 15, by = 0.25)
210+
<pre class="text"><code>set.seed(42)
211+
x &lt;- seq(from = 5, to = 15, by = 0.25)
211212

212213
a &lt;- x*1 + 3 + rnorm(sd = 0.5, n = length(x))
213214
b &lt;- x*1.1 + 3 + rnorm(sd = 0.5, n = length(x))
@@ -241,27 +242,27 @@ <h2>Régression linéaire</h2>
241242
<tr>
242243
<td>
243244

244-
<div id="htmlwidget-0c612aee7c00a81933a3" style="width:100%;height:auto;", class = "quiz html-widget">
245+
<div id="htmlwidget-36bc903447cf0551bcce" style="width:100%;height:auto;", class = "quiz html-widget">
245246
<div class="panel panel-default">
246247
<div class="panel-body quizArea">
247248
</div>
248249
</div>
249250
</div>
250251

251-
<script type="application/json" data-for="htmlwidget-0c612aee7c00a81933a3">{"x":{"question":"Quelle est la valeur de l&#39;ordonnée à l&#39;origine ?","answers":[{"option":"2.85","correct":true,"message":null},{"option":"1.12","correct":false,"message":null},{"option":"0.32","correct":false,"message":null},{"option":"0.03","correct":false,"message":null},{"option":"8.89","correct":false,"message":null},{"option":"36.37","correct":false,"message":null},{"option":"0.92","correct":false,"message":null}],"label":"qu_reglin1-1","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":true,"randomSortAnswers":true,"json":{"info":{"name":"","main":""},"questions":[{"q":"Quelle est la valeur de l&#39;ordonnée à l&#39;origine ?","a":[{"option":"2.85","correct":true,"message":null},{"option":"1.12","correct":false,"message":null},{"option":"0.32","correct":false,"message":null},{"option":"0.03","correct":false,"message":null},{"option":"8.89","correct":false,"message":null},{"option":"36.37","correct":false,"message":null},{"option":"0.92","correct":false,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
252+
<script type="application/json" data-for="htmlwidget-36bc903447cf0551bcce">{"x":{"question":"Quelle est la valeur de l&#39;ordonnée à l&#39;origine ?","answers":[{"option":"3.26","correct":true,"message":null},{"option":"1.07","correct":false,"message":null},{"option":"0.32","correct":false,"message":null},{"option":"0.03","correct":false,"message":null},{"option":"10.21","correct":false,"message":null},{"option":"35.04","correct":false,"message":null},{"option":"0.91","correct":false,"message":null}],"label":"qu_reglin1-1","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":true,"randomSortAnswers":true,"json":{"info":{"name":"","main":""},"questions":[{"q":"Quelle est la valeur de l&#39;ordonnée à l&#39;origine ?","a":[{"option":"3.26","correct":true,"message":null},{"option":"1.07","correct":false,"message":null},{"option":"0.32","correct":false,"message":null},{"option":"0.03","correct":false,"message":null},{"option":"10.21","correct":false,"message":null},{"option":"35.04","correct":false,"message":null},{"option":"0.91","correct":false,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
252253
</td>
253254
</tr>
254255
<tr>
255256
<td>
256257

257-
<div id="htmlwidget-121722831263f5eb50b0" style="width:100%;height:auto;", class = "quiz html-widget">
258+
<div id="htmlwidget-3d452b8c100a59685a61" style="width:100%;height:auto;", class = "quiz html-widget">
258259
<div class="panel panel-default">
259260
<div class="panel-body quizArea">
260261
</div>
261262
</div>
262263
</div>
263264

264-
<script type="application/json" data-for="htmlwidget-121722831263f5eb50b0">{"x":{"question":"Quelle est la valeur de la pente ?","answers":[{"option":"2.85","correct":false,"message":null},{"option":"1.12","correct":true,"message":null},{"option":"0.32","correct":false,"message":null},{"option":"0.03","correct":false,"message":null},{"option":"8.89","correct":false,"message":null},{"option":"36.37","correct":false,"message":null},{"option":"0.92","correct":false,"message":null}],"label":"qu_reglin1-2","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":true,"randomSortAnswers":true,"json":{"info":{"name":"","main":""},"questions":[{"q":"Quelle est la valeur de la pente ?","a":[{"option":"2.85","correct":false,"message":null},{"option":"1.12","correct":true,"message":null},{"option":"0.32","correct":false,"message":null},{"option":"0.03","correct":false,"message":null},{"option":"8.89","correct":false,"message":null},{"option":"36.37","correct":false,"message":null},{"option":"0.92","correct":false,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
265+
<script type="application/json" data-for="htmlwidget-3d452b8c100a59685a61">{"x":{"question":"Quelle est la valeur de la pente ?","answers":[{"option":"3.26","correct":false,"message":null},{"option":"1.07","correct":true,"message":null},{"option":"0.32","correct":false,"message":null},{"option":"0.03","correct":false,"message":null},{"option":"10.21","correct":false,"message":null},{"option":"35.04","correct":false,"message":null},{"option":"0.91","correct":false,"message":null}],"label":"qu_reglin1-2","skipStartButton":true,"perQuestionResponseAnswers":true,"perQuestionResponseMessaging":true,"preventUnanswered":true,"displayQuestionCount":false,"displayQuestionNumber":false,"disableRanking":true,"nextQuestionText":"","checkAnswerText":"Submit Answer","allowRetry":true,"randomSortAnswers":true,"json":{"info":{"name":"","main":""},"questions":[{"q":"Quelle est la valeur de la pente ?","a":[{"option":"3.26","correct":false,"message":null},{"option":"1.07","correct":true,"message":null},{"option":"0.32","correct":false,"message":null},{"option":"0.03","correct":false,"message":null},{"option":"10.21","correct":false,"message":null},{"option":"35.04","correct":false,"message":null},{"option":"0.91","correct":false,"message":null}],"correct":"Correct!","incorrect":"Incorrect."}]}},"evals":[],"jsHooks":[]}</script>
265266
</td>
266267
</tr>
267268
</table>
-1.42 KB
Loading
-157 Bytes
Loading
285 Bytes
Loading

0 commit comments

Comments
 (0)