-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path2_prepare_CRC.ado
30 lines (23 loc) · 1 KB
/
2_prepare_CRC.ado
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
*------------------------------------------------------------------------------*
* This script selects patients with colorectum cancer--------------------------*
*------------------------------------------------------------------------------*
*-------------------------------*
*** Install relevant packages ***
*-------------------------------*
* tell Stata to never pause
set more off, perm
* style of decimal poCRC is a comma
set dp comma, perm
capture program drop prepare_CRC
program prepare_CRC
args bool_stage data_path results_data_path disease
capture drop *
*----------------------------*
***** SELECTION CRITERIA *****
*----------------------------*
/* open selected patients */ use "`data_path'\\patient_data.dta", clear
/* keep PCC */ quietly keep if tumsoort==205310 | tumsoort==205320 | ///
tumsoort==205330 | tumsoort==205340
/* compress */ quietly compress
save "`results_data_path'\\`disease'_descriptives_`bool_stage'.dta", replace
end