From 30890dead0ae8ad98a86d641fe6342597ffa7bb0 Mon Sep 17 00:00:00 2001 From: a71d8cf7a2a6b8e7ee04855d19814c1e Date: Wed, 16 Dec 2020 22:22:01 +0000 Subject: [PATCH] exo 3 pair salem ZEINY --- module3/exercice3/ConcentrationCO2.Rmd | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/module3/exercice3/ConcentrationCO2.Rmd b/module3/exercice3/ConcentrationCO2.Rmd index 211782b..ba6512d 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. + -- 2.18.1