-
Notifications
You must be signed in to change notification settings - Fork 0
/
e8_tab_rob.do
185 lines (151 loc) · 8.44 KB
/
e8_tab_rob.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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
clear all
set more off
set maxvar 32767
set mat 11000
version 14.1
glo pathdata "/Users/jkun0001/Downloads/AssessingQualityofPublicServices-main/_dodata/_finaldata"
glo pathfold "/Users/jkun0001/Downloads/AssessingQualityofPublicServices-main/"
glo covars "numberofdischarges totnumdicarges_other_leaveout beds DischargesforAmbulatoryCareS openingnrhosphrr closingnrhosphrr allagesinpovertypercent medhhincome10Tdollars totalpopestby100T unemprate "
glo fes "_Iyear_2012 _Iyear_2013 _Iyear_2014 _Iyear_2015 _Imeasure_2 _Imeasure_3"
loc covars1 "i.teach_cons i.catsize_avbeds urban belongschain "
glo covars2 "forprofit_cons beds100_399 beds400_ minorteaching majorteaching urban"
loc covars3 "age65andolderpct2010 whitenonhispanicpct2010 blacknonhispanicpct2010 asiannonhispanicpct2010 hispanicpct2010 ed1lessthanhspct2010 ed2hsdiplomaonlypct2010 ed3somecollegepct2010 ed4assocdegreepct2010 ed5collegepluspct2010"
tempfile alphas datamethod temp
loc suffix phi_
loc method brglm_penalty
loc ses "cluster(providerid)"
loc ses2 "cluster(hrr)"
*-------------------------------------------------------------------------------------------------
cap log close
cap log using $pathfold/_logfiles/e8_tab_rob.txt, text replace
cap use $pathdata/maindata.dta
*-------------------------------------------------------------------------------
* Estimate
keep if temp == 1
tab numberofhospitalsinchain
tab sysname if largechain
su mean_hhi_discharges if everchanged_ownerstat==0
sca mean=r(mean)
di mean
su mean_hhi_beds if everchanged_ownerstat==0
sca meanbed=r(mean)
loc j = 1
loc rname ""
qui su hhi_discharge_sys2008
sca mean = r(mean)
reg `suffix'alpha_`method'_inter forprofit forprofitXhhi_discharge_sys2008 hhi_discharge_sys2008 belongschain `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 , `ses'
est sto reg1_`j'
test forprofit + forprofitXhhi_discharge_sys2008* mean=0
estadd sca te=_b[forprofit] + _b[forprofitXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
g esample = e(sample)==1
reg `suffix'alpha_`method'_inter forprofit chainXhhi_discharge_sys2008 hhi_discharge_sys2008 `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 , `ses'
est sto reg2_`j'
test belongschain + chainXhhi_discharge_sys2008* mean=0
estadd sca te=_b[belongschain] + _b[chainXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
* --------------------------------
reg `suffix'alpha_`method'_inter forprofit mforprofitXhhi_discharge_sys2008 hhi_discharge_sys2008 belongschain `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 , `ses'
est sto reg1_`j'
test forprofit + mforprofitXhhi_discharge_sys2008* mean=0
estadd sca te=_b[forprofit] + _b[mforprofitXhhi_discharge_sys2008]
estadd sca m=r(p)
loc j = `j' + 1
reg `suffix'alpha_`method'_inter forprofit mchainXhhi_discharge_sys2008 hhi_discharge_sys2008 `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 , `ses'
est sto reg2_`j'
test belongschain + mchainXhhi_discharge_sys2008* mean=0
estadd sca te=_b[belongschain] + _b[mchainXhhi_discharge_sys2008]
estadd sca m=r(p)
loc j = `j' + 1
* --------------------------------
reg `suffix'alpha_`method'_inter forprofit forprofitXhhi_discharge_sys2008 hhi_discharge_sys2008 belongschain `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 & esample ==1 & nrhosphrr != 1 , `ses'
est sto reg1_`j'
test forprofit + forprofitXhhi_discharge_sys2008* mean=0
estadd sca te=_b[forprofit] + _b[forprofitXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
reg `suffix'alpha_`method'_inter forprofit chainXhhi_discharge_sys2008 hhi_discharge_sys2008 `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 & esample ==1 & nrhosphrr != 1 , `ses'
est sto reg2_`j'
test belongschain + chainXhhi_discharge_sys2008* mean=0
estadd sca te=_b[belongschain] + _b[chainXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
* --------------------------------
reg `suffix'alpha_`method'_inter forprofit forprofitXhhi_discharge_sys2008 hhi_discharge_sys2008 belongschain `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 & esample ==1 & monop_hhi_discharge_sys2008 != 1 , `ses'
est sto reg1_`j'
test forprofit + forprofitXhhi_discharge_sys2008* mean=0
estadd sca te=_b[forprofit] + _b[forprofitXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
reg `suffix'alpha_`method'_inter forprofit chainXhhi_discharge_sys2008 hhi_discharge_sys2008 `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 & esample ==1 & monop_hhi_discharge_sys2008 != 1 , `ses'
est sto reg2_`j'
test belongschain + chainXhhi_discharge_sys2008* mean=0
estadd sca te=_b[belongschain] + _b[chainXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
* --------------------------------
reg `suffix'alpha_`method'_inter forprofit forprofitXhhi_discharge_sys2008 hhi_discharge_sys2008 belongschain uninsuredadultsrawvalue `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 , `ses'
est sto reg1_`j'
test forprofit + forprofitXhhi_discharge_sys2008* mean=0
estadd sca te=_b[forprofit] + _b[forprofitXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
reg `suffix'alpha_`method'_inter forprofit chainXhhi_discharge_sys2008 hhi_discharge_sys2008 uninsuredadultsrawvalue `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 , `ses'
est sto reg2_`j'
test belongschain + chainXhhi_discharge_sys2008* mean=0
estadd sca te=_b[belongschain] + _b[chainXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
* --------------------------------
reg `suffix'alpha_`method'_pooled forprofit forprofitXhhi_discharge_sys2008 hhi_discharge_sys2008 belongschain `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 & temp2 ==1 , `ses'
est sto reg1_`j'
test forprofit + forprofitXhhi_discharge_sys2008* mean=0
estadd sca te=_b[forprofit] + _b[forprofitXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
reg `suffix'alpha_`method'_pooled forprofit chainXhhi_discharge_sys2008 hhi_discharge_sys2008 `covars1' `covars3' i.measure i.hrr if everchanged_ownerstat==0 & temp2==1 , `ses'
est sto reg2_`j'
test belongschain + chainXhhi_discharge_sys2008* mean=0
estadd sca te=_b[belongschain] + _b[chainXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
* --------------------------------
reg `suffix'alpha_`method'_inter forprofit forprofitXhhi_discharge_sys2008 hhi_discharge_sys2008 belongschain `covars1' `covars3' i.measure i.hsa if everchanged_ownerstat==0 , `ses'
est sto reg1_`j'
test forprofit + forprofitXhhi_discharge_sys2008* mean=0
estadd sca te=_b[forprofit] + _b[forprofitXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
reg `suffix'alpha_`method'_inter forprofit chainXhhi_discharge_sys2008 hhi_discharge_sys2008 `covars1' `covars3' i.measure i.hsa if everchanged_ownerstat==0 , `ses'
est sto reg2_`j'
test belongschain + chainXhhi_discharge_sys2008* mean=0
estadd sca te=_b[belongschain] + _b[chainXhhi_discharge_sys2008] * mean
estadd sca m=r(p)
loc j = `j' + 1
* --------------------------------
su hhi_dis_sys2008_hsa
sca mean = r(mean)
reg `suffix'alpha_`method'_inter forprofit forprofitXhhi_dis_sys2008_hsa hhi_dis_sys2008_hsa belongschain `covars1' `covars3' i.measure i.hsa if everchanged_ownerstat==0 , `ses'
est sto reg1_`j'
test forprofit + forprofitXhhi_dis_sys2008_hsa* mean=0
estadd sca te=_b[forprofit] + _b[forprofitXhhi_dis_sys2008_hsa] * mean
estadd sca m=r(p)
loc j = `j' + 1
reg `suffix'alpha_`method'_inter forprofit chainXhhi_dis_sys2008_hsa hhi_dis_sys2008_hsa `covars1' `covars3' i.measure i.hsa if everchanged_ownerstat==0 , `ses'
est sto reg2_`j'
test belongschain + chainXhhi_dis_sys2008_hsa* mean=0
estadd sca te=_b[belongschain] + _b[chainXhhi_dis_sys2008_hsa] * mean
estadd sca m=r(p)
loc j = `j' + 1
loc mtit "mtitle("Base" "Median" "Monop" "Monolish" "Uninsured" "Pooled" "HSA FE" "HSA")"
esttab reg1* using $pathfold/_tables/e8_tab_rob.tex , replace keep(forprofit interaction) b(3) se nostar stats(N r2 te m) ///
rename(forprofitXhhi_discharge_sys2008 interaction ///
mforprofitXhhi_discharge_sys2008 interaction ///
forprofitXhhi_dis_sys2008_hsa interaction)
esttab reg2* using $pathfold/_tables/e8_tab_rob.tex , append keep(belongschain interaction) b(3) se nostar stats(N r2 te m) ///
rename(chainXhhi_discharge_sys2008 interaction ///
mchainXhhi_discharge_sys2008 interaction ///
chainXhhi_dis_sys2008_hsa interaction)
cap log close