added stats_check.R to cross check
This commit is contained in:
parent
f13d1212e9
commit
6da0bd2e00
1 changed files with 85 additions and 0 deletions
85
stats_check.R
Executable file
85
stats_check.R
Executable file
|
@ -0,0 +1,85 @@
|
|||
#!/usr/bin/Rscript
|
||||
############################################################
|
||||
# TASK: to check unpaired stats from WF data
|
||||
############################################################
|
||||
#=============
|
||||
# Input
|
||||
#=============
|
||||
source("data_extraction_formatting.R")
|
||||
#%%========================================================
|
||||
# data assignment for stats
|
||||
wf_npa = npa_df_adults_clean[npa_df_adults_clean$flustat == 1,]
|
||||
wf_sam = sam_df_adults_clean[sam_df_adults_clean$flustat == 1,]
|
||||
wf_serum = serum_df_adults_clean[serum_df_adults_clean$flustat == 1,]
|
||||
############################################################
|
||||
#=========
|
||||
# t1
|
||||
#=========
|
||||
wilcox.test(wf_npa$eotaxin3_npa1[wf_npa$obesity == 1], wf_npa$eotaxin3_npa1[wf_npa$obesity == 0], paired = F)
|
||||
length(wf_npa$eotaxin3_npa1) - sum(is.na(wf_npa$eotaxin3_npa1))
|
||||
|
||||
wilcox.test(wf_npa$il12p70_npa1[wf_npa$obesity == 1], wf_npa$il12p70_npa1[wf_npa$obesity == 0], paired = F)
|
||||
length(wf_npa$il12p70_npa1) - sum(is.na(wf_npa$il12p70_npa1))
|
||||
|
||||
#=========
|
||||
# t2
|
||||
#=========
|
||||
wilcox.test(wf_npa$il4_npa2[wf_npa$obesity == 1], wf_npa$il4_npa2[wf_npa$obesity == 0], paired = F)
|
||||
length(wf_npa$il4_npa2) - sum(is.na(wf_npa$il4_npa2))
|
||||
|
||||
#=========
|
||||
# t3
|
||||
#=========
|
||||
wilcox.test(wf_npa$ip10_npa3[wf_npa$obesity == 1], wf_npa$ip10_npa3[wf_npa$obesity == 0], paired = F)
|
||||
length(wf_npa$ip10_npa3) - sum(is.na(wf_npa$ip10_npa3))
|
||||
###################################################################
|
||||
##########
|
||||
# sam
|
||||
##########
|
||||
#=========
|
||||
# t1
|
||||
#=========
|
||||
wilcox.test(wf_sam$eotaxin3_sam1[wf_sam$obesity == 1], wf_sam$eotaxin3_sam1[wf_sam$obesity == 0], paired = F)
|
||||
length(wf_sam$eotaxin3_sam1) - sum(is.na(wf_sam$eotaxin3_sam1))
|
||||
|
||||
wilcox.test(wf_sam$il12p70_sam1[wf_sam$obesity == 1], wf_sam$il12p70_sam1[wf_sam$obesity == 0], paired = F)
|
||||
length(wf_sam$il12p70_sam1) - sum(is.na(wf_sam$il12p70_sam1))
|
||||
|
||||
#=========
|
||||
# t2
|
||||
#=========
|
||||
wilcox.test(wf_sam$il4_sam2[wf_sam$obesity == 1], wf_sam$il4_sam2[wf_sam$obesity == 0], paired = F)
|
||||
length(wf_sam$il4_sam2) - sum(is.na(wf_sam$il4_sam2))
|
||||
|
||||
#=========
|
||||
# t3
|
||||
#=========
|
||||
wilcox.test(wf_sam$tnfr1_sam3[wf_sam$obesity == 1], wf_sam$tnfr1_sam3[wf_sam$obesity == 0], paired = F)
|
||||
length(wf_sam$tnfr1_sam3) - sum(is.na(wf_sam$tnfr1_sam3))
|
||||
|
||||
###################################################################
|
||||
##########
|
||||
# serum
|
||||
##########
|
||||
|
||||
#=========
|
||||
# t1
|
||||
#=========
|
||||
wilcox.test(wf_serum$eotaxin3_serum1[wf_serum$obesity == 1], wf_serum$eotaxin3_serum1[wf_serum$obesity == 0], paired = F)
|
||||
length(wf_serum$eotaxin3_serum1) - sum(is.na(wf_serum$eotaxin3_serum1))
|
||||
|
||||
wilcox.test(wf_serum$ifna2a_serum1[wf_serum$obesity == 1], wf_serum$ifna2a_serum1[wf_serum$obesity == 0], paired = F)
|
||||
length(wf_serum$ifna2a_serum1) - sum(is.na(wf_serum$ifna2a_serum1))
|
||||
|
||||
#=========
|
||||
# t2
|
||||
#=========
|
||||
wilcox.test(wf_serum$il5_serum2[wf_serum$obesity == 1], wf_serum$il5_serum2[wf_serum$obesity == 0], paired = F)
|
||||
length(wf_serum$il5_serum2) - sum(is.na(wf_serum$il5_serum2))
|
||||
|
||||
#=========
|
||||
# t3
|
||||
#=========
|
||||
wilcox.test(wf_serum$rantes_serum3[wf_serum$obesity == 1], wf_serum$rantes_serum3[wf_serum$obesity == 0], paired = F)
|
||||
length(wf_serum$rantes_serum3) - sum(is.na(wf_serum$rantes_serum3))
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue