BY-COVID - WP5 - Baseline Use Case: SARS-CoV-2 vaccine effectiveness assessment

Analytical pipeline

################
### Metadata ###
################

# DATE LAST MODIFIED:
# 20/04/2023

# METADATA: 
if(FALSE) {
  title      <- 'BY-COVID WP5.2 Baseline Use Case: SARS-CoV-2 vaccine effectiveness - analytical pipeline'
  authors     <- list('Marjan Meurisse','Javier González-Galindo','Santiago Royo-Sierra','Francisco Estupiñán-Romero','Nina Van Goethem','Enrique Bernal-Delgado')
  version    <- '1.0.0'
  maintainer <- 'Marjan Meurisse'
  email      <- 'Marjan.Meurisse@sciensano.be'
  input      <- list('csv upload')
  output     <- list('1_DQA.html','2_validation.html','3_imputation.html','4_matching.html','5_descriptive.html','6_survival-analysis.html')
}

################
### Overview ###
################

# This analytical pipeline corresponds to BY-COVID WP5 T5.2 baseline use case on “SARS-CoV-2 Vaccine(s) effectiveness in preventing SARS-CoV-2 infection”

# 0. General settings and loading of data
#      -> Script: 0_global.R
# 1. Data Quality Assessment (DQA)
#      -> Script: 1_DQA.QMD
#      -> Output: 1_DQA.html
# 2. Validation
#      -> Script: 2_validation.QMD
#      -> Output: 2_validation.html
# 3. Imputation of missing values
#      -> Script: 3_imputation.QMD
#      -> Output: 3_imputation.html
# 4. Matching cases to controls (1:1) and assessing covariate balance after matching
#      -> Script: 4_matching.QMD
#      -> Output: 4_matching.html
# 5. Descriptive analysis
#      -> Script: 5_descriptives.R
#      -> Output: 5_descriptive.html
# 6. Survival analysis
#      -> Script: 6_survival-analysis.R
#      -> Output: 6_survival-analysis.html
# 0. General settings and loading of data

source("./0_global.R")
f_load_data(create_db_tables = TRUE,
               load_data = TRUE)
[1] 10000

Data Quality Assessment

# 1. Data Quality Assessment (DQA)

if (file.exists("../output/1_DQA.html")) {
  file.remove("../output/1_DQA.html")
}
tryCatch({
  quarto::quarto_render("./1_DQA.QMD", output_file = "1_DQA.html")
  file.copy(from = "./1_DQA.html",
                to = "../output/1_DQA.html")
  file.remove("./1_DQA.html")
}, error = function(err) {
  print(paste("MY ERROR:  ",err))
  knitr::knit_exit()
})


processing file: 1_DQA.QMD

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
  ordinary text without R code


  |                                                                            
  |.....                                                                 |   6%
label: metadata (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.......                                                               |  10%
  ordinary text without R code


  |                                                                            
  |.........                                                             |  13%
label: unnamed-chunk-1 (with options) 
List of 1
 $ engine: chr "css"


  |                                                                            
  |...........                                                           |  16%
  ordinary text without R code


  |                                                                            
  |..............                                                        |  19%
label: general settings (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |................                                                      |  23%
  ordinary text without R code


  |                                                                            
  |..................                                                    |  26%
label: load data (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |....................                                                  |  29%
  ordinary text without R code


  |                                                                            
  |.......................                                               |  32%
label: introduce (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.........................                                             |  35%
  ordinary text without R code


  |                                                                            
  |...........................                                           |  39%
label: dataset statistics (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.............................                                         |  42%
  ordinary text without R code


  |                                                                            
  |................................                                      |  45%
label: variables (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..................................                                    |  48%
  ordinary text without R code


  |                                                                            
  |....................................                                  |  52%
label: classes (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................................                                |  55%
  ordinary text without R code


  |                                                                            
  |.........................................                             |  58%
label: missing data profile 1 (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...........................................                           |  61%
  ordinary text without R code


  |                                                                            
  |.............................................                         |  65%
label: missing data profile 2 (with options) 
List of 6
 $ results : chr "hide"
 $ fig.show: chr "hide"
 $ echo    : logi FALSE
 $ message : logi FALSE
 $ warning : logi FALSE
 $ error   : logi FALSE


  |                                                                            
  |...............................................                       |  68%
  ordinary text without R code


  |                                                                            
  |..................................................                    |  71%
label: missing data profile 3 (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |....................................................                  |  74%
  ordinary text without R code


  |                                                                            
  |......................................................                |  77%
label: alerts (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |........................................................              |  81%
  ordinary text without R code


  |                                                                            
  |...........................................................           |  84%
label: duplicates (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.............................................................         |  87%
  ordinary text without R code


  |                                                                            
  |...............................................................       |  90%
label: chunk (with options) 
List of 4
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE
 $ eval   : logi FALSE


  |                                                                            
  |.................................................................     |  94%
  ordinary text without R code


  |                                                                            
  |....................................................................  |  97%
label: individual variables (with options) 
List of 4
 $ results: chr "asis"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................................................................| 100%
  ordinary text without R code


output file: 1_DQA.knit.md

pandoc --output 1_DQA.html
  to: html
  standalone: true
  self-contained: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: 'BY-COVID - WP5 - Baseline Use Case: SARS-CoV-2 vaccine effectiveness'
  subtitle: Data Quality Assessment (DQA)
  editor: visual
  always_allow_html: 'yes'
  title-block-banner: '#27445C'
  
Output created: 1_DQA.html
[1] TRUE

Validation

# 2. Validation

if (file.exists("../output/2_validation.html")) {
  file.remove("../output/2_validation.html")
}

tryCatch({
  quarto::quarto_render("./2_validation.QMD",
                      output_file = "2_validation.html")
  file.copy(from = "./2_validation.html",
                 to = "../output/2_validation.html")
  file.remove("./2_validation.html")
}, error = function(err) {
  print(paste("MY ERROR:  ",err))
  quarto::knit_exit()
})


processing file: 2_validation.QMD

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |...                                                                   |   4%
  ordinary text without R code


  |                                                                            
  |......                                                                |   9%
label: metadata (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.........                                                             |  13%
  ordinary text without R code


  |                                                                            
  |............                                                          |  17%
label: unnamed-chunk-1 (with options) 
List of 1
 $ engine: chr "css"


  |                                                                            
  |...............                                                       |  22%
  ordinary text without R code


  |                                                                            
  |..................                                                    |  26%
label: general settings (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.....................                                                 |  30%
  ordinary text without R code


  |                                                                            
  |........................                                              |  35%
label: load data (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...........................                                           |  39%
  ordinary text without R code


  |                                                                            
  |..............................                                        |  43%
label: validation rules (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.................................                                     |  48%
  ordinary text without R code


  |                                                                            
  |.....................................                                 |  52%
label: validation table (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |........................................                              |  57%
  ordinary text without R code


  |                                                                            
  |...........................................                           |  61%
label: validation plot 1 (with options) 
List of 5
 $ results : chr "hide"
 $ fig.show: chr "hide"
 $ message : logi FALSE
 $ warning : logi FALSE
 $ error   : logi FALSE


  |                                                                            
  |..............................................                        |  65%
  ordinary text without R code


  |                                                                            
  |.................................................                     |  70%
label: validation plot 2 (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |....................................................                  |  74%
  ordinary text without R code


  |                                                                            
  |.......................................................               |  78%
label: violating essential rules (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..........................................................            |  83%
  ordinary text without R code


  |                                                                            
  |.............................................................         |  87%
label: save violated (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |................................................................      |  91%
  ordinary text without R code


  |                                                                            
  |...................................................................   |  96%
label: print violating rules (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................................................................| 100%
  ordinary text without R code


output file: 2_validation.knit.md

pandoc --output 2_validation.html
  to: html
  standalone: true
  self-contained: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: 'BY-COVID - WP5 - Baseline Use Case: SARS-CoV-2 vaccine effectiveness assessment'
  subtitle: Validation
  editor: visual
  always_allow_html: 'yes'
  title-block-banner: '#27445C'
  
Output created: 2_validation.html
[1] TRUE

Imputation of missing values

# 3. Imputation of missing values

if (file.exists("../output/3_imputation.html")) {
  file.remove("../output/3_imputation.html")
}

tryCatch({
  quarto::quarto_render("./3_imputation.QMD",
                      output_file = "3_imputation.html")

  file.copy(from = "./3_imputation.html",
               to = "../output/3_imputation.html")
  file.remove("./3_imputation.html")
}, error = function(err) {
  print(paste("MY ERROR:  ",err))
  knitr::knit_exit()
})


processing file: 3_imputation.QMD

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |...                                                                   |   5%
  ordinary text without R code


  |                                                                            
  |.......                                                               |  10%
label: metadata (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..........                                                            |  14%
  ordinary text without R code


  |                                                                            
  |.............                                                         |  19%
label: general settings (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.................                                                     |  24%
  ordinary text without R code


  |                                                                            
  |....................                                                  |  29%
label: load data (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.......................                                               |  33%
  ordinary text without R code


  |                                                                            
  |...........................                                           |  38%
label: variable status 1 (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..............................                                        |  43%
  ordinary text without R code


  |                                                                            
  |.................................                                     |  48%
label: variable status 2 (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.....................................                                 |  52%
  ordinary text without R code


  |                                                                            
  |........................................                              |  57%
label: listwise deletion (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...........................................                           |  62%
  ordinary text without R code


  |                                                                            
  |...............................................                       |  67%
label: imputation (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..................................................                    |  71%
  ordinary text without R code


  |                                                                            
  |.....................................................                 |  76%
label: imputation process print (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.........................................................             |  81%
  ordinary text without R code


  |                                                                            
  |............................................................          |  86%
label: plot imputation (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...............................................................       |  90%
  ordinary text without R code


  |                                                                            
  |...................................................................   |  95%
label: print listwise deletion (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................................................................| 100%
  ordinary text without R code


output file: 3_imputation.knit.md

pandoc --output 3_imputation.html
  to: html
  standalone: true
  self-contained: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: 'BY-COVID - WP5 - Baseline Use Case: SARS-CoV-2 vaccine effectiveness assessment'
  subtitle: Imputation of missing values
  editor: visual
  always_allow_html: 'yes'
  title-block-banner: '#27445C'
  
Output created: 3_imputation.html
[1] TRUE

Matching

# 4. Matching cases to controls (1:1) and assessing covariate balance after matching

if (file.exists("../output/4_matching.html")) {
  file.remove("../output/4_matching.html")
}

tryCatch({
  quarto::quarto_render("./4_matching.QMD",
                      output_file = "4_matching.html")
  file.copy(from = "./4_matching.html",
                 to = "../output/4_matching.html")
  file.remove("./4_matching.html")
}, error = function(err) {
  print(paste("MY ERROR:  ",err))
  knitr::knit_exit()
})


processing file: 4_matching.QMD

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
  ordinary text without R code


  |                                                                            
  |....                                                                  |   6%
label: metadata (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......                                                                |   9%
  ordinary text without R code


  |                                                                            
  |........                                                              |  12%
label: general settings (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...........                                                           |  15%
  ordinary text without R code


  |                                                                            
  |.............                                                         |  18%
label: matching (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...............                                                       |  21%
  ordinary text without R code


  |                                                                            
  |.................                                                     |  24%
label: load data (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...................                                                   |  27%
  ordinary text without R code


  |                                                                            
  |.....................                                                 |  30%
label: matchit prior (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.......................                                               |  33%
  ordinary text without R code


  |                                                                            
  |.........................                                             |  36%
label: matchit after (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |............................                                          |  39%
  ordinary text without R code


  |                                                                            
  |..............................                                        |  42%
label: SMD prior matching (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |................................                                      |  45%
  ordinary text without R code


  |                                                                            
  |..................................                                    |  48%
label: SMD prior matching plot (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |....................................                                  |  52%
  ordinary text without R code


  |                                                                            
  |......................................                                |  55%
label: SMD prior matching plot 2 (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |........................................                              |  58%
  ordinary text without R code


  |                                                                            
  |..........................................                            |  61%
label: SMD after matching (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.............................................                         |  64%
  ordinary text without R code


  |                                                                            
  |...............................................                       |  67%
label: SMD after matching plot (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.................................................                     |  70%
  ordinary text without R code


  |                                                                            
  |...................................................                   |  73%
label: SMD after matching plot 2 (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.....................................................                 |  76%
  ordinary text without R code


  |                                                                            
  |.......................................................               |  79%
label: VR prior matching (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.........................................................             |  82%
  ordinary text without R code


  |                                                                            
  |...........................................................           |  85%
label: VR after matching (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..............................................................        |  88%
  ordinary text without R code


  |                                                                            
  |................................................................      |  91%
label: plot ps before (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..................................................................    |  94%
  ordinary text without R code


  |                                                                            
  |....................................................................  |  97%
label: plot ps after (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................................................................| 100%
  ordinary text without R code


output file: 4_matching.knit.md

Warning messages:
1: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 8 (<-view-localhost:11244)
2: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 7 (<-view-localhost:11244)
3: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 6 (<-view-localhost:11244)
4: In .Internal(gc(verbose, reset, full)) :
  closing unused connection 5 (<-view-localhost:11244)
pandoc --output 4_matching.html
  to: html
  standalone: true
  self-contained: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: 'BY-COVID - WP5 - Baseline Use Case: COVID-19 vaccine effectiveness assessment'
  subtitle: 'Matching cases to controls (1:1) and assessing covariate balance after matching'
  editor: visual
  always_allow_html: 'yes'
  title-block-banner: '#27445C'
  
Output created: 4_matching.html
[1] TRUE

Descriptive analyses

# 5. Descriptive analysis

if (file.exists("../output/5_descriptive.html")) {
  file.remove("../output/5_descriptive.html")
}
tryCatch({
  quarto::quarto_render("./5_descriptives.QMD",
                      output_file = "5_descriptive.html")
  file.copy(from = "./5_descriptive.html",
                 to = "../output/5_descriptive.html")
  file.remove("./5_descriptive.html")
}, error = function(err) {
  print(paste("MY ERROR:  ",err))
  knitr::knit_exit()
})


processing file: 5_descriptives.QMD

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   2%
  ordinary text without R code


  |                                                                            
  |...                                                                   |   5%
label: metadata (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.....                                                                 |   7%
  ordinary text without R code


  |                                                                            
  |.......                                                               |   9%
label: general settings (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |........                                                              |  12%
  ordinary text without R code


  |                                                                            
  |..........                                                            |  14%
label: load data (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...........                                                           |  16%
  ordinary text without R code


  |                                                                            
  |.............                                                         |  19%
label: periods (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...............                                                       |  21%
  ordinary text without R code


  |                                                                            
  |................                                                      |  23%
label: create consort graph (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..................                                                    |  26%
  ordinary text without R code


  |                                                                            
  |....................                                                  |  28%
label: plot consort graph (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.....................                                                 |  30%
  ordinary text without R code


  |                                                                            
  |.......................                                               |  33%
label: table 1 un-matched (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |........................                                              |  35%
  ordinary text without R code


  |                                                                            
  |..........................                                            |  37%
label: table 1 matched (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |............................                                          |  40%
  ordinary text without R code


  |                                                                            
  |.............................                                         |  42%
label: tables (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...............................                                       |  44%
  ordinary text without R code


  |                                                                            
  |.................................                                     |  47%
label: print table un-matched start population (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..................................                                    |  49%
   inline R code fragments


  |                                                                            
  |....................................                                  |  51%
label: print table un-matched eligible population (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.....................................                                 |  53%
   inline R code fragments


  |                                                                            
  |.......................................                               |  56%
label: print table matched population (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.........................................                             |  58%
   inline R code fragments


  |                                                                            
  |..........................................                            |  60%
label: survival in un-matched population (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |............................................                          |  63%
  ordinary text without R code


  |                                                                            
  |..............................................                        |  65%
label: survival not matched and simple model (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...............................................                       |  67%
  ordinary text without R code


  |                                                                            
  |.................................................                     |  70%
label: summary survival not matched and simple model (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..................................................                    |  72%
  ordinary text without R code


  |                                                                            
  |....................................................                  |  74%
label: survival plot not matched and simple model (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................................................                |  77%
  ordinary text without R code


  |                                                                            
  |.......................................................               |  79%
label: cumulative events plot not matched and simple model (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.........................................................             |  81%
  ordinary text without R code


  |                                                                            
  |...........................................................           |  84%
label: survival cumulative events table (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |............................................................          |  86%
  ordinary text without R code


  |                                                                            
  |..............................................................        |  88%
label: survival not matched and complex model (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...............................................................       |  91%
  ordinary text without R code


  |                                                                            
  |.................................................................     |  93%
label: summary survival not matched and complex model (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...................................................................   |  95%
  ordinary text without R code


  |                                                                            
  |....................................................................  |  98%
label: survival plot not matched and complex model (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................................................................| 100%
  ordinary text without R code


output file: 5_descriptives.knit.md

pandoc --output 5_descriptive.html
  to: html
  standalone: true
  self-contained: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: 'BY-COVID - WP5 - Baseline Use Case: COVID-19 vaccine effectiveness assessment'
  subtitle: Descriptive analyses
  editor: visual
  always_allow_html: 'yes'
  title-block-banner: '#27445C'
  
Output created: 5_descriptive.html
[1] TRUE

Survival analysis

# 6. Survival analysis

if (file.exists("../output/6_survival-analysis.html")) {
  file.remove("../output/6_survival-analysis.html")
}
tryCatch({
  quarto::quarto_render("./6_survival-analysis.QMD",
                      output_file = "6_survival-analysis.html")
  file.copy(from = "./6_survival-analysis.html",
                 to = "../output/6_survival-analysis.html")
  file.remove("./6_survival-analysis.html")
}, error = function(err) {
  print(paste("MY ERROR:  ",err))
  knitr::knit_exit()
})


processing file: 6_survival-analysis.QMD

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
  ordinary text without R code


  |                                                                            
  |.....                                                                 |   7%
label: metadata (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.......                                                               |  10%
  ordinary text without R code


  |                                                                            
  |..........                                                            |  14%
label: general settings (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |............                                                          |  17%
  ordinary text without R code


  |                                                                            
  |..............                                                        |  21%
label: load data (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.................                                                     |  24%
  ordinary text without R code


  |                                                                            
  |...................                                                   |  28%
label: survival (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................                                                |  31%
  ordinary text without R code


  |                                                                            
  |........................                                              |  34%
label: survival plot (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...........................                                           |  38%
  ordinary text without R code


  |                                                                            
  |.............................                                         |  41%
label: survival plot cumulative events (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...............................                                       |  45%
  ordinary text without R code


  |                                                                            
  |..................................                                    |  48%
label: x-time survival (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |....................................                                  |  52%
  ordinary text without R code


  |                                                                            
  |.......................................                               |  55%
label: median survival time (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.........................................                             |  59%
  ordinary text without R code


  |                                                                            
  |...........................................                           |  62%
label: coxph HR (with options) 
List of 4
 $ results: chr "hide"
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |..............................................                        |  66%
  ordinary text without R code


  |                                                                            
  |................................................                      |  69%
label: hazard ratio (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |...................................................                   |  72%
  ordinary text without R code


  |                                                                            
  |.....................................................                 |  76%
label: coxph model fit (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |........................................................              |  79%
  ordinary text without R code


  |                                                                            
  |..........................................................            |  83%
label: rmst2 (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |............................................................          |  86%
  ordinary text without R code


  |                                                                            
  |...............................................................       |  90%
label: RMST and RMTL (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |.................................................................     |  93%
  ordinary text without R code


  |                                                                            
  |....................................................................  |  97%
label: average treatment effect (with options) 
List of 3
 $ message: logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE


  |                                                                            
  |......................................................................| 100%
  ordinary text without R code


output file: 6_survival-analysis.knit.md

pandoc --output 6_survival-analysis.html
  to: html
  standalone: true
  self-contained: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: 'BY-COVID - WP5 - Baseline Use Case: COVID-19 vaccine effectiveness assessment'
  subtitle: Survival analysis
  editor: visual
  always_allow_html: 'yes'
  title-block-banner: '#27445C'
  
Output created: 6_survival-analysis.html
[1] TRUE
if (file.exists(auxilary_database_path)) {
  file.remove(auxilary_database_path)
}
[1] TRUE