-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_final.do
494 lines (429 loc) · 22.6 KB
/
model_final.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
local indir "//prfs.cri.uchicago.edu/sanghavi-lab/Zoey/gardner/data/merge_output/pu/medpar_mds_final/"
*log using `"`logdir'/Exhibit4.log"', text replace
cd "`indir'"
*load analysis dataset
import delimited using main_model_data, clear
*set up factor variables
*race
encode race_name, gen(race_n)
*region
encode region, gen(region_n)
*size
egen size_n=group(size)
label define size_n 1 "large" 2 "medium" 3 "small"
label values size_n size_n
*ownership
encode ownership, gen(ownership_n)
*age
encode age_bin, gen(age_n)
*dual
egen dual_n=group(dual)
label define dual_n 1 "nondual" 2 "dual"
label values dual_n dual_n
*female
egen female_n=group(female)
label define female_n 1 "male" 2 "female"
label values female_n female_n
*short_stay
egen short_stay_n=group(short_stay)
label define short_stay_n 1 "long-stay" 2 "short-stay"
label values short_stay_n short_stay_n
*disability
egen disability_n=group(disability)
label define disability_n 1 "no-disability" 2 "disability"
label values disability_n disability_n
*highest stage
egen higheststage_n=group(higheststage)
label define higheststage_n 0 "missing" 1 "stage1" 2 "stage2" 3 "stage3" 4 "stage4" 5 "unstageable" 6 "dpi"
label values higheststage_n higheststage_n
*set panel variable
encode mcare_id, gen(prvdrnum)
xtset prvdrnum
*create varlists
global race_dev "americanindian_dev asian_dev black_dev hispanic_dev other_dev"
global race_percentage "american_indian_percent asian_percent black_percent hispanic_percent other_percent"
global higheststage_dev ///
"hpu_stage_w_20_dev hpu_stage_w_30_dev hpu_stage_w_40_dev hpu_stage_w_50_dev"
global higheststage_percentage ///
"hpu_stage_w_20_percentage_wo hpu_stage_w_30_percentage_wo hpu_stage_w_40_percentage_wo hpu_stage_w_50_percentage_wo"
global level1_interaction ///
c.americanindian_dev#c.hpu_stage_w_20_dev c.americanindian_dev#c.hpu_stage_w_30_dev c.americanindian_dev#c.hpu_stage_w_40_dev c.americanindian_dev#c.hpu_stage_w_50_dev ///
c.asian_dev#c.hpu_stage_w_20_dev c.asian_dev#c.hpu_stage_w_30_dev c.asian_dev#c.hpu_stage_w_40_dev c.asian_dev#c.hpu_stage_w_50_dev ///
c.black_dev#c.hpu_stage_w_20_dev c.black_dev#c.hpu_stage_w_30_dev c.black_dev#c.hpu_stage_w_40_dev c.black_dev#c.hpu_stage_w_50_dev ///
c.hispanic_dev#c.hpu_stage_w_20_dev c.hispanic_dev#c.hpu_stage_w_30_dev c.hispanic_dev#c.hpu_stage_w_40_dev c.hispanic_dev#c.hpu_stage_w_50_dev ///
c.other_dev#c.hpu_stage_w_20_dev c.other_dev#c.hpu_stage_w_30_dev c.other_dev#c.hpu_stage_w_40_dev c.other_dev#c.hpu_stage_w_50_dev
global level2_interaction ///
c.american_indian_percent#c.hpu_stage_w_20_percentage_wo c.american_indian_percent#c.hpu_stage_w_30_percentage_wo c.american_indian_percent#c.hpu_stage_w_40_percentage_wo c.american_indian_percent#c.hpu_stage_w_50_percentage_wo ///
c.asian_percent#c.hpu_stage_w_20_percentage_wo c.asian_percent#c.hpu_stage_w_30_percentage_wo c.asian_percent#c.hpu_stage_w_40_percentage_wo c.asian_percent#c.hpu_stage_w_50_percentage_wo ///
c.black_percent#c.hpu_stage_w_20_percentage_wo c.black_percent#c.hpu_stage_w_30_percentage_wo c.black_percent#c.hpu_stage_w_40_percentage_wo c.black_percent#c.hpu_stage_w_50_percentage_wo ///
c.hispanic_percent#c.hpu_stage_w_20_percentage_wo c.hispanic_percent#c.hpu_stage_w_30_percentage_wo c.hispanic_percent#c.hpu_stage_w_40_percentage_wo c.hispanic_percent#c.hpu_stage_w_50_percentage_wo ///
c.other_percent#c.hpu_stage_w_20_percentage_wo c.other_percent#c.hpu_stage_w_30_percentage_wo c.other_percent#c.hpu_stage_w_40_percentage_wo c.other_percent#c.hpu_stage_w_50_percentage_wo
global other ///
i.female_n ib(last).age_n i.disability_n dual_dev combinedscore i.medpar_yr_num ///
ami_final alzh_final alzh_demen_final atrial_fib_final cataract_final chronickidney_final ///
copd_final chf_final diabetes_final glaucoma_final hip_fracture_final ischemicheart_final ///
depression_final osteoporosis_final ra_oa_final stroke_tia_final cancer_breast_final ///
cancer_colorectal_final cancer_prostate_final cancer_lung_final cancer_endometrial_final ///
anemia_final asthma_final hyperl_final hyperp_final hypert_final hypoth_final ///
dual_percent ib(first).ownership_n ib(first).region_n ib(first).size_n
*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------;
*short-stay
*run CMC full model
eststo shortstay_logit: melogit m_pu $race_dev $race_percentage $higheststage_dev $higheststage_percentage ///
$level1_interaction $level2_interaction $other ///
if short_stay_n==2 || prvdrnum:
esttab shortstay_logit using main_shortstaylogit_regression.csv, se nogap label replace
// estimates restore shortstay_logit
// testparm $level1_interaction
// testparm $level1_interaction $level2_interaction
//
// estimates restore shortstay_logit
// eststo mblack_dev: margins, dydx(black_dev) post
//
// estimates restore shortstay_logit
// eststo mhpu_4_dev: margins, dydx(hpu_stage_w_40_percentage_wo) post
// estimates restore shortstay_logit
// eststo mslogit_race: margins, over(race_n) post
// esttab mslogit_race, label ci nogap
* CALCULATE PREDICTIVE REPORTING RATES AT EACH STAGE FOR SHORT-STAY RESIDENTS
// margins, at((means) _all black_dev=(-0.1 0.9) americanindian_dev=0 asian_dev=0 hispanic_dev=0 other_dev=0 ///
// hpu_stage_w_40_dev=-0.6 hpu_stage_w_20_dev=0.9 hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
// black_percent=0.1 american_indian_percent=0 asian_percent=0 hispanic_percent=0 other_percent=0 ///
// hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
// hpu_stage_w_50_percentage_wo=0.05)
*stage 2
*calculating predictive reporting rates:
*setting all other variables except race/ulcer severity at mean
*1: white, 2:hispanic, 3:black
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
*predict using logit model
estimates restore shortstay_logit
eststo ms2logit`black'`stage4': ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=-0.6 hpu_stage_w_20_dev=0.9 hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
*difference between white and hispanic
lincom _b[1bn._at]-_b[2._at]
*difference between white and black
lincom _b[1bn._at]-_b[3._at]
}
}
*stage 3
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
*predict using logit model
estimates restore shortstay_logit
eststo ms3logit`black'`stage4': ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=-0.6 hpu_stage_w_20_dev=-0.1 hpu_stage_w_30_dev=0.8 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
*stage 4
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
*predict using logit model
estimates restore shortstay_logit
eststo ms4logit`black'`stage4': ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=0.4 hpu_stage_w_20_dev=-0.1 hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
*stage 5
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
*predict using logit model
estimates restore shortstay_logit
eststo ms5logit`black'`stage4': ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=-0.6 hpu_stage_w_20_dev=-0.1 hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=0.95 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
esttab ms2logit16 ms2logit76 ms3logit16 ms3logit76 ms4logit16 ms4logit76 ms5logit16 ms5logit76 ///
using main_shortstay_predictions_fixed_values_raw.csv, nogap nostar ci
* difference of reporting rate between white and black residents
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
estimates restore ml5logit`black'`stage4'
lincom _b[1bn._at]-_b[2._at]
lincom _b[1bn._at]-_b[3._at]
}
}
# other predictions of short-stay pressure ulcer reporting rates
*stage2
foreach black of numlist 1 7{
foreach stage4 of numlist 4 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
local stage2_dev=1-(0.7-`stage4'*0.1)
local stage4_dev0=0-`stage4'*0.1
local pstage2=0.7-`stage4'*0.1
local pstage4=`stage4'*0.1
*predict using logit model
estimates restore shortstay_logit
eststo ms2logit`black'`stage4'2: ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=(`stage4_dev0') hpu_stage_w_20_dev=`stage2_dev' hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=`pstage4' hpu_stage_w_20_percentage_wo=`pstage2' hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
*stage3
foreach black of numlist 1 7{
foreach stage4 of numlist 4 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
local stage2_dev=0-(0.7-`stage4'*0.1)
local stage4_dev0=0-`stage4'*0.1
local pstage2=0.7-`stage4'*0.1
local pstage4=`stage4'*0.1
*predict using logit model
estimates restore shortstay_logit
eststo ms3logit`black'`stage4'2: ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=(`stage4_dev0') hpu_stage_w_20_dev=`stage2_dev' hpu_stage_w_30_dev=0.8 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=`pstage4' hpu_stage_w_20_percentage_wo=`pstage2' hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
*stage 4
foreach black of numlist 1 7{
foreach stage4 of numlist 4 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
local stage2_dev=0-(0.7-`stage4'*0.1)
local stage4_dev1=1-`stage4'*0.1
local pstage2=0.7-`stage4'*0.1
local pstage4=`stage4'*0.1
*predict using logit model
estimates restore shortstay_logit
eststo ms4logit`black'`stage4'2: ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=(`stage4_dev1') hpu_stage_w_20_dev=`stage2_dev' hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=`pstage4' hpu_stage_w_20_percentage_wo=`pstage2' hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
// esttab ms4logit142 ms4logit162 ms4logit742 ms4logit762, nogap nostar
*Unstageable
foreach black of numlist 1 7{
foreach stage4 of numlist 4 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
local stage2_dev=0-(0.7-`stage4'*0.1)
local stage4_dev0=0-`stage4'*0.1
local pstage2=0.7-`stage4'*0.1
local pstage4=`stage4'*0.1
*predict using logit model
estimates restore shortstay_logit
eststo ms5logit`black'`stage4'2: ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=(`stage4_dev0') hpu_stage_w_20_dev=`stage2_dev' hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=0.95 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=`pstage4' hpu_stage_w_20_percentage_wo=`pstage2' hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
esttab ms2logit142 ms2logit742 ms3logit142 ms3logit742 ms4logit142 ms4logit742 ms5logit142 ms5logit742 using main_shortstay_predictions_fixed_values_other_raw.csv, nogap nostar ci
foreach black of numlist 1 7{
foreach stage4 of numlist 4 {
estimates restore ml5logit`black'`stage4'2
lincom _b[1bn._at]-_b[2._at]
lincom _b[1bn._at]-_b[3._at]
}
}
*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------;
*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------*-------;
*long-stay
eststo longstay_logit: melogit m_pu $race_dev $race_percentage $higheststage_dev $higheststage_percentage ///
$level1_interaction $level2_interaction $other ///
if short_stay_n==1 || prvdrnum:
esttab longstay_logit using main_longstaylogit_regression.csv, se nogap label replace
// estimates restore longstay_logit
// eststo mllogit_race: margins, over(race_n) post
// esttab mllogit_race, label ci nogap
* CALCULATE PREDICTIVE REPORTING RATES AT EACH STAGE FOR LONG-STAY RESIDENTS
*stage 2
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
*predict using logit model
estimates restore longstay_logit
eststo ml2logit`black'`stage4': ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=-0.6 hpu_stage_w_20_dev=0.9 hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
*stage 3
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
*predict using logit model
estimates restore longstay_logit
eststo ml3logit`black'`stage4': ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=-0.6 hpu_stage_w_20_dev=-0.1 hpu_stage_w_30_dev=0.8 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
lincom _b[1bn._at]-_b[2._at]
}
}
*stage 4
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
*predict using logit model
estimates restore longstay_logit
eststo ml4logit`black'`stage4': ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=0.4 hpu_stage_w_20_dev=-0.1 hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
*stage 5
foreach black of numlist 1 7{
foreach stage4 of numlist 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
*predict using logit model
estimates restore longstay_logit
eststo ml5logit`black'`stage4': ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=-0.6 hpu_stage_w_20_dev=-0.1 hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=0.95 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=0.6 hpu_stage_w_20_percentage_wo=0.1 hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
esttab ml2logit16 ml2logit76 ml3logit16 ml3logit76 ml4logit16 ml4logit76 ml5logit16 ml5logit76 ///
using main_longstay_predictions_fixed_values_raw.csv, nostar nogap ci
* other predictions of reporting rates for long-stay residents
* the percentage of stage 4 pressure ulcer is changed to 40%
*stage2
foreach black of numlist 1 7{
foreach stage4 of numlist 4 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
local stage2_dev=1-(0.7-`stage4'*0.1)
local stage4_dev0=0-`stage4'*0.1
local pstage2=0.7-`stage4'*0.1
local pstage4=`stage4'*0.1
*predict using logit model
estimates restore longstay_logit
eststo ml2logit`black'`stage4'2: ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=(`stage4_dev0') hpu_stage_w_20_dev=`stage2_dev' hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=`pstage4' hpu_stage_w_20_percentage_wo=`pstage2' hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
*stage3
foreach black of numlist 1 7{
foreach stage4 of numlist 4 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
local stage2_dev=0-(0.7-`stage4'*0.1)
local stage4_dev0=0-`stage4'*0.1
local pstage2=0.7-`stage4'*0.1
local pstage4=`stage4'*0.1
*predict using logit model
estimates restore longstay_logit
eststo ml3logit`black'`stage4'2: ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=(`stage4_dev0') hpu_stage_w_20_dev=`stage2_dev' hpu_stage_w_30_dev=0.8 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=`pstage4' hpu_stage_w_20_percentage_wo=`pstage2' hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
//
// esttab mslogit14 mslogit15 mslogit16 mslogit17 mslogit34 mslogit35 mslogit36 mslogit37, ci nogap
// esttab mslogit54 mslogit55 mslogit56 mslogit57 mslogit74 mslogit75 mslogit76 mslogit77, ci nogap
//
*stage 4
foreach black of numlist 1 7{
foreach stage4 of numlist 4 6 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
local stage2_dev=0-(0.7-`stage4'*0.1)
local stage4_dev1=1-`stage4'*0.1
local pstage2=0.7-`stage4'*0.1
local pstage4=`stage4'*0.1
*predict using logit model
estimates restore longstay_logit
eststo ml4logit`black'`stage4'2: ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=(`stage4_dev1') hpu_stage_w_20_dev=`stage2_dev' hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=-0.05 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=`pstage4' hpu_stage_w_20_percentage_wo=`pstage2' hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
*Unstageable
foreach black of numlist 1 7{
foreach stage4 of numlist 4 {
local black_dev0=-`black'*0.1
local black_dev1=1-`black'*0.1
local pblack=`black'*0.1
local stage2_dev=0-(0.7-`stage4'*0.1)
local stage4_dev0=0-`stage4'*0.1
local pstage2=0.7-`stage4'*0.1
local pstage4=`stage4'*0.1
*predict using logit model
estimates restore longstay_logit
eststo ml5logit`black'`stage4'2: ///
margins, at((means) _all black_dev=(`black_dev0' `black_dev1') americanindian_dev=0 asian_dev=0 hispanic_dev=(-0.01 0.99) other_dev=0 ///
hpu_stage_w_40_dev=(`stage4_dev0') hpu_stage_w_20_dev=`stage2_dev' hpu_stage_w_30_dev=-0.2 hpu_stage_w_50_dev=0.95 ///
black_percent=`pblack' american_indian_percent=0 asian_percent=0 hispanic_percent=0.01 other_percent=0 ///
hpu_stage_w_40_percentage_wo=`pstage4' hpu_stage_w_20_percentage_wo=`pstage2' hpu_stage_w_30_percentage_wo=0.2 ///
hpu_stage_w_50_percentage_wo=0.05) post
}
}
esttab ml2logit142 ml2logit742 ml3logit142 ml3logit742 ml4logit142 ml4logit742 ml5logit142 ml5logit742 using main_longstay_predictions_fixed_values_other_raw.csv, nogap nostar ci