checked and tidy up scripts for plots for non-severe
This commit is contained in:
parent
f2b778ace7
commit
dde2cc9494
3 changed files with 63 additions and 64 deletions
|
@ -12,21 +12,23 @@ source("Header_TT.R")
|
|||
# Input
|
||||
#=============
|
||||
source("data_extraction_mediators.R")
|
||||
source("read_data.R")
|
||||
#source("read_data.R")
|
||||
|
||||
########################################################################
|
||||
#=============
|
||||
# Data extraction for non-severe
|
||||
#=============
|
||||
table(fp_adults$T1_resp_score)
|
||||
table(fp_adults$obesity)
|
||||
table(fp_adults_ics$T1_resp_score)
|
||||
table(fp_adults_ics$obesity)
|
||||
|
||||
df = fp_adults[fp_adults$T1_resp_score<3,]
|
||||
df = fp_adults_ics[fp_adults_ics$T1_resp_score<3,]
|
||||
table(df$obesity)
|
||||
|
||||
df_ob = df[df$obesity == 1,]
|
||||
df_nob = df[df$obesity == 0,]
|
||||
|
||||
rm(npa_lf, npa_wf, sam_lf, sam_wf, serum_lf, serum_wf, fp_adults_ics)
|
||||
|
||||
#============
|
||||
# npa
|
||||
#============
|
||||
|
@ -38,6 +40,8 @@ foo = data.frame(df$obesity, df$vl_pfu_ul_npa2)
|
|||
na_c = sum(is.na(foo$df.vl_pfu_ul_npa2))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$vl_pfu_ul_npa2, df$obesity, median, na.rm = T)
|
||||
tapply(df$vl_pfu_ul_npa2, df$obesity, summary, na.rm = T)
|
||||
|
||||
# 1l29: t1
|
||||
wilcox.test(df_ob$il29_npa1, df_nob$il29_npa1)
|
||||
|
@ -46,6 +50,8 @@ foo = data.frame(df$obesity, df$il29_npa1)
|
|||
na_c = sum(is.na(foo$df.il29_npa1))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$il29_npa1, df$obesity, median, na.rm = T)
|
||||
tapply(df$il29_npa1, df$obesity, summary, na.rm = T)
|
||||
|
||||
# tnfr1: t3
|
||||
wilcox.test(df_ob$tnfr1_npa3, df_nob$tnfr1_npa3)
|
||||
|
@ -55,6 +61,11 @@ na_c = sum(is.na(foo$df.tnfr1_npa3))
|
|||
nrow(df) - na_c
|
||||
|
||||
|
||||
tapply(df$tnfr1_npa3, df$obesity, median, na.rm = T)
|
||||
tapply(df$tnfr1_npa3, df$obesity, summary, na.rm = T)
|
||||
|
||||
boxplot(df_ob$tnfr1_npa3, df_nob$tnfr1_npa3)
|
||||
|
||||
# rantes: t1
|
||||
wilcox.test(df_ob$rantes_npa1, df_nob$rantes_npa1)
|
||||
|
||||
|
@ -73,6 +84,9 @@ foo = data.frame(df$obesity, df$tarc_sam3)
|
|||
na_c = sum(is.na(foo$df.tarc_sam3))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$tarc_sam3, df$obesity, median, na.rm = T)
|
||||
|
||||
|
||||
# il13: t3
|
||||
wilcox.test(df_ob$il13_sam3
|
||||
, df_nob$il13_sam3)
|
||||
|
@ -81,6 +95,9 @@ foo = data.frame(df$obesity, df$il13_sam3)
|
|||
na_c = sum(is.na(foo$df.il13_sam3))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$il13_sam3, df$obesity, median, na.rm = T)
|
||||
|
||||
|
||||
# eotaxin: t1
|
||||
wilcox.test(df_ob$eotaxin_sam1
|
||||
, df_nob$eotaxin_sam1)
|
||||
|
@ -89,6 +106,8 @@ foo = data.frame(df$obesity, df$eotaxin_sam1)
|
|||
na_c = sum(is.na(foo$df.eotaxin_sam1))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$eotaxin_sam1, df$obesity, median, na.rm = T)
|
||||
|
||||
|
||||
#============
|
||||
# serum
|
||||
|
@ -101,6 +120,9 @@ foo = data.frame(df$obesity, df$ifna2a_serum1)
|
|||
na_c = sum(is.na(foo$df.ifna2a_serum1))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$ifna2a_serum1, df$obesity, median, na.rm = T)
|
||||
|
||||
|
||||
# mip17: t1
|
||||
wilcox.test(df_ob$mip17_serum1,
|
||||
df_nob$mip17_serum1)
|
||||
|
@ -109,6 +131,8 @@ foo = data.frame(df$obesity, df$mip17_serum1)
|
|||
na_c = sum(is.na(foo$df.mip17_serum1))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$mip17_serum1, df$obesity, median, na.rm = T)
|
||||
|
||||
# il1: t1
|
||||
wilcox.test(df_ob$il1_serum1
|
||||
, df_nob$il1_serum1)
|
||||
|
@ -117,6 +141,11 @@ foo = data.frame(df$obesity, df$il1_serum1)
|
|||
na_c = sum(is.na(foo$df.il1_serum1))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$il1_serum1, df$obesity, median, na.rm = T)
|
||||
tapply(df$il1_serum1, df$obesity, summary, na.rm = T)
|
||||
boxplot(df_ob$il1_serum1, df_nob$il1_serum1)
|
||||
|
||||
|
||||
# ifna2a: t2
|
||||
wilcox.test(df_ob$ifna2a_serum2,
|
||||
df_nob$ifna2a_serum2)
|
||||
|
@ -125,6 +154,9 @@ foo = data.frame(df$obesity, df$ifna2a_serum2)
|
|||
na_c = sum(is.na(foo$df.ifna2a_serum2))
|
||||
nrow(df) - na_c
|
||||
|
||||
|
||||
tapply(df$ifna2a_serum2, df$obesity, median, na.rm = T)
|
||||
|
||||
# ifna2a: t3
|
||||
wilcox.test(df_ob$ifna2a_serum3,
|
||||
df_nob$ifna2a_serum3)
|
||||
|
@ -133,6 +165,9 @@ foo = data.frame(df$obesity, df$ifna2a_serum3)
|
|||
na_c = sum(is.na(foo$df.ifna2a_serum3))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$ifna2a_serum3, df$obesity, median, na.rm = T)
|
||||
|
||||
|
||||
# ifnb: t3
|
||||
wilcox.test(df_ob$ifnb_serum3
|
||||
, df_nob$ifnb_serum3)
|
||||
|
@ -141,3 +176,4 @@ foo = data.frame(df$obesity, df$ifnb_serum3)
|
|||
na_c = sum(is.na(foo$df.ifnb_serum3))
|
||||
nrow(df) - na_c
|
||||
|
||||
tapply(df$ifnb_serum3, df$obesity, median, na.rm = T)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue