-
Notifications
You must be signed in to change notification settings - Fork 0
/
section_3-2.log
118 lines (77 loc) · 2.52 KB
/
section_3-2.log
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
-------------------------------------------------------------------------------------------------------------------------------
name: <unnamed>
log: C:\Users\whisk\OneDrive\Documents\Bristol\Economics\Year 4\AED\AED GitHub\University-of-Bristol---AED\section_3-2.
> log
log type: text
opened on: 27 Mar 2023, 23:01:56
.
. cd "C:\Users\whisk\OneDrive\Documents\Bristol\Economics\Year 4\AED\AED GitHub\University-of-Bristol---AED"
C:\Users\whisk\OneDrive\Documents\Bristol\Economics\Year 4\AED\AED GitHub\University-of-Bristol---AED
.
. import delimited "./data/spec_1.csv"
(encoding automatically selected: ISO-8859-1)
(15 vars, 733 obs)
.
. // Data Cleaning //
.
. replace stringencyindex_weightedaverage = 0 if missing(stringencyindex_weightedaverage)
(0 real changes made)
.
. sort date
. drop if stringencyindex_weightedaverage==0
(19 observations deleted)
. gen time=_n
.
. // Generating Regression Variables //
.
. egen r_m_mean = mean(r_m)
. gen r_m_sqr= (r_m-r_m_mean)^2
. gen r_m_abs=abs(r_m)
. replace stringencyindex_weightedaverage=stringencyindex_weightedaverage/100
(714 real changes made)
.
. tempvar PL75
. egen `PL75' = pctile(stringencyindex_weightedaverage), p(75)
. gen D25Upper = 0
. label var D25Upper "S upper 25%"
. replace D25Upper = 1 if stringencyindex_weightedaverage >= `PL75'
(295 real changes made)
.
. tempvar PL90
. egen `PL90' = pctile(stringencyindex_weightedaverage), p(90)
. gen D10Upper = 0
. label var D10Upper "S upper 10%"
. replace D10Upper = 1 if stringencyindex_weightedaverage >= `PL90'
(158 real changes made)
.
. tempvar PL95
. egen `PL95' = pctile(stringencyindex_weightedaverage), p(95)
. gen D5Upper = 0
. label var D5Upper "S upper 5%"
. replace D5Upper = 1 if stringencyindex_weightedaverage >= `PL95'
(46 real changes made)
.
. gen days = 0
. label var days "Days"
. replace days = days[_n-1] + 1 if c6e_stayathomerequirements == 3
(507 real changes made)
. replace days = 0 if c6e_stayathomerequirements < 3
(0 real changes made)
.
. // Labelling Variables //
.
. la var r_m "Market Return"
. la var stringencyindex_weightedaverage "Stringency Index"
. la var c6e_stayathomerequirements "C6: Shelter in Place Indicator"
. la var populationvaccinated "Vaccination Rate"
. la var rolling_deaths "COVID-19 Deaths 7-Day Rolling Average"
. la var cases "COVID-19 Daily Cases"
. la var r_m_sqr "Market Return Squared"
. la var r_m_abs "Absolute Market Return"
.
. tsset time
Time variable: time, 1 to 714
Delta: 1 unit
.
end of do-file
. exit, clear