-
Notifications
You must be signed in to change notification settings - Fork 1
/
Config - Stata.do
86 lines (53 loc) · 2.42 KB
/
Config - Stata.do
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
***********************************
* CPRD Analysis:
* Author: Luke McGuinness (adapted from code written by Venexia Walker)
***********************************
* Define paths -----------------------------------------------------------------
* Edit to your own path!
global path "//ads.bris.ac.uk/folders/Health Sciences/SafeHaven/CPRD Projects UOB/Projects/15_246/CPRD-LRA"
global output "$path/output"
global data "$path/data"
global results "$path/output/files"
***********************************
* LOAD GLOBAL VARIABLES *
***********************************
global dofiles "$path/code/00_extract_and_clean"
* Load code dictionary ---------------------------------------------------------
run "$dofiles/1-code_dictionary.do"
***********************************
* DEFINE COHORT *
***********************************
global dofiles "$path/code/01_cohort_definition"
* Generate cohort --------------------------------------------------------------
run "$dofiles/1-create_cohort.do"
* Apply inclusion criteria ----------------------------------------------------
run "$dofiles/2-apply_criteria.do"
* Add covariates --------------------------------------------------------------
run "$dofiles/3-add_covariates.do"
* Impute missing variables and create final analysis datasets -----------------
* This takes a long time!
//run "$dofiles/4-imputation.do"
***********************************
* MAIN ANALYSIS *
***********************************
global dofiles "$path/code/02_analysis"
* Run primary Cox regression analysis ------------------------------------------
run "$dofiles/1-primary-analysis.do"
* Genenate data for Table of crude rates ---------------------------------------
run "$dofiles/2-crude_rate_table.do"
* Genenate data for Table of characteristics -----------------------------------
run "$dofiles/3-table_of_characteristics.do"
* Generate data on missing covariate information -------------------------------
run "$dofiles/4-missing_data_summary.do"
* Generate data on summary characteristics for text ----------------------------
run "$dofiles/5-characteristics_text.do"
***********************************
* SENSITIVITY ANALYSIS *
***********************************
global dofiles "$path/code/03_sensitivity"
run "$dofiles/1-control_outcomes.do"
run "$dofiles/2-complete_case.do"
run "$dofiles/3-statin_properties.do"
run "$dofiles/5-entry_year.do"
run "$dofiles/6-pregnancy_cohort.do"
run "$dofiles/7-smeeth_codes.do"