This repository contains the scripts used to analyzed the data reported in the paper:
Influenza Vaccination and COVID-19 Mortality in USA
Claudio Zanettini*, Mohamed Omar*, Wikum Dinalankara, Eddie Luidy Imada, Elizabeth Colantuoni, Giovanni Parmigiani, and Luigi Marchionni.
Analyses are performed using 4 set of variables :
knowledge-based
: based on medical knowledgeset15
: refered in the code asselected
set40
: refered in the code asoriginal
agnostic
: selection based on variable importane estimated in random forest.set12
: refered in the code asrf_parsimonius
set38
: refered in the code asrf_inclus
Contains the scripts for retrieving, pre-processing and analyzing the data.
-
code/script/libraries_functions
: loads the libraries (includingcovid19census
). -
code/script/functions_analysis
: contains functions used to pre-process, analyze and summarize data. Functions are documented. -
code/scripts/us_preprocess
: this is used to retrieve and pre-process U.S data. Execution of this script returns the dataframe used for the analyses (dat_selected
). A static copy of the dataframe is indata/all_raw.RDS
. -
code/strata_**set**.R
: used to perform stratified analyses. -
code/secondary_**set**.R
: includes the analyses in which propesity score is divided in quintiles or tertiles and added to the linear model as a factor or left as a continous variable. -
code/extra_analyses.R
: 5-times 10-fold-cross validation resampling to identify most parsimonious model.
The file analyses.R
executes all the scripts in code/scripts
and
print results tables.
The file data/all_raw.RDS
contains a static copy of the data used for
the analysis.
Details regarding the data sources as well as functions to extract updated COVID-19 data and aggregate them with other socio-economic and health related metrics can be found in the covid19census R package. Please refer to the package README or documentation for more information regarding the variables. The scripts used to import static data are reported in the package repository here.
** Note: use package renv
and renv.lock
file in parent folder to
install the same versions of packages that we used.**