Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
433835ee939dd34ba5afd7c0a68da139
mooc-rr
Commits
16461232
Commit
16461232
authored
Sep 04, 2025
by
433835ee939dd34ba5afd7c0a68da139
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload exo 1 module 4
parent
a930c008
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
module4_exo1.Rmd
module4/module4_exo1.Rmd
+56
-0
No files found.
module4/module4_exo1.Rmd
0 → 100644
View file @
16461232
---
title: "module4_exo1"
author: "Dusfour-Castan Pauline @433835ee939dd34ba5afd7c0a68da139"
output: pdf_document
date: "2025-09-04"
---
# Informations sur la version de R et les packages utlisés
```{r}
library(ggplot2)
library(readr)
sessionInfo()
```
# Importation des données et analyses
```{r}
data = read_csv("~/data_shuttle.csv")
data
```
```{r}
plot(data=data, Malfunction/Count ~ Temperature, ylim=c(0,1))
```
## Régression Logistique
```{r}
logistic_reg = glm(data=data, Malfunction/Count ~ Temperature, weights=Count,
family=binomial(link='logit'))
summary(logistic_reg)
```
## Prédire la probabilité de défaillance
```{r}
tempv = seq(from=30, to=90, by = .5)
rmv <- predict(logistic_reg, list(Temperature=tempv), type="response")
plot(tempv, rmv, type="l", ylim=c(0,1))
points(data=data, Malfunction/Count ~ Temperature)
```
```{r, fig.height=3.3}
ggplot(data, aes(y=Malfunction/Count, x=Temperature)) +
geom_point(alpha=.2, size = 2, color="blue") +
geom_smooth(method = "glm", method.args = list(family = "binomial"), fullrange=T) +
xlim(30,90) + ylim(0,1) + theme_bw()
```
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment