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:
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.
The common data shell are presented in the protocol
Demographic table
```r
demo ```
For incidence estimation and time-varing cox regression.
```r dt_desc <- run_desc(demo, dx, rx, ip, region = "hk", codes_sys = "icd9")
dt_desc$std_inci
dt_desc$dt_raw ```
HK results: Testing dataset:
There are several results in the
r
dt_desc
Desc results:
r
p_inci(dt_desc,region="test")
HK results:
r
p_inci_sex(dt_desc)
HK results:
r
p_inci_type(dt_desc,region="test")
HK results:
r
dt_desc$cox_est
HK results:
Generate table one descriptive statistics
r
dt_desc$tableone
HK results:
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:
There are several results in the sccs
r
sccs_res
SCCS results:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.