README.md

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

Updated time: 2022-2-9

Updated time: 2022-8-9

History: 2022-1-13

Study Status: Started

Requirements

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

    ```r

    A sub population in HK for testing are attached in the package

    demo ```

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

    Standardized incidence

    ```r 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 r 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

    r p_inci(dt_desc,region="test")

    HK results: Testing dataset:

    r p_inci_sex(dt_desc)

    HK results: Testing dataset:

    r p_inci_type(dt_desc,region="test")

    HK results: Testing dataset:

    Time-varing Cox regression

    r dt_desc$cox_est

    HK results: Testing dataset:

  7. Generate table one descriptive statistics r dt_desc$tableone

    HK results: Testing dataset:

  8. For sccs estimation: r 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 r 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


Cainefm/MND documentation built on Aug. 13, 2022, 3:33 p.m.