From e3a24a89d980d89cba7329975d6b2d209cf20924 Mon Sep 17 00:00:00 2001 From: Helene31 Date: Tue, 21 Apr 2020 23:09:17 +0200 Subject: [PATCH] maj --- module2/exo5/exo5_fr.Rmd | 34 ++++++++++++++++++++++++++++++++++ module2/exo5/shuttle.csv | 24 ++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 module2/exo5/exo5_fr.Rmd create mode 100644 module2/exo5/shuttle.csv diff --git a/module2/exo5/exo5_fr.Rmd b/module2/exo5/exo5_fr.Rmd new file mode 100644 index 0000000..4faee79 --- /dev/null +++ b/module2/exo5/exo5_fr.Rmd @@ -0,0 +1,34 @@ +--- +title: "Exo 5 shuttle" +author: "Hélène Raynal" +date: "21 avril 2020" +output: html_document +--- + + +### Création du vecteur des données + + +```{r } +dataShuttle <- read.csv("shuttle.csv",header=T) +summary(dataShuttle) + +``` +### Vols où il y a eu des pb +```{r } +pb <- dataShuttle[dataShuttle$Malfunction>0,] +pb + +``` + +### Lien entre pb et température +```{r } +plot(data=pb, pb$Malfunction/Count ~ pb$Temperature, ylim=c(0,1)) +``` + +### Régression logistique +```{r } +logistic_reg = glm(data=pb, Malfunction/Count ~ Temperature, weights=Count, + family=binomial(link='logit')) +summary(logistic_reg) +``` \ No newline at end of file diff --git a/module2/exo5/shuttle.csv b/module2/exo5/shuttle.csv new file mode 100644 index 0000000..e59e133 --- /dev/null +++ b/module2/exo5/shuttle.csv @@ -0,0 +1,24 @@ +Date,Count,Temperature,Pressure,Malfunction +4/12/81,6,66,50,0 +11/12/81,6,70,50,1 +3/22/82,6,69,50,0 +11/11/82,6,68,50,0 +4/04/83,6,67,50,0 +6/18/82,6,72,50,0 +8/30/83,6,73,100,0 +11/28/83,6,70,100,0 +2/03/84,6,57,200,1 +4/06/84,6,63,200,1 +8/30/84,6,70,200,1 +10/05/84,6,78,200,0 +11/08/84,6,67,200,0 +1/24/85,6,53,200,2 +4/12/85,6,67,200,0 +4/29/85,6,75,200,0 +6/17/85,6,70,200,0 +7/29/85,6,81,200,0 +8/27/85,6,76,200,0 +10/03/85,6,79,200,0 +10/30/85,6,75,200,2 +11/26/85,6,76,200,0 +1/12/86,6,58,200,1 -- 2.18.1