diff --git a/module3/exercice3/ConcentrationCO2.Rmd b/module3/exercice3/ConcentrationCO2.Rmd index 211782bc6ae8d5a87ff980a934cca32140b2ca5a..ba6512d5bcc426218d603ac569796e7a0aa7e535 100644 --- a/module3/exercice3/ConcentrationCO2.Rmd +++ b/module3/exercice3/ConcentrationCO2.Rmd @@ -1,6 +1,5 @@ ---- title: 'Autour du Paradoxe de Simpson ' -author: "Hana Zahed" +author: "Salem Zeiny" output: html_notebook: default pdf_document: default @@ -11,8 +10,9 @@ In 1972-1974,a poll was conducted on 1/6th of the voters to shed light on thyroi To simplify our analysis, we will restrict to females (N=1314) in either of the following categories (current smokers or never smokers) -# Analysis section -## load library and set up working environment +# Analysis section + +## load library and set up working environment Rversion 4.0.3 was used for this analysis ```{r} library(ggplot2) @@ -24,7 +24,7 @@ library(tidyr) Data was downloaded from [github](https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/blob/master/module3/Practical_session/Subject6_smoking.csv) ```{r} -data <- read.csv("C:/Users/zahedh/Desktop/module3_Practical_session_Subject6_smoking.csv", h=T) +data <- read.csv("C:/Users/zeinys/Desktop/module3_Practical_session_Subject6_smoking.csv", h=T) # data checking head(data) str(data) #1314 obs @@ -111,6 +111,8 @@ ndata%>%mutate(death=as.numeric(as.character(death)))%>%select(Smoker, Age, deat breaks=c("death", "fit_resp"), labels=c("Observed risk of death", "Estimated risk of death"))+ylab("Risk of death")+labs(caption = "0: death not observed during followup \n 1: death during followup")+theme(plot.caption = element_text(hjust = 0.5))+geom_ribbon(aes(ymin = right_lwr, ymax = right_upr),alpha = 0.1) + + ``` This graph compares risk of death for every age according to smoking status. As already explained, we can see that most of the deaths observed in our study at the middle aged group occurred in smokers, but necessarily the case for older age groups (risk=1). @@ -119,3 +121,4 @@ The confidence intervals do overlap, and therefore statistically speaking reject However, it does question the safety of cigarette use and gives reason to further analysis and bigger studies to firmly conclude on impact of cigarette. +