Skip to content

Cainefm/MND

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Epidemiology study of Motor neuron disease with the collaboration in the Neurogen

Updated time: 2022-2-9

  • Sensitivity and subgroup analysis for SCCS were added.
  • AFT model for survival were added.

Updated time: 2022-8-9

  • Add trycatch for sccs since some small dataset cannot conduct sccs.

History: 2022-1-13

Study Status: Started

  • 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: -

Requirements

  • 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

How to Run

  1. Install R and/or Rstudio.

  2. Install RTools

  3. Copy the mnd_codes.xlsx file into the local drive and input your regional values, eg. population.

    image

  4. 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. 
  5. 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

  6. For incidence estimation and time-varing cox regression.

    Standardized incidence

    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:

    Time-varing Cox regression

    dt_desc$cox_est


    HK results:

    Testing dataset:

  7. Generate table one descriptive statistics

    dt_desc$tableone


    HK results:

    Testing dataset:

  8. For sccs estimation:

    sccs_res <- run_sccs(demo, dx, rx, ipriluzole_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

About

The R package for MND study

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages