Commit 3b66beee authored by David Elser's avatar David Elser

first try

parent dc53af0f
......@@ -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
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
Flights without incidents do not provide any information
on the influence of temperature or pressure on malfunction.
We thus focus on the experiments in which at least one O-ring was defective.
```{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
```
......
......@@ -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`.
```{r}
data_url="https://www.sentiweb.fr/datasets/incidence-PAY-3.csv"
data = read.csv(data_url, skip=1)
```
......@@ -58,6 +59,7 @@ Are there missing data points?
```{r}
na_records = apply(data, 1, function (x) any(is.na(x)))
data[na_records,]
```
The two relevant columns for us are `week` and `inc`. Let's verify their classes:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment