forked from arinbasu/brca-study
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhrtbrca.do
68 lines (35 loc) · 1.21 KB
/
hrtbrca.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
cd "/Users/arindambose/GitHub/brca-study"
clear all
// read the data file
insheet using breastca.csv, comma
save breastca, replace
use breastca
set more off
//list
// describe
//twoway (scatter declinehrtuse cadecrease) (qfit declinehrtuse cadecrease)
//summarize cadecrease declinehrtuse
/*
drop if cadecrease < 0
save breastca2, replace
use breastca2
summarize cadecrease declinehrtuse
twoway (scatter cadecrease declinehrtuse ) (qfit cadecrease declinehrtuse )
gen declinehrtuse2 = declinehrtuse^2
regress cadecrease declinehrtuse declinehrtuse2
tab cadecrease
tab cadeccat2
median declinehrtuse, by(cadeccat2)
*/
describe
sum declinehrtuse cadecrease peakhrtusepct
// generate three level variable to categorise decrease in ca incidence
// 1 = increase, 0/3.7 = no to some decrease, 3.8 - highest = most decrease
recode cadecrease (-14/-0.5 = 1) (0/3.7 = 2) (3.8/21.8 = 3), gen(deccat)
// Or, we can make it binary, i.e., that is those who showed either
// increase or no change versus those who actually decreased
recode cadecrease (-14/0 = 1) (else = 2), gen(decabin)
tab decabin
tab deccat
// what is the average decline in hrt use in each of these groups?
mean declinehrtuse, over(decabin)