From c6f2e29971e0ce815e48692f487132ec0f03b07e Mon Sep 17 00:00:00 2001 From: Andrew Mertens Date: Thu, 3 Jun 2021 15:21:31 -0700 Subject: [PATCH] update file paths --- 0-config.R | 175 ++++++++++++++++++++++++++++++++ 01-quality-assurance.Rmd | 6 +- 02-severe-stunting.Rmd | 5 +- 03-secular-trends.Rmd | 3 +- 04-age-at-first-measurement.Rmd | 9 +- 05-DHS-ki-countries.Rmd | 2 + 06-cohort-specific.Rmd | 32 +++--- 07-excluding-PROBIT.Rmd | 13 +-- 08-monthly-cohorts.Rmd | 17 ++-- 09-fixed-effects.Rmd | 17 ++-- ki-longitudinal-manuscripts | 1 - 11 files changed, 232 insertions(+), 48 deletions(-) create mode 100644 0-config.R delete mode 160000 ki-longitudinal-manuscripts diff --git a/0-config.R b/0-config.R new file mode 100644 index 0000000..b3c74c3 --- /dev/null +++ b/0-config.R @@ -0,0 +1,175 @@ +#------------------------------------- +# ki longitudinal analysis manuscripts + +# configure data directories +# source base functions +# load libraries +#------------------------------------- +kiPath <- c("/data/KI/R/x86_64-pc-linux-gnu-library/4.0/" , .libPaths()) +.libPaths(kiPath) + +library(tidyverse) +library(here) +library(ggplot2) +library(ggpubr) +#library(dplyr) +library(gridExtra) +library(reshape2) +library(metafor) +library(data.table) +library(viridis) +library(ggthemes) +library(maps) +library(FField) +library(ggridges) +library(ggridges) +library(RColorBrewer) +library(gridExtra) +library(assertthat) +# library(haven) +library(tidyselect) +# options(repos = c(CRAN = "http://cran.rstudio.com/", +# deltarho = "http://packages.deltarho.org")) +library(stringr) +library(mgcv) +library(grid) +library(lazyeval) +library(rlang) +library(scales) +library(xtable) + + +# for parallel computing +# (will need to configure in each script) +library(foreach) +library(doParallel) +library(survey) +# install.packages("bit64") +library(bit64) +library(zoo) + + + +# Define directories +# results that can be pushed to github: +#res_dir = here::here("results/") +res_dir = "data/KI/ki-manuscript-output/results/" + + +# results that cannot be pushed to github: +res_bluevelvet_dir = "/data/KI/UCB-SuperLearner/ki-results/" + +#dhs_res_dir = here::here("results", "dhs") +dhs_res_dir = "/data/KI/ki-manuscript-output/results/dhs/" + +#data_dir = here::here("data") +data_dir = "/data/KI/ki-manuscript-output/data/" +res_dir = "/data/KI/ki-manuscript-output/results/" + +metadata_dir = "U:/results/Metadata/" + + +#ghapdata_dir = "/home/andrew.mertens/data/KI/UCB-SuperLearner/Manuscript analysis data/" +ghapdata_dir = "/data/KI/UCB-SuperLearner/Manuscript analysis data/" + +#Bluevelvet directory +BV_dir = "/data/KI/ki-manuscript-output/" + + +project_functions_dir = here::here("0-project-functions") +data_cleaning_dir = here::here("1-data-cleaning") +descriptive_outcomes_dir = here::here("2-descriptive-outcomes") +prep_tmle_analysis_dir = here::here("3-prep-tmle-analysis") +longbow_tmle_analysis_dir = here::here("4-longbow-tmle-analysis") +visualizations_dir = here::here("5-visualizations") +shiny_app_dir = here::here("6-shiny-app") +cc_shiny_app_dir = here::here("7-cc-shiny-app") + +#Set cohort data file path +cohortdata_dir = paste0(ghapdata_dir, "cleaned individual study datasets/") +deriveddata_dir = paste0(ghapdata_dir, "covariate creation intermediate datasets/derived covariate datasets/") + +# note: figures must be saved in same directory +# as shiny app in order to publish it +# fig_dir = paste0(here::here(),"/figures/") +# figdata_dir_stunting = paste0(here::here(),"/figures/stunting/figure-data/") +# figdata_dir_wasting = paste0(here::here(),"/figures/wasting/figure-data/") +BV_dir = "/data/KI/ki-manuscript-output" +fig_dir = "/data/KI/ki-manuscript-output/figures/" +figdata_dir_stunting = paste0(fig_dir,"stunting/figure-data/") +figdata_dir_wasting = paste0(fig_dir,"wasting/figure-data/") + + +################################# +# Data Cleaning Scripts +included_studies_path = paste0(ghapdata_dir, "FINAL_only_included_studies.rds") +temp_clean_covariates_path = paste0(ghapdata_dir, "FINAL_temp_clean_covariates.rds") +clean_covariates_path = paste0(ghapdata_dir,"FINAL_clean_covariates.rds") +ki_manuscript_dataset_path = paste0(ghapdata_dir,"ki-manuscript-dataset.rds") +mortality_path = paste0(ghapdata_dir,"mortality.rds") +mortality_age_path = paste0(ghapdata_dir,"mortality_age.rds") +rf_stunting_data_path = paste0(ghapdata_dir, "rf_stunting_data.rds") +rf_wasting_data_path = paste0(ghapdata_dir, "rf_wasting_data.rds") +rf_underweight_path = paste0(ghapdata_dir, "rf_underweight_data.rds") +rf_co_occurrence_path = paste0(ghapdata_dir, "rf_co_occurrence_data.rds") +stunting_data_path = paste0(ghapdata_dir, "stunting_data.rds") +wasting_data_path = paste0(ghapdata_dir, "wasting_data.rds") +underweight_data_path = paste0(ghapdata_dir, "underweight_data.rds") +co_occurrence_data_path = paste0(ghapdata_dir, "co_occurrence_data.rds") +clean_DHS_haz_path = paste0(dhs_res_dir, "clean-DHS-haz.rds") +clean_DHS_waz_path = paste0(dhs_res_dir, "clean-DHS-waz.rds") +clean_DHS_whz_path = paste0(dhs_res_dir, "clean-DHS-whz.rds") +dhs_quantiles_path = paste0(dhs_res_dir, "/dhs_quantiles.rds") +seasonality_data_path = paste0(ghapdata_dir,"seasonality_data.rds") +HBDGki_CONSORT_inclusion_Ns_path = paste0(res_dir, "HBGDki_CONSORT_inclusion_Ns.rds") +metadata_GHAP_metadata_wasting_path = paste0(metadata_dir, "GHAP_metadata_wasting.RDS") +results_GHAP_metadata_wasting_path = paste0(res_dir, "GHAP_metadata_wasting.RDS") +metadata_GHAP_metadata_stunting_path = paste0(metadata_dir, "GHAP_metadata_stunting.RDS") +results_GHAP_metadata_stunting_path = paste0(res_dir, "GHAP_metadata_stunting.RDS") +metadata_GHAP_metadata_stunting_xlsx_path = paste0(metadata_dir, "GHAP_metadata_stunting.xlsx") +icc_res_path = paste0(res_dir,"icc_res.rds") +test_data_path = "C:/Users/andre/Documents/HBGDki/ki-longitudinal-manuscripts/data/simulated test data/testdata.rds" +asset_PCA_allstudies_path = paste0(project_functions_dir, "1_assetPCA-allstudies.R") + +filenames = paste0(here::here(), "/ki-filenames.csv") + +################################## + + + +#list of monthy and monthly+quarterly cohorts +monthly_cohorts <- c("CMC-V-BCS-2002", "CMIN Peru95", "CMIN Peru89", + "CMIN Bangladesh93","CONTENT", "EE", + "GMS-Nepal", "Guatemala BSC", "IRC", + "Keneba", "MAL-ED", "PROVIDE" , "ResPak", + "TanzaniaChild2", "TDC") + + +monthly_and_quarterly_cohorts <- c("CMC-V-BCS-2002", "CMIN Peru95", "CMIN Brazil89", + "CMIN GB94", "CMIN Peru89", "CMIN Bangladesh93", + "CONTENT", "EE", "GMS-Nepal", + "Guatemala BSC", "IRC", + "JiVitA-3", "JiVitA-4", "Keneba", + "LCNI-5", "MAL-ED", "PROBIT", + "ResPak", "SAS-CompFeed", "SAS-FoodSuppl", + "TanzaniaChild2", "ZVITAMBO", "TDC", "NIH-Birth", + "NIH-Crypto", "PROVIDE" ) + +monthly_and_quarterly_cohorts_cc <- c("CMC-V-BCS-2002", "CMIN Peru95", "CMIN Brazil89", + "CMIN GB94", "CMIN Peru89", "CMIN Bangladesh93", + "CONTENT", "EE", "GMS-Nepal", + "Guatemala BSC", "iLiNS-Zinc", "IRC", + "JiVitA-3", "JiVitA-4", "Keneba", + "LCNI-5", "MAL-ED", "PROBIT", + "ResPak", "SAS-CompFeed", "SAS-FoodSuppl", + "TanzaniaChild2", "ZVITAMBO", "TDC", "NIH-Birth", + "NIH-Crypto", "PROVIDE" ) + +ki_countries <- c( "India", "Peru", "Brazil", "Guinea-Bissau","Bangladesh", "Pakistan", + "Nepal", "Guatemala", "Burkina Faso", "Gambia", "Malawi", "South Africa", + "Tanzania", "Belarus", "Zimbabwe" ) + + + + + diff --git a/01-quality-assurance.Rmd b/01-quality-assurance.Rmd index 31d2136..816d83a 100644 --- a/01-quality-assurance.Rmd +++ b/01-quality-assurance.Rmd @@ -16,17 +16,17 @@ To check for outliers in length measurements, we plotted the distribution of raw library(knitr) knitr::opts_chunk$set(echo = TRUE) # setwd("../../") -# source("0-config.R") +source(paste0(here::here(), "/0-config.R")) ``` ```{r qa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/shared/laz_QA.png")) +include_graphics(paste0(fig_dir, "/shared/laz_QA.png")) #include_graphics("figure-copies/laz_QA.png") ``` ```{r qa-cohort, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/shared/laz_QA_cohort.png")) +include_graphics(paste0(fig_dir, "/shared/laz_QA_cohort.png")) #include_graphics("figure-copies/laz_QA_cohort.png") ``` diff --git a/02-severe-stunting.Rmd b/02-severe-stunting.Rmd index c64e3a5..7cb3bc0 100644 --- a/02-severe-stunting.Rmd +++ b/02-severe-stunting.Rmd @@ -15,18 +15,19 @@ Below, we display plots for the age-specific prevalence and cumulative incidence ```{r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) +source(paste0(here::here(), "/0-config.R")) ``` ## Age-specific severe stunting prevalence ```{r prev, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-3-prev-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-3-prev-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-3-prev-overall_region--allage-primary.png") ``` ## Age-specific severe stunting incidence ```{r inc, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-3-inc-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-3-inc-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-3-inc-overall_region--allage-primary.png") ``` diff --git a/03-secular-trends.Rmd b/03-secular-trends.Rmd index 9188e74..c5f6830 100644 --- a/03-secular-trends.Rmd +++ b/03-secular-trends.Rmd @@ -15,12 +15,13 @@ This study included cohorts that measured child growth from 1969 to 2014. To ass ```{r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) +source(paste0(here::here(), "/0-config.R")) ``` ```{r prev-re, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/shared/laz_secular_trend.png")) +include_graphics(paste0(fig_dir, "/shared/laz_secular_trend.png")) #include_graphics("figure-copies/laz_secular_trend.png") ``` diff --git a/04-age-at-first-measurement.Rmd b/04-age-at-first-measurement.Rmd index 38dfd21..df2b6bf 100644 --- a/04-age-at-first-measurement.Rmd +++ b/04-age-at-first-measurement.Rmd @@ -15,19 +15,20 @@ Our analyses of stunting incidence assumed that children whose first measurement ```{r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) +source(paste0(here::here(), "/0-config.R")) ``` ## Histogram of first measurement within age 0-30 days ### All cohorts ```{r age-first, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/shared/age_histogram_first_month.png")) +include_graphics(paste0(fig_dir, "/shared/age_histogram_first_month.png")) #include_graphics("figure-copies/age_histogram_first_month.png") ``` ### Cohort-stratified ```{r age-first-cohort, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/shared/age_histogram_first_month_cohort.png")) +include_graphics(paste0(fig_dir, "/shared/age_histogram_first_month_cohort.png")) #include_graphics("figure-copies/age_histogram_first_month_cohort.png") ``` @@ -37,13 +38,13 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/shar ### All cohorts ```{r age-enr, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/shared/enrollment_age_histogram_over_7d.png")) +include_graphics(paste0(fig_dir, "/shared/enrollment_age_histogram_over_7d.png")) #include_graphics("figure-copies/enrollment_age_histogram_over_7d.png") ``` ### Cohort-stratified ```{r age-enr-cohort, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/shared/enrollment_age_histogram_over_7d_cohort.png")) +include_graphics(paste0(fig_dir, "/shared/enrollment_age_histogram_over_7d_cohort.png")) #include_graphics("figure-copies/enrollment_age_histogram_over_7d_cohort.png") ``` diff --git a/05-DHS-ki-countries.Rmd b/05-DHS-ki-countries.Rmd index dadf221..d8691b1 100644 --- a/05-DHS-ki-countries.Rmd +++ b/05-DHS-ki-countries.Rmd @@ -16,6 +16,8 @@ In the manuscript, we compared the mean length-for-age Z-score by age and region ```{r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) +source(paste0(here::here(), "/0-config.R")) + ``` diff --git a/06-cohort-specific.Rmd b/06-cohort-specific.Rmd index 9e287f8..5dcac67 100644 --- a/06-cohort-specific.Rmd +++ b/06-cohort-specific.Rmd @@ -8,6 +8,8 @@ Here, we present cohort-specific estimates of length-for-age Z-score by age, age ```{r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) +source(paste0(here::here(), "/0-config.R")) + ``` @@ -15,19 +17,19 @@ knitr::opts_chunk$set(echo = TRUE) ### Africa ```{r laz-africa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-quant-cohort-africa-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-quant-cohort-africa-allage-primary.png")) #include_graphics("figure-copies/fig-laz-2-quant-cohort-africa-allage-primary.png") ``` ### Latin America ```{r laz-la, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-quant-cohort-latamer-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-quant-cohort-latamer-allage-primary.png")) #include_graphics("figure-copies/fig-laz-2-quant-cohort-latamer-allage-primary.png") ``` ### South Asia ```{r laz-sa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-quant-cohort-asia-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-quant-cohort-asia-allage-primary.png")) #include_graphics("figure-copies/fig-laz-2-quant-cohort-asia-allage-primary.png") ``` @@ -37,19 +39,19 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Africa ```{r prev-africa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-cohort-africa-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-cohort-africa-allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-prev-cohort-africa-allage-primary.png") ``` ### Latin America ```{r prev-la, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-cohort-latamer-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-cohort-latamer-allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-prev-cohort-latamer-allage-primary.png") ``` ### South Asia ```{r prev-sa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-cohort-asia-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-cohort-asia-allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-prev-cohort-asia-allage-primary.png") ``` @@ -59,19 +61,19 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Africa ```{r inc-africa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-cohort-africa-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-cohort-africa-allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-inc-cohort-africa-allage-primary.png") ``` ### Latin America ```{r inc-la, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-cohort-latamer-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-cohort-latamer-allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-inc-cohort-latamer-allage-primary.png") ``` ### South Asia ```{r inc-sa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-cohort-asia-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-cohort-asia-allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-inc-cohort-asia-allage-primary.png") ``` @@ -81,19 +83,19 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Africa ```{r lvel-africa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-length-2-length_vel-cohort-africa-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-length-2-length_vel-cohort-africa-allage-primary.png")) include_graphics("figure-copies/fig-length-2-length_vel-cohort-africa-allage-primary.png") ``` ### Latin America ```{r lvel-la, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-length-2-length_vel-cohort-latamer-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-length-2-length_vel-cohort-latamer-allage-primary.png")) #include_graphics("figure-copies/fig-length-2-length_vel-cohort-latamer-allage-primary.png") ``` ### South Asia ```{r lvel-sa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-length-2-length_vel-cohort-asia-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-length-2-length_vel-cohort-asia-allage-primary.png")) #include_graphics("figure-copies/fig-length-2-length_vel-cohort-asia-allage-primary.png") ``` @@ -103,19 +105,19 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Africa ```{r lazvel-africa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-laz_vel-cohort-africa-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-laz_vel-cohort-africa-allage-primary.png")) #include_graphics("figure-copies/fig-laz-2-laz_vel-cohort-africa-allage-primary.png") ``` ### Latin America ```{r lazvel-la, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-laz_vel-cohort-latamer-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-laz_vel-cohort-latamer-allage-primary.png")) #include_graphics("figure-copies/fig-laz-2-laz_vel-cohort-latamer-allage-primary.png") ``` ### South Asia ```{r lazvel-sa, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-laz_vel-cohort-asia-allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-laz_vel-cohort-asia-allage-primary.png")) #include_graphics("figure-copies/fig-laz-2-laz_vel-cohort-asia-allage-primary.png") ``` diff --git a/07-excluding-PROBIT.Rmd b/07-excluding-PROBIT.Rmd index 41972ee..e4df4f7 100644 --- a/07-excluding-PROBIT.Rmd +++ b/07-excluding-PROBIT.Rmd @@ -15,6 +15,7 @@ Only one cohort from Europe met the inclusion criteria for this study -- the PRO ```{r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) +source(paste0(here::here(), "/0-config.R")) ``` @@ -22,13 +23,13 @@ knitr::opts_chunk$set(echo = TRUE) ### Including PROBIT ```{r mean, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-mean-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-mean-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-laz-2-mean-overall_region--allage-primary.png") ``` ### Excluding PROBIT ```{r mean-np, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-mean-overall_region--allage-primary_no_probit.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-mean-overall_region--allage-primary_no_probit.png")) #include_graphics("figure-copies/fig-laz-2-mean-overall_region--allage-primary_no_probit.png") ``` @@ -38,13 +39,13 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Including PROBIT ```{r prev, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-prev-overall_region--allage-primary.png") ``` ### Excluding PROBIT ```{r prev-np, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-overall_region--allage-primary_no_probit.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-overall_region--allage-primary_no_probit.png")) #include_graphics("figure-copies/fig-stunt-2-prev-overall_region--allage-primary_no_probit.png") ``` @@ -53,13 +54,13 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Including PROBIT ```{r inc, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-inc-overall_region--allage-primary.png") ``` ### Excluding PROBIT ```{r inc-np, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-inc-overall_region--allage-primary_no_probit.png") ``` diff --git a/08-monthly-cohorts.Rmd b/08-monthly-cohorts.Rmd index 33fa3f6..8af8d57 100644 --- a/08-monthly-cohorts.Rmd +++ b/08-monthly-cohorts.Rmd @@ -17,6 +17,7 @@ In this sensitivity analysis, the mean length-for-age Z-score was higher in Lati ```{r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) +source(paste0(here::here(), "/0-config.R")) ``` @@ -24,13 +25,13 @@ knitr::opts_chunk$set(echo = TRUE) ### All eligible cohorts ```{r mean, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-mean-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-mean-overall_region--allage-primary.png")) ``` ### Cohorts that measured monthly from birth to 24 months ```{r monthly-mean, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-laz-2-mean-overall_region--allage-month24.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-laz-2-mean-overall_region--allage-month24.png")) #include_graphics("figure-copies/fig-laz-2-mean-overall_region--allage-month24.png") ``` @@ -40,14 +41,14 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### All eligible cohorts ```{r prev, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-prev-overall_region--allage-primary.png") ``` ### Cohorts that measured monthly from birth to 24 months ```{r monthly-prev, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-overall_region--allage-month24.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-overall_region--allage-month24.png")) #include_graphics("figure-copies/fig-stunt-2-prev-overall_region--allage-month24.png") ``` @@ -57,14 +58,14 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### All eligible cohorts ```{r inc, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-inc-overall_region--allage-primary.png") ``` ### Cohorts that measured monthly from birth to 24 months ```{r monthly-inc, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-overall_region--allage-month24.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-overall_region--allage-month24.png")) #include_graphics("figure-copies/fig-stunt-2-inc-overall_region--allage-month24.png") ``` @@ -74,14 +75,14 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### All eligible cohorts ```{r vel, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-vel-overall--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-vel-overall--allage-primary.png")) include_graphics("figure-copies/fig-stunt-2-vel-overall--allage-primary.png") ``` ### Cohorts that measured monthly from birth to 24 months ```{r vel-inc, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-vel-overall--allage-month24.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-vel-overall--allage-month24.png")) #include_graphics("figure-copies/fig-stunt-2-vel-overall--allage-month24.png") ``` diff --git a/09-fixed-effects.Rmd b/09-fixed-effects.Rmd index 39f8442..fd8f533 100644 --- a/09-fixed-effects.Rmd +++ b/09-fixed-effects.Rmd @@ -5,6 +5,7 @@ The primary analyses presented in this manuscript pooled across individual studi ```{r setup, include=FALSE} library(knitr) knitr::opts_chunk$set(echo = TRUE) +source(paste0(here::here(), "/0-config.R")) ``` @@ -12,14 +13,14 @@ knitr::opts_chunk$set(echo = TRUE) ### Random effects ```{r prev-re, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-prev-overall_region--allage-primary.png") ``` ### Fixed effects ```{r prev-fe, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-prev-overall_region--allage-fe.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-prev-overall_region--allage-fe.png")) #include_graphics("figure-copies/fig-stunt-2-prev-overall_region--allage-fe.png") ``` @@ -30,13 +31,13 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Random effects ```{r inc-re, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-overall_region--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-overall_region--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-inc-overall_region--allage-primary.png") ``` ### Fixed effects ```{r inc-fe, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-inc-overall_region--allage-fe.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-inc-overall_region--allage-fe.png")) #include_graphics("figure-copies/fig-stunt-2-inc-overall_region--allage-fe.png") ``` @@ -48,13 +49,13 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Random effects ```{r bar-re, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-flow-overall--allage-re.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-flow-overall--allage-re.png")) #include_graphics("figure-copies/fig-stunt-2-flow-overall--allage-re.png") ``` ### Fixed effects ```{r bar-fe, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-flow-overall--allage-fe.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-flow-overall--allage-fe.png")) #include_graphics("figure-copies/fig-stunt-2-flow-overall--allage-fe.png") ``` @@ -66,13 +67,13 @@ include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stun ### Random effects ```{r vel-re, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-vel-overall--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-vel-overall--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-vel-overall--allage-primary.png") ``` ### Fixed effects ```{r vel-fe, echo = FALSE} -include_graphics(paste0(here::here(), "/ki-longitudinal-manuscripts/figures/stunting/fig-stunt-2-vel-overall--allage-primary.png")) +include_graphics(paste0(fig_dir, "/stunting/fig-stunt-2-vel-overall--allage-primary.png")) #include_graphics("figure-copies/fig-stunt-2-vel-overall--allage-fe.png") ``` diff --git a/ki-longitudinal-manuscripts b/ki-longitudinal-manuscripts deleted file mode 160000 index 60286a9..0000000 --- a/ki-longitudinal-manuscripts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 60286a98c4ba4bf3eaf5073c28c49970d43adfe2