Add TP1 GLM & DM Monte Carlo

This commit is contained in:
2024-11-05 10:33:07 +01:00
parent d1f3951285
commit f6f9dcce40
5 changed files with 1392 additions and 23 deletions

View File

@@ -23,16 +23,12 @@ summary(model)
```{r}
library(ggfortify)
library(car)
autoplot(model,1)
autoplot(model,1:3)
```
The points are not well distributed around 0 -> [P1] is not verified
```{r}
autoplot(model,3)
```
The points are not well distributed around 1 -> [P2] is not verified
The QQPlot is align with the line y = x, so it is globally gaussian -> [P4] is verified
```{r}
set.seed(0)
@@ -41,12 +37,6 @@ durbinWatsonTest(model)
The p-value is 0.58 > 0.05 -> We do not reject H0 so the residuals are not autocorrelated -> [P3] is verified
```{r}
autoplot(model,2)
```
The QQPlot is align with the line y = x, so it is globally gaussian -> [P4] is verified
```{r}
library(GGally)
ggpairs(Health, progress = F)
@@ -68,16 +58,12 @@ coefficients(model2)
```{r}
library(ggfortify)
library(car)
autoplot(model2,1)
autoplot(model2,1:4)
```
The points are well distributed around 0 -> [P1] is verified
```{r}
autoplot(model2,3)
```
The points are not well distributed around 1 -> [P2] is verified
The QQPlot is align with the line y = x, so it is gaussian -> [P4] is verified
```{r}
set.seed(0)
@@ -86,8 +72,3 @@ durbinWatsonTest(model2)
The p-value is 0.294 > 0.05 -> We do not reject H0 so the residuals are not autocorrelated -> [P3] is verified
```{r}
autoplot(model2,2)
```
The QQPlot is align with the line y = x, so it is gaussian -> [P4] is verified