added check_stats.R for non-severe analysis
This commit is contained in:
parent
37f8cd619e
commit
6731b9484c
1 changed files with 143 additions and 0 deletions
143
non_severe/check_stats.R
Executable file
143
non_severe/check_stats.R
Executable file
|
@ -0,0 +1,143 @@
|
|||
#!/usr/bin/Rscript
|
||||
getwd()
|
||||
setwd("~/git/mosaic_2020/")
|
||||
getwd()
|
||||
########################################################################
|
||||
# TASK: check stats
|
||||
########################################################################
|
||||
# load libraries, packages and local imports
|
||||
source("Header_TT.R")
|
||||
|
||||
#=============
|
||||
# Input
|
||||
#=============
|
||||
source("data_extraction_mediators.R")
|
||||
source("read_data.R")
|
||||
|
||||
########################################################################
|
||||
#=============
|
||||
# Data extraction for non-severe
|
||||
#=============
|
||||
table(fp_adults$T1_resp_score)
|
||||
table(fp_adults$obesity)
|
||||
|
||||
df = fp_adults[fp_adults$T1_resp_score<3,]
|
||||
table(df$obesity)
|
||||
|
||||
df_ob = df[df$obesity == 1,]
|
||||
df_nob = df[df$obesity == 0,]
|
||||
|
||||
#============
|
||||
# npa
|
||||
#============
|
||||
# vl_pfu_ul: t2
|
||||
wilcox.test(df_ob$vl_pfu_ul_npa2, df_nob$vl_pfu_ul_npa2)
|
||||
wilcox_test(vl_pfu_ul_npa2 ~ obesity, data = df)
|
||||
|
||||
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
|
||||
|
||||
|
||||
# 1l29: t1
|
||||
wilcox.test(df_ob$il29_npa1, df_nob$il29_npa1)
|
||||
|
||||
foo = data.frame(df$obesity, df$il29_npa1)
|
||||
na_c = sum(is.na(foo$df.il29_npa1))
|
||||
nrow(df) - na_c
|
||||
|
||||
|
||||
# tnfr1: t3
|
||||
wilcox.test(df_ob$tnfr1_npa3, df_nob$tnfr1_npa3)
|
||||
|
||||
foo = data.frame(df$obesity, df$tnfr1_npa3)
|
||||
na_c = sum(is.na(foo$df.tnfr1_npa3))
|
||||
nrow(df) - na_c
|
||||
|
||||
|
||||
# rantes: t1
|
||||
wilcox.test(df_ob$rantes_npa1, df_nob$rantes_npa1)
|
||||
|
||||
foo = data.frame(df$obesity, df$rantes_npa1)
|
||||
na_c = sum(is.na(foo$df.rantes_npa1))
|
||||
nrow(df) - na_c
|
||||
|
||||
#============
|
||||
# sam
|
||||
#============
|
||||
# tarc: t3
|
||||
wilcox.test(df_ob$tarc_sam3
|
||||
, df_nob$tarc_sam3)
|
||||
|
||||
foo = data.frame(df$obesity, df$tarc_sam3)
|
||||
na_c = sum(is.na(foo$df.tarc_sam3))
|
||||
nrow(df) - na_c
|
||||
|
||||
# il13: t3
|
||||
wilcox.test(df_ob$il13_sam3
|
||||
, df_nob$il13_sam3)
|
||||
|
||||
foo = data.frame(df$obesity, df$il13_sam3)
|
||||
na_c = sum(is.na(foo$df.il13_sam3))
|
||||
nrow(df) - na_c
|
||||
|
||||
# eotaxin: t1
|
||||
wilcox.test(df_ob$eotaxin_sam1
|
||||
, df_nob$eotaxin_sam1)
|
||||
|
||||
foo = data.frame(df$obesity, df$eotaxin_sam1)
|
||||
na_c = sum(is.na(foo$df.eotaxin_sam1))
|
||||
nrow(df) - na_c
|
||||
|
||||
|
||||
#============
|
||||
# serum
|
||||
#============
|
||||
# ifna2a: t1
|
||||
wilcox.test(df_ob$ifna2a_serum1,
|
||||
df_nob$ifna2a_serum1)
|
||||
|
||||
foo = data.frame(df$obesity, df$ifna2a_serum1)
|
||||
na_c = sum(is.na(foo$df.ifna2a_serum1))
|
||||
nrow(df) - na_c
|
||||
|
||||
# mip17: t1
|
||||
wilcox.test(df_ob$mip17_serum1,
|
||||
df_nob$mip17_serum1)
|
||||
|
||||
foo = data.frame(df$obesity, df$mip17_serum1)
|
||||
na_c = sum(is.na(foo$df.mip17_serum1))
|
||||
nrow(df) - na_c
|
||||
|
||||
# il1: t1
|
||||
wilcox.test(df_ob$il1_serum1
|
||||
, df_nob$il1_serum1)
|
||||
|
||||
foo = data.frame(df$obesity, df$il1_serum1)
|
||||
na_c = sum(is.na(foo$df.il1_serum1))
|
||||
nrow(df) - na_c
|
||||
|
||||
# ifna2a: t2
|
||||
wilcox.test(df_ob$ifna2a_serum2,
|
||||
df_nob$ifna2a_serum2)
|
||||
|
||||
foo = data.frame(df$obesity, df$ifna2a_serum2)
|
||||
na_c = sum(is.na(foo$df.ifna2a_serum2))
|
||||
nrow(df) - na_c
|
||||
|
||||
# ifna2a: t3
|
||||
wilcox.test(df_ob$ifna2a_serum3,
|
||||
df_nob$ifna2a_serum3)
|
||||
|
||||
foo = data.frame(df$obesity, df$ifna2a_serum3)
|
||||
na_c = sum(is.na(foo$df.ifna2a_serum3))
|
||||
nrow(df) - na_c
|
||||
|
||||
# ifnb: t3
|
||||
wilcox.test(df_ob$ifnb_serum3
|
||||
, df_nob$ifnb_serum3)
|
||||
|
||||
foo = data.frame(df$obesity, df$ifnb_serum3)
|
||||
na_c = sum(is.na(foo$df.ifnb_serum3))
|
||||
nrow(df) - na_c
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue