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
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/doublepca1.Rmd) and HTML
(docs/doublepca1.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 | 42c1edc | Jie Zhou | 2024-04-28 | double pca |
| html | 42c1edc | Jie Zhou | 2024-04-28 | double pca |
Attaching package: 'glue'
The following object is masked from 'package:gdata':
trim
here() starts at C:/Users/Jie Zhou/Desktop/madi-brussels-pertussis-thailand
[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

### load PCA scores
library(tidyr)
load("./code/pca_scores_both_studies.RData")
index=which(pca_store$group %in% c("PT", "FHA", "PRN", "DT","TT")
& pca_store$manuscript=="manuscript1"
& pca_store$visit_name=="vaccinated")
clusterdata=pca_store[index,]
cl1=clusterdata[which(clusterdata$group=="PT"),]
cl2=clusterdata[which(clusterdata$group=="FHA"),]
cl3=clusterdata[which(clusterdata$group=="PRN"),]
cl4=clusterdata[which(clusterdata$group=="DT"),]
cl5=clusterdata[which(clusterdata$group=="TT"),]
outcome mediator deffect dlower dupper dpvalue dfdr
1 PC2 mediator_PC1 -1.233176 -1.766656 -0.6833787 0.000 0.000
2 PC1 mediator_PC1 -0.429711 -1.930764 0.9085197 0.542 0.542
outcome mediator meffect mlower mupper mpvalue mfdr
1 PC1 mediator_PC1 0.06580404 -0.3492525 0.5073998 0.738 0.82
2 PC2 mediator_PC1 0.01643895 -0.1516493 0.2012406 0.820 0.82
outcome mediator teffect tlower tupper tpvalue tfdr
1 PC2 mediator_PC1 -1.216737 -1.727401 -0.6760902 0.000 0.000
2 PC1 mediator_PC1 -0.363907 -1.844909 0.9220514 0.622 0.622
outcome mediator deffect dlower dupper dpvalue dfdr
1 PC2 mediator_PC1 -1.4916652 -2.04151 -0.9485431 0.000 0.000
2 PC1 mediator_PC1 -0.1267367 -1.39019 1.2006727 0.852 0.852
outcome mediator meffect mlower mupper mpvalue mfdr
1 PC1 mediator_PC1 -0.27324332 -0.8113801 0.04961342 0.122 0.244
2 PC2 mediator_PC1 -0.05760569 -0.2733362 0.08983766 0.422 0.422
outcome mediator teffect tlower tupper tpvalue tfdr
1 PC2 mediator_PC1 -1.549271 -2.082730 -0.9973931 0.000 0.000
2 PC1 mediator_PC1 -0.399980 -1.651943 0.9246975 0.538 0.538
outcome mediator deffect dlower dupper dpvalue dfdr
1 PC2 mediator_PC1 -0.5256848 -1.1276136 0.06827008 0.082 0.164
2 PC1 mediator_PC1 0.5228052 -0.7689347 1.69774872 0.406 0.406
outcome mediator meffect mlower mupper mpvalue mfdr
1 PC1 mediator_PC1 0.098761041 -0.2442277 0.5778345 0.540 0.976
2 PC2 mediator_PC1 -0.007082494 -0.2020024 0.1794766 0.976 0.976
outcome mediator teffect tlower tupper tpvalue tfdr
1 PC2 mediator_PC1 -0.5327673 -1.1140390 0.05735478 0.084 0.168
2 PC1 mediator_PC1 0.6215663 -0.6674047 1.80184120 0.312 0.312
outcome mediator deffect dlower dupper dpvalue dfdr
1 PC2 mediator_PC1 -0.8235250 -1.518119 -0.1496231 0.018 0.036
2 PC1 mediator_PC1 -0.5843013 -1.653421 0.5413205 0.278 0.278
outcome mediator meffect mlower mupper mpvalue mfdr
1 PC1 mediator_PC1 0.08227966 -0.1849593 0.5089682 0.584 0.856
2 PC2 mediator_PC1 0.01535072 -0.1844505 0.2159573 0.856 0.856
outcome mediator teffect tlower tupper tpvalue tfdr
1 PC2 mediator_PC1 -0.8081743 -1.474297 -0.1566837 0.006 0.012
2 PC1 mediator_PC1 -0.5020217 -1.564293 0.5762289 0.350 0.350
outcome mediator deffect dlower dupper dpvalue dfdr
1 PC1 mediator_PC1 -1.9123381 -3.0890411 -0.6100956 0.000 0.000
2 PC2 mediator_PC1 -0.1467017 -0.6768701 0.3986450 0.602 0.602
outcome mediator meffect mlower mupper mpvalue mfdr
1 PC2 mediator_PC1 0.09454527 -0.03419026 0.3110007 0.216 0.432
2 PC1 mediator_PC1 0.07418903 -0.23249458 0.4733412 0.636 0.636
outcome mediator teffect tlower tupper tpvalue tfdr
1 PC1 mediator_PC1 -1.8381490 -2.9869724 -0.5779254 0.002 0.004
2 PC2 mediator_PC1 -0.0521564 -0.6040317 0.5217969 0.860 0.860
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