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
8c19b8aa9b3e351f2427cf306117b1dd
mooc-rr
Commits
3b66beee
Commit
3b66beee
authored
Mar 05, 2021
by
David Elser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first try
parent
dc53af0f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
exo5_en.Rmd
module2/exo5/exo5_en.Rmd
+16
-1
influenza-like-illness-analysis.Rmd
module3/exo1/influenza-like-illness-analysis.Rmd
+2
-0
No files found.
module2/exo5/exo5_en.Rmd
View file @
3b66beee
...
@@ -35,13 +35,28 @@ The data set shows us the date of each test, the number of O-rings
...
@@ -35,13 +35,28 @@ The data set shows us the date of each test, the number of O-rings
temperature (in Fahrenheit) and pressure (in psi), and finally the
temperature (in Fahrenheit) and pressure (in psi), and finally the
number of identified malfunctions.
number of identified malfunctions.
```{r}
library(ggplot2)
ggplot (data,aes(x=Temperature,y=Malfunction))+geom_point(alpha=.3,size=3) +
theme_bw() +
geom_smooth(method = "glm",
method.args=list(family="binomial")) +xlim(40,100)
```
# Graphical inspection
# Graphical inspection
Flights without incidents do not provide any information
Flights without incidents do not provide any information
on the influence of temperature or pressure on malfunction.
on the influence of temperature or pressure on malfunction.
We thus focus on the experiments in which at least one O-ring was defective.
We thus focus on the experiments in which at least one O-ring was defective.
```{r}
```{r}
data = data[data$Malfunction>0,]
data = data[(data$Malfunction == "0" |data$Malfunction=="1"),]
library(ggplot2)
ggplot (data,aes(x=Temperature,y=Malfunction))+geom_point(alpha=.3,size=3) +
theme_bw() +
geom_smooth(method = "glm",
method.args=list(family="binomial")) +xlim(40,100)
data
data
```
```
...
...
module3/exo1/influenza-like-illness-analysis.Rmd
View file @
3b66beee
...
@@ -45,6 +45,7 @@ This is the documentation of the data from [the download site](https://ns.sentiw
...
@@ -45,6 +45,7 @@ This is the documentation of the data from [the download site](https://ns.sentiw
The first line of the CSV file is a comment, which we ignore with `skip=1`.
The first line of the CSV file is a comment, which we ignore with `skip=1`.
```{r}
```{r}
data_url="https://www.sentiweb.fr/datasets/incidence-PAY-3.csv"
data = read.csv(data_url, skip=1)
data = read.csv(data_url, skip=1)
```
```
...
@@ -58,6 +59,7 @@ Are there missing data points?
...
@@ -58,6 +59,7 @@ Are there missing data points?
```{r}
```{r}
na_records = apply(data, 1, function (x) any(is.na(x)))
na_records = apply(data, 1, function (x) any(is.na(x)))
data[na_records,]
data[na_records,]
```
```
The two relevant columns for us are `week` and `inc`. Let's verify their classes:
The two relevant columns for us are `week` and `inc`. Let's verify their classes:
...
...
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