Last updated: 2024-06-09

Checks: 6 1

Knit directory: madi-brussels-pertussis-thailand/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20231106) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 59a1721. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .RData
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  analysis/cluster_pca_single4_old.Rmd
    Untracked:  withelisa.csv
    Untracked:  withelist1.csv

Unstaged changes:
    Modified:   analysis/antigenPCA_single.Rmd
    Modified:   analysis/apwp_pca_single.Rmd
    Modified:   analysis/cluster_pca_single4.Rmd
    Modified:   analysis/cluster_single.Rmd
    Modified:   analysis/doublepca1.Rmd
    Modified:   analysis/mediation_individual.Rmd
    Modified:   analysis/mediation_multiple.Rmd
    Modified:   analysis/mediation_pca.Rmd
    Modified:   analysis/mediation_pls_3.Rmd
    Modified:   analysis/mediation_verification.Rmd
    Modified:   data/dirEffect_wp_nocofounder_pca.Rd
    Modified:   data/dirEffect_wp_nocofounder_pls_3.Rd
    Modified:   data/medEffect_wp_nocofounder_pca.Rd
    Modified:   data/medEffect_wp_nocofounder_pls_3.Rd
    Modified:   data/totalEffect_wp_nocofounder_pca.Rd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/mediation_verification.Rmd) and HTML (docs/mediation_verification.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 532d320 Jie Zhou 2024-02-21 madi meeting
html 532d320 Jie Zhou 2024-02-21 madi meeting


Attaching package: 'glue'
The following object is masked from 'package:gdata':

    trim
here() starts at C:/Users/Jie Zhou/Desktop/madi-brussels-pertussis-thailand

0.1 Model description

0.1.1 Definitions

Let \(a\) be the treatment whit \(a=0\) for no maternal vaccination and \(a=1\) for maternal vaccination. \(M\) represents mediator,i.e, maternal antibodies, and \(Y\) the outcome, i.e., infant antibodies.

Causal direct effects of maternal vaccination on infant antibodies are defined as \[\tau_i=Y_i(1,M_i(a))-Y_i(0,M_i(a));\] while causal mediation effects of maternal antibodies on infant antibodies are defined as \[\alpha_i=Y_i(a,M_i(1))-Y_i(a,M_i(0))\]

0.1.2 model

[1] "All the outcome (infant antibodies) considered: "
 [1] "DT_FcgR2a"  "DT_FcgR3b"  "DT_IgG"     "DT_IgG1"    "DT_IgG2"   
 [6] "DT_IgG3"    "DT_IgG4"    "FHA_FcgR2a" "FHA_FcgR3b" "FHA_IgG"   
[11] "FHA_IgG1"   "FHA_IgG2"   "FHA_IgG3"   "FHA_IgG4"   "PRN_FcgR2a"
[16] "PRN_FcgR3b" "PRN_IgG"    "PRN_IgG1"   "PRN_IgG2"   "PRN_IgG3"  
[21] "PRN_IgG4"   "PT_FcgR2a"  "PT_FcgR3b"  "PT_IgG"     "PT_IgG1"   
[26] "PT_IgG2"    "PT_IgG3"    "PT_IgG4"    "TT_FcgR2a"  "TT_FcgR3b" 
[31] "TT_IgG"     "TT_IgG1"    "TT_IgG2"    "TT_IgG3"    "TT_IgG4"   
[36] "DT_ADCD"    "FHA_ADCD"   "PRN_ADCD"   "PT_ADCD"    "TT_ADCD"   
[41] "DT_ADCP"    "FHA_ADCP"   "PRN_ADCP"   "PT_ADCP"    "TT_ADCP"   
[46] "DT_ADNP"    "FHA_ADNP"   "PRN_ADNP"   "PT_ADNP"    "TT_ADNP"   
[1] "All the mediators (maternal cord blood total igg): "
[1] "ELISA_FHA_IgG" "ELISA_PRN_IgG" "ELISA_PT_IgG" 
[1] "The Proportion explained by the principal components: "
[1] 0.559 0.850 1.000

0.2 Results 1: matimm+/-

      outcome    direffect medeffect1     medeffect2       medeffect
1   TT_FcgR2a  0.256071844  0.2924865 -0.05105929604 -0.014934156805
2     TT_ADCD  0.433959242  0.2924865 -0.03899320875 -0.011404988689
3      PT_IgG -0.437796255  0.2924865  0.03718536116  0.010876217604
4   TT_FcgR3b  0.609550681  0.2924865 -0.06904845520 -0.020195743714
5     TT_ADCP  0.206383746  0.2924865 -0.01489566018 -0.004356780099
6    FHA_ADCP -0.118206076  0.2924865 -0.04636656371 -0.013561595767
7     TT_ADNP  0.157238616  0.2924865  0.02666963640  0.007800509659
8     TT_IgG1  0.544240040  0.2924865 -0.05657577075 -0.016547651402
9   DT_FcgR3b  0.572777510  0.2924865 -0.10590814178 -0.030976705888
10    DT_IgG3  0.279411757  0.2924865 -0.10828565919 -0.031672097728
11    FHA_IgG -0.228346582  0.2924865 -0.10311711310 -0.030160367569
12   FHA_IgG2 -0.272631308  0.2924865 -0.17477655957 -0.051119791084
13   FHA_IgG4 -0.356565821  0.2924865 -0.07452995619 -0.021799008971
14    TT_IgG3  0.224390667  0.2924865 -0.06946178813 -0.020316638035
15    PT_IgG1 -0.382916943  0.2924865  0.01806689031  0.005284322225
16 PRN_FcgR2a  0.296481345  0.2924865  0.06414375679  0.018761185451
17   FHA_ADNP  0.089810859  0.2924865 -0.06079180723 -0.017780785324
18    PT_IgG3  0.212389576  0.2924865 -0.09184527810 -0.026863507557
19 FHA_FcgR2a  0.186418557  0.2924865 -0.07984214878 -0.023352753799
20  DT_FcgR2a  0.131280778  0.2924865 -0.03367978084 -0.009850882547
21     TT_IgG  0.155374324  0.2924865 -0.11002502355 -0.032180838391
22 PRN_FcgR3b  0.399427711  0.2924865  0.17527423204  0.051265353584
23 FHA_FcgR3b  0.264294145  0.2924865 -0.13745626223 -0.040204106466
24    DT_ADCD  0.127481120  0.2924865  0.00514300082  0.001504258512
25     DT_IgG -0.145741215  0.2924865 -0.06536266416 -0.019117699448
26    DT_IgG4 -0.277152572  0.2924865 -0.13004177884 -0.038035469877
27   PRN_ADCD  0.159700911  0.2924865  0.00357715175  0.001046268738
28   PRN_IgG2  0.166336539  0.2924865 -0.03333355547 -0.009749616288
29    PT_IgG2 -0.079612662  0.2924865  0.00976310714  0.002855577421
30    PT_ADNP  0.105617489  0.2924865  0.04644427172  0.013584324311
31   PRN_IgG1  0.272054363  0.2924865  0.15428002201  0.045124829744
32    PT_IgG4 -0.056306024  0.2924865  0.00353857371  0.001034985180
33   PRN_ADNP  0.038385381  0.2924865 -0.00403377754 -0.001179825633
34   PRN_IgG3  0.164189691  0.2924865 -0.09116964281 -0.026665893329
35    PT_ADCD  0.193109967  0.2924865  0.11927192412  0.034885432340
36    DT_IgG2 -0.096476378  0.2924865 -0.00316817797 -0.000926649410
37   FHA_ADCD  0.092373678  0.2924865 -0.06654300608 -0.019462933572
38    TT_IgG2  0.045164861  0.2924865  0.06952593147  0.020335399096
39   FHA_IgG3  0.101720076  0.2924865 -0.16174740776 -0.047308939560
40    PRN_IgG -0.086525591  0.2924865  0.00001898393  0.000005552545
41    DT_ADNP  0.015811015  0.2924865  0.00461188599  0.001348914574
42   PRN_IgG4  0.057299548  0.2924865 -0.00606449556 -0.001773783320
43   FHA_IgG1  0.066382412  0.2924865 -0.25877948771 -0.075689516839
44    TT_IgG4  0.047198392  0.2924865  0.10559187697  0.030884202687
45   PRN_ADCP -0.018251222  0.2924865  0.03600983715  0.010532392655
46    DT_IgG1  0.073993113  0.2924865 -0.01405383719 -0.004110558204
47  PT_FcgR3b -0.039853026  0.2924865  0.05057405800  0.014792231211
48    PT_ADCP -0.015272535  0.2924865  0.01639070578  0.004794060812
49    DT_ADCP -0.002280838  0.2924865  0.02550219843  0.007459049766
50  PT_FcgR2a -0.006686480  0.2924865  0.05280763100  0.015445521247
        pvalue
1  0.002292048
2  0.002378056
3  0.002670362
4  0.002908115
5  0.005424087
6  0.010737466
7  0.013598710
8  0.018166566
9  0.018951665
10 0.023322141
11 0.023328376
12 0.036973808
13 0.051690321
14 0.055276370
15 0.062744951
16 0.068174050
17 0.080177569
18 0.085281200
19 0.104964473
20 0.111241456
21 0.132790969
22 0.164525226
23 0.174878839
24 0.181931320
25 0.181961285
26 0.194912614
27 0.200749542
28 0.209815109
29 0.227163308
30 0.241170194
31 0.250717278
32 0.258995016
33 0.281359031
34 0.313216730
35 0.341666387
36 0.472711839
37 0.484472686
38 0.501601000
39 0.526426912
40 0.531053788
41 0.594395570
42 0.645692326
43 0.670310169
44 0.720826767
45 0.739186872
46 0.763356633
47 0.786780510
48 0.810978321
49 0.941134501
50 0.968275290

sessionInfo()
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] RColorBrewer_1.1-3 here_1.0.1         glue_1.7.0         RPostgres_1.4.6   
 [5] DT_0.33            DBI_1.2.2          pls_2.8-3          mediation_4.5.0   
 [9] sandwich_3.1-0     mvtnorm_1.2-4      Matrix_1.7-0       MASS_7.3-60.2     
[13] ggpubr_0.6.0       ggExtra_0.10.1     e1071_1.7-14       ggfortify_0.4.17  
[17] rmarkdown_2.26     knitr_1.46         ggplot2_3.5.1      gdata_3.0.0       
[21] tidyr_1.3.1        tidyquery_0.2.4    dplyr_1.1.4       

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.1  blob_1.2.4        fastmap_1.1.1     promises_1.3.0   
 [5] digest_0.6.35     rpart_4.1.23      timechange_0.3.0  mime_0.12        
 [9] lifecycle_1.0.4   cluster_2.1.6     magrittr_2.0.3    compiler_4.4.0   
[13] rlang_1.1.3       Hmisc_5.1-2       sass_0.4.9        tools_4.4.0      
[17] utf8_1.2.4        yaml_2.3.8        data.table_1.15.4 ggsignif_0.6.4   
[21] htmlwidgets_1.6.4 bit_4.0.5         abind_1.4-5       miniUI_0.1.1.1   
[25] workflowr_1.7.1   withr_3.0.0       foreign_0.8-86    purrr_1.0.2      
[29] nnet_7.3-19       grid_4.4.0        fansi_1.0.6       git2r_0.33.0     
[33] xtable_1.8-4      colorspace_2.1-0  scales_1.3.0      gtools_3.9.5     
[37] cli_3.6.2         generics_0.1.3    rstudioapi_0.16.0 minqa_1.2.6      
[41] cachem_1.0.8      proxy_0.4-27      stringr_1.5.1     splines_4.4.0    
[45] base64enc_0.1-3   vctrs_0.6.5       boot_1.3-30       jsonlite_1.8.8   
[49] carData_3.0-5     queryparser_0.3.2 car_3.1-2         hms_1.1.3        
[53] bit64_4.0.5       rstatix_0.7.2     Formula_1.2-5     htmlTable_2.4.2  
[57] jquerylib_0.1.4   nloptr_2.0.3      lubridate_1.9.3   stringi_1.8.3    
[61] gtable_0.3.5      later_1.3.2       lme4_1.1-35.3     munsell_0.5.1    
[65] tibble_3.2.1      pillar_1.9.0      htmltools_0.5.8.1 R6_2.5.1         
[69] rprojroot_2.0.4   lpSolve_5.6.20    evaluate_0.23     shiny_1.8.1.1    
[73] lattice_0.22-6    backports_1.4.1   broom_1.0.5       httpuv_1.6.15    
[77] bslib_0.7.0       class_7.3-22      Rcpp_1.0.12       nlme_3.1-164     
[81] gridExtra_2.3     checkmate_2.3.1   whisker_0.4.1     xfun_0.43        
[85] fs_1.6.4          zoo_1.8-12        pkgconfig_2.0.3