- Sensitivity and subgroup analysis for SCCS were added.
- AFT model for survival were added.
- Add trycatch for sccs since some small dataset cannot conduct sccs.
- Study type: Epidemiology study
- Tags: Common data model, MND
- Study sites:
- Hong Kong : Celine Chui, FAN Min, Gao Le, Edmund Cheung
- Tai Wan :Edward Lai, Daniel Tsai
- Korea :Ju-Young Shin, Sungho Bea
- Protocol: v1.2
- Publications: -
- A database in the data shall format provided in protocol
- A xlsx files including all the icd-codes needed. Can be download here: ./data/codes_mnd.xlsx
- R version 4.1.0 or newer with/without Rstudio
- On Windows: RTools
- SCCS version has to be version 1.3. Now there is a potential bug in version 1.4 or above. download
-
Install RTools
-
Copy the mnd_codes.xlsx file into the local drive and input your regional values, eg. population.
-
Create an empty folder or new RStudio project. Then in R, use the following code to install the study package and its dependencies:
install.packages("devtools") # may need to input 1 or 2 if there are any packages needed to update. library("devtools") devtools::install_github("Cainefm/MND",upgrade="never") library("MND") dir_mnd_codes <- "" #pls input your directory of MND_codes.xlsx here.
-
The common data shell are presented in the protocol
Demographic table
Inpatient records Drug records Diagnosis records## A sub population in HK for testing are attached in the package demo
-
For incidence estimation and time-varing cox regression.
dt_desc <- run_desc(demo, dx, rx, ip, region = "hk", codes_sys = "icd9") # the standardized incidence dt_desc$std_inci # the raw data for incidence dt_desc$dt_raw
HK results:
Testing dataset:There are several results in the
dt_desc
Desc results:- dt_raw: the raw database
- dt_cox: the database for cox regression
- tableone: the output of table one
- std_inci: the standardized incidence using WHO as the reference population which used for comparison
- cox_result: the result after cox regression from the R
- aft_result: the result after accelerate failure time model from the R
- cox_est: cleaned results for Cox
- aft_est: cleaned results for AFT
p_inci(dt_desc,region="test")
HK results:
Testing dataset:p_inci_sex(dt_desc)
HK results:
Testing dataset:p_inci_type(dt_desc,region="test")
HK results:
Testing dataset:dt_desc$cox_est
HK results:
Testing dataset: -
Generate table one descriptive statistics
dt_desc$tableone
HK results:
Testing dataset: -
For sccs estimation:
sccs_res <- run_sccs(demo, dx, rx, ip, riluzole_name = "riluzole|riluteck", obst = "2001-08-24", obed = "2018-12-31")
HK results:
Testing dataset:There are several results in the sccs
sccs_res
SCCS results:- dt_raw: the raw database
- primary: the sccs result from the primary analysis
- subgroup_ae: the subgroup analysis of sccs with only the admission from A&E
- subgroup_pneumonia: the subgroup analysis of sccs with only the admission with pneumonia
- subgroup_arf: the subgroup analysis of sccs with only the admission with accute respirtory failure
- collapsed: the collapsed risk period