knitr::opts_chunk$set(comment = NA, fig.path = '00_figures_aim1/', fig.width = 20, fig.height = 12, results = 'markup', tidy = FALSE, message = FALSE, warning = FALSE, echo = FALSE)
alpha <- 0.05
### load required packages to `git` command pacman::p_load( prettydoc, rmarkdown, knitr, devtools, install = TRUE)
### enviroment setwd(Sys.getenv('HOME')) load_all('~/git/chmiddbb')
### load data dat <- chmi.phen( data_type = 'ab_data', aim_data = 'aim_1', group_tr = 'ab_select') ### 'descriptive' and 'gaussian' distribution tab_1 <- chmi.stat.descriptive_tab( phen = dat, vars_x = c('log10_mfi', 'ppp_time'), vars_y = c('dataset', 't_igg', 'antigen'), shapiro_test = TRUE) ### 'descriptive' and 'sample' size distribution tab_2 <- chmi.stat.descriptive_tab( phen = dat, vars_x = c('log10_mfi'), vars_y = c('t_igg', 'antigen', 't2_point'), shapiro_test = TRUE) ### 'crosstab' for data in 'aim_1' dat_1 <- unique( dat[, c('original_id', 'dataset', 'gender', 'status', 'immune_status', 'mal_exposure')]) tab_3 <- chmi.stat.crosstab_tab( phen = dat_1, vars_x = c('gender', 'status', 'immune_status', 'mal_exposure'), vars_y = c('dataset'), multi_tab = TRUE, sum_out = TRUE) ### Conclusions ## 'tab_1' shows 34 / 366 gaussian distribution ## 'tab_2' shows 'minimum' size sample in 19 and 'maximum' size sample in 60 (Dunn test) ## 'tab_3' shows 'status' and 'mal_exposure' are same variable ## 'tab_3' only shows differences in 8 naives ('status') are placebos ('mal_exposure') for 'T2'
### vector to manage data l_vars1 <- c('t_igg', 'antigen') l_vars2 <- c('t_igg', 'antigen', 't2_point') ### subset data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.