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
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_individual.Rmd)
and HTML (docs/mediation_individual.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 | 8c46744 | Jie Zhou | 2024-06-03 | remove antigen elisa |
| html | 8c46744 | Jie Zhou | 2024-06-03 | remove antigen elisa |
| Rmd | 532d320 | Jie Zhou | 2024-02-21 | madi meeting |
| html | 532d320 | Jie Zhou | 2024-02-21 | madi meeting |
| Rmd | 528d126 | Jie Zhou | 2024-01-23 | added pls and pca based mediation analysis |
| html | 528d126 | Jie Zhou | 2024-01-23 | added pls and pca based mediation analysis |
| Rmd | 30792a7 | Jie Zhou | 2024-01-13 | added pls mediation analysis |
| html | 30792a7 | Jie Zhou | 2024-01-13 | added pls mediation analysis |
Attaching package: 'glue'
The following object is masked from 'package:gdata':
trim
here() starts at C:/Users/Jie Zhou/Desktop/madi-brussels-pertussis-thailand
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))\]

For mediator, we have \[M_i=\gamma_0+\gamma_1a_i+e_{mi}\] For outcome, we have \[Y_i=\beta_0+\beta_1M_i+\beta_2a_i+e_{yi}\]
The treatment is infant vaccination plus maternal vaccination, mediator is maternal cord blood features, and outcome is infant features. Even though there are eight cord blood features in total, only the ELISA-related three features are measured in both maternal +/- groups. So these three features will be used as mediators and fifty three infant features as outcomes.
[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 1 th outcome is being processed..."
[1] "The 2 th outcome is being processed..."
[1] "The 3 th outcome is being processed..."
[1] "The 4 th outcome is being processed..."
[1] "The 5 th outcome is being processed..."
[1] "The 6 th outcome is being processed..."
[1] "The 7 th outcome is being processed..."
[1] "The 8 th outcome is being processed..."
[1] "The 9 th outcome is being processed..."
[1] "The 10 th outcome is being processed..."
[1] "The 11 th outcome is being processed..."
[1] "The 12 th outcome is being processed..."
[1] "The 13 th outcome is being processed..."
[1] "The 14 th outcome is being processed..."
[1] "The 15 th outcome is being processed..."
[1] "The 16 th outcome is being processed..."
[1] "The 17 th outcome is being processed..."
[1] "The 18 th outcome is being processed..."
[1] "The 19 th outcome is being processed..."
[1] "The 20 th outcome is being processed..."
[1] "The 21 th outcome is being processed..."
[1] "The 22 th outcome is being processed..."
[1] "The 23 th outcome is being processed..."
[1] "The 24 th outcome is being processed..."
[1] "The 25 th outcome is being processed..."
[1] "The 26 th outcome is being processed..."
[1] "The 27 th outcome is being processed..."
[1] "The 28 th outcome is being processed..."
[1] "The 29 th outcome is being processed..."
[1] "The 30 th outcome is being processed..."
[1] "The 31 th outcome is being processed..."
[1] "The 32 th outcome is being processed..."
[1] "The 33 th outcome is being processed..."
[1] "The 34 th outcome is being processed..."
[1] "The 35 th outcome is being processed..."
[1] "The 36 th outcome is being processed..."
[1] "The 37 th outcome is being processed..."
[1] "The 38 th outcome is being processed..."
[1] "The 39 th outcome is being processed..."
[1] "The 40 th outcome is being processed..."
[1] "The 41 th outcome is being processed..."
[1] "The 42 th outcome is being processed..."
[1] "The 43 th outcome is being processed..."
[1] "The 44 th outcome is being processed..."
[1] "The 45 th outcome is being processed..."
[1] "The 46 th outcome is being processed..."
[1] "The 47 th outcome is being processed..."
[1] "The 48 th outcome is being processed..."
[1] "The 49 th outcome is being processed..."
[1] "The 50 th outcome is being processed..."
`
outcome mediator deffect dlower dupper dpvalue dfdr
1 PT_IgG ELISA_PT_IgG -0.471 -0.742 -0.204 0.000 0.000
2 FHA_ADCP ELISA_FHA_IgG -0.122 -0.215 -0.032 0.008 0.120
3 FHA_IgG ELISA_FHA_IgG -0.241 -0.430 -0.039 0.020 0.168
4 FHA_IgG2 ELISA_FHA_IgG -0.273 -0.518 -0.033 0.028 0.168
5 PT_IgG1 ELISA_PT_IgG -0.463 -0.865 -0.058 0.028 0.168
6 FHA_IgG4 ELISA_FHA_IgG -0.353 -0.699 -0.004 0.050 0.249
7 PRN_FcgR2a ELISA_PRN_IgG 0.299 -0.011 0.615 0.058 0.249
8 PT_IgG3 ELISA_PT_IgG 0.224 -0.024 0.465 0.080 0.300
9 FHA_ADNP ELISA_FHA_IgG 0.079 -0.021 0.190 0.130 0.425
10 PRN_FcgR3b ELISA_PRN_IgG 0.417 -0.135 0.994 0.142 0.425
11 FHA_FcgR2a ELISA_FHA_IgG 0.163 -0.055 0.394 0.156 0.425
12 PT_IgG2 ELISA_PT_IgG -0.083 -0.201 0.040 0.182 0.441
13 PRN_ADCD ELISA_PRN_IgG 0.156 -0.080 0.390 0.202 0.441
14 PT_ADNP ELISA_PT_IgG 0.112 -0.053 0.290 0.206 0.441
15 PRN_IgG2 ELISA_PRN_IgG 0.158 -0.101 0.411 0.222 0.444
16 FHA_FcgR3b ELISA_FHA_IgG 0.226 -0.176 0.624 0.252 0.473
17 PT_IgG4 ELISA_PT_IgG -0.055 -0.156 0.048 0.272 0.480
18 PRN_IgG ELISA_PRN_IgG -0.132 -0.407 0.136 0.324 0.540
19 PRN_IgG1 ELISA_PRN_IgG 0.219 -0.233 0.697 0.348 0.543
20 PRN_ADNP ELISA_PRN_IgG 0.032 -0.033 0.099 0.362 0.543
21 PT_ADCD ELISA_PT_IgG 0.149 -0.251 0.539 0.446 0.637
22 PRN_IgG3 ELISA_PRN_IgG 0.100 -0.229 0.413 0.500 0.682
23 FHA_ADCD ELISA_FHA_IgG 0.070 -0.190 0.327 0.582 0.697
24 PRN_ADCP ELISA_PRN_IgG -0.028 -0.131 0.082 0.592 0.697
25 PRN_IgG4 ELISA_PRN_IgG 0.060 -0.182 0.297 0.600 0.697
26 FHA_IgG3 ELISA_FHA_IgG 0.085 -0.234 0.383 0.604 0.697
27 PT_FcgR3b ELISA_PT_IgG -0.054 -0.346 0.245 0.724 0.804
28 PT_ADCP ELISA_PT_IgG -0.021 -0.150 0.101 0.754 0.808
29 PT_FcgR2a ELISA_PT_IgG -0.040 -0.372 0.281 0.824 0.852
30 FHA_IgG1 ELISA_FHA_IgG 0.015 -0.295 0.324 0.896 0.896
outcome mediator meffect mlower mupper mpvalue mfdr
1 PT_IgG3 ELISA_PT_IgG -0.034 -0.127 0.018 0.278 0.966
2 PT_ADCD ELISA_PT_IgG 0.041 -0.034 0.166 0.366 0.966
3 FHA_IgG1 ELISA_FHA_IgG -0.030 -0.143 0.038 0.464 0.966
4 PT_IgG ELISA_PT_IgG 0.022 -0.028 0.101 0.480 0.966
5 FHA_IgG2 ELISA_FHA_IgG -0.032 -0.139 0.053 0.482 0.966
6 PT_IgG1 ELISA_PT_IgG 0.026 -0.054 0.141 0.538 0.966
7 PT_FcgR2a ELISA_PT_IgG 0.021 -0.039 0.119 0.542 0.966
8 FHA_IgG ELISA_FHA_IgG -0.012 -0.064 0.024 0.546 0.966
9 PRN_ADNP ELISA_PRN_IgG -0.004 -0.022 0.008 0.594 0.966
10 FHA_ADNP ELISA_FHA_IgG -0.005 -0.035 0.013 0.624 0.966
11 FHA_ADCP ELISA_FHA_IgG -0.005 -0.028 0.012 0.626 0.966
12 PRN_IgG ELISA_PRN_IgG 0.008 -0.040 0.064 0.702 0.966
13 FHA_ADCD ELISA_FHA_IgG -0.010 -0.072 0.033 0.702 0.966
14 FHA_IgG3 ELISA_FHA_IgG -0.010 -0.086 0.042 0.704 0.966
15 PRN_FcgR3b ELISA_PRN_IgG 0.019 -0.079 0.147 0.708 0.966
16 PRN_ADCP ELISA_PRN_IgG 0.003 -0.014 0.027 0.708 0.966
17 FHA_IgG4 ELISA_FHA_IgG -0.013 -0.093 0.050 0.720 0.966
18 FHA_FcgR3b ELISA_FHA_IgG 0.010 -0.058 0.092 0.722 0.966
19 PT_FcgR3b ELISA_PT_IgG 0.011 -0.044 0.091 0.726 0.966
20 PRN_IgG1 ELISA_PRN_IgG 0.014 -0.056 0.123 0.732 0.966
21 PRN_ADCD ELISA_PRN_IgG -0.007 -0.056 0.034 0.736 0.966
22 PT_IgG2 ELISA_PT_IgG -0.005 -0.037 0.020 0.780 0.966
23 PRN_IgG4 ELISA_PRN_IgG 0.005 -0.029 0.051 0.782 0.966
24 FHA_FcgR2a ELISA_FHA_IgG 0.003 -0.037 0.045 0.878 0.966
25 PRN_IgG3 ELISA_PRN_IgG -0.005 -0.083 0.050 0.892 0.966
26 PT_ADNP ELISA_PT_IgG -0.003 -0.049 0.035 0.912 0.966
27 PT_ADCP ELISA_PT_IgG 0.001 -0.025 0.031 0.942 0.966
28 PT_IgG4 ELISA_PT_IgG 0.001 -0.020 0.022 0.948 0.966
29 PRN_IgG2 ELISA_PRN_IgG 0.000 -0.045 0.047 0.954 0.966
30 PRN_FcgR2a ELISA_PRN_IgG 0.000 -0.058 0.050 0.966 0.966
outcome mediator teffect tlower tupper tpvalue tfdr
1 PT_IgG ELISA_PT_IgG -0.449 -0.717 -0.182 0.000 0.000
2 FHA_ADCP ELISA_FHA_IgG -0.127 -0.220 -0.034 0.002 0.030
3 FHA_IgG2 ELISA_FHA_IgG -0.305 -0.559 -0.046 0.018 0.150
4 FHA_IgG ELISA_FHA_IgG -0.254 -0.450 -0.040 0.020 0.150
5 PT_IgG1 ELISA_PT_IgG -0.437 -0.840 -0.031 0.034 0.204
6 FHA_IgG4 ELISA_FHA_IgG -0.367 -0.724 -0.010 0.046 0.230
7 PRN_FcgR2a ELISA_PRN_IgG 0.299 -0.012 0.618 0.060 0.257
8 PT_IgG3 ELISA_PT_IgG 0.190 -0.056 0.433 0.130 0.420
9 PRN_FcgR3b ELISA_PRN_IgG 0.436 -0.116 1.030 0.136 0.420
10 FHA_FcgR2a ELISA_FHA_IgG 0.166 -0.061 0.397 0.154 0.420
11 PT_IgG2 ELISA_PT_IgG -0.087 -0.211 0.036 0.158 0.420
12 FHA_ADNP ELISA_FHA_IgG 0.074 -0.025 0.179 0.168 0.420
13 PT_ADNP ELISA_PT_IgG 0.109 -0.063 0.294 0.208 0.431
14 PRN_ADCD ELISA_PRN_IgG 0.149 -0.095 0.385 0.226 0.431
15 FHA_FcgR3b ELISA_FHA_IgG 0.236 -0.183 0.644 0.230 0.431
16 PRN_IgG2 ELISA_PRN_IgG 0.158 -0.095 0.406 0.230 0.431
17 PT_IgG4 ELISA_PT_IgG -0.054 -0.154 0.047 0.274 0.484
18 PRN_IgG1 ELISA_PRN_IgG 0.233 -0.219 0.709 0.308 0.513
19 PT_ADCD ELISA_PT_IgG 0.190 -0.203 0.600 0.332 0.524
20 PRN_IgG ELISA_PRN_IgG -0.124 -0.399 0.146 0.358 0.537
21 PRN_ADNP ELISA_PRN_IgG 0.028 -0.036 0.098 0.420 0.600
22 PRN_IgG3 ELISA_PRN_IgG 0.094 -0.233 0.407 0.520 0.709
23 PRN_IgG4 ELISA_PRN_IgG 0.065 -0.177 0.309 0.594 0.775
24 PRN_ADCP ELISA_PRN_IgG -0.025 -0.129 0.081 0.640 0.775
25 FHA_ADCD ELISA_FHA_IgG 0.060 -0.201 0.332 0.666 0.775
26 FHA_IgG3 ELISA_FHA_IgG 0.075 -0.238 0.380 0.672 0.775
27 PT_ADCP ELISA_PT_IgG -0.020 -0.151 0.102 0.746 0.829
28 PT_FcgR3b ELISA_PT_IgG -0.042 -0.330 0.251 0.780 0.836
29 FHA_IgG1 ELISA_FHA_IgG -0.015 -0.334 0.301 0.924 0.934
30 PT_FcgR2a ELISA_PT_IgG -0.018 -0.344 0.291 0.934 0.934
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