-
Notifications
You must be signed in to change notification settings - Fork 1
/
dissertation-chapter-x-monthly-analysis.do
1199 lines (791 loc) · 34 KB
/
dissertation-chapter-x-monthly-analysis.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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
capt log close
log using logs\dissertation-chapter-3-analysis.txt, text replace
***=============================***
*** MEDIATION ANALYSIS ***
***=============================***
/*
***===========================================================***
*** DATA FROM CHAPTER 2 DATA CREATION FILE *
*** Uses string matching on firm name to match datasets *
***===========================================================***
/// LOAD DATA
use data\csrhub-kld-cstat-with-crosswalk-exact-stnd_firm-ym-matches-clean.dta, clear
/// ALL INDUSTRIES
* Y = ni
* X = over_rtg
* M = net_kld
*mark medall
*markout medall ni over_rtg net_kld year debt rd ad
/// All industries: Net KLD strengths No imputation of missing values
*** KLD Strengths
xtreg f12.ni over_rtg emp debt rd ad i.year, fe cluster(firm_n)
eststo m1_ni
xtreg net_kld_str over_rtg emp debt rd ad i.year, fe cluster(firm_n)
eststo m1_ni_kld
xtreg f12.ni over_rtg net_kld_str emp debt rd ad i.year, fe cluster(firm_n)
eststo m1_ni_med
estout m1_ni m1_ni_kld m1_ni_med, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_a, fmt(%9.0g %9.0g %9.0g %9.4g) ///
labels("N" "Firms" "Adj. R^2")) ///
legend collabels(none) ///
keep(over_rtg net_kld_str emp debt rd ad _cons) ///
order(over_rtg net_kld_str emp debt rd ad _cons)
outreg2 [m1_ni m1_ni_kld m1_ni_med] using "tables-and-figures/ch3-ni-on-kld-str", excel ///
stats(coef tstat) ///
keep(over_rtg net_kld_str emp debt rd ad) ///
sortvar(over_rtg net_kld_str emp debt rd ad) ///
dec(2) fmt(f) ///
alpha(.001, .01, .05) ///
addtext(Firm FE, YES, Year FE, YES) ///
replace
*** All industries
*** Net KLD concerns
*Main relationship
xtreg ni over_rtg emp debt rd ad i.year, fe cluster(firm_n)
eststo m2_ni
*Mediator predicting independent variable
xtreg net_kld_con over_rtg emp debt rd ad i.year, fe cluster(firm_n)
eststo m2_net_kld
*Mediation analysis
xtreg ni over_rtg net_kld_con emp debt rd ad i.year, fe cluster(firm_n)
eststo m2_med
estout m2_ni m2_net_kld m2_med, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_a, fmt(%9.0g %9.0g %9.0g %9.4g) ///
labels("N" "Firms" "Adj. R^2")) ///
legend collabels(none) ///
keep(over_rtg net_kld_con emp debt rd ad _cons) ///
order(over_rtg net_kld_con emp debt rd ad _cons)
outreg2 [m2_ni m2_net_kld m2_med] using "tables-and-figures/ch3-ni-on-kld-con", excel ///
stats(coef tstat) ///
keep(over_rtg net_kld_con emp debt rd ad) ///
sortvar(over_rtg net_kld_con emp debt rd ad) ///
dec(2) fmt(f) ///
alpha(.001, .01, .05) ///
addtext(Firm FE, YES, Year FE, YES) ///
replace
/// WITHIN-BETWEEN RANDOM EFFECTS MODELS
foreach variable in net_kld_str net_kld_con over_rtg emp debt rd ad {
bysort firm_n: egen `variable'_m=mean(`variable')
bysort firm_n: gen `variable'_dm=`variable'-`variable'_m
}
*** All industries
*** Net KLD strengths
xtreg ni over_rtg_dm over_rtg_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year, re cluster(firm_n) base
xtreg net_kld_str over_rtg_dm over_rtg_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year, re cluster(firm_n) base
xtreg ni over_rtg_dm net_kld_str_dm over_rtg_m net_kld_str_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year, re cluster(firm_n) base
*** Control 2-digit NAICS
gen naics2=substr(naics,1,2)
destring(naics2), gen(naics_2)
replace naics_2=31 if naics_2==32 | naics_2==33 /* Manufacturing */
replace naics_2=44 if naics_2==45 /* Retail Trade */
replace naics_2=48 if naics_2==49 /* Transport and Warehousing */
* Set base industry as retail trade
fvset base 44 naics_2
* Net KLD strengths
xtreg ni over_rtg_dm over_rtg_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year i.naics_2, re base
eststo nis1
xtreg net_kld_str over_rtg_dm over_rtg_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year i.naics_2, re base
eststo nis2
xtreg ni over_rtg_dm net_kld_str_dm over_rtg_m net_kld_str_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year i.naics_2, re base
eststo nis3
* Net KLD concerns
xtreg ni over_rtg_dm over_rtg_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year i.naics_2, re base
eststo nic1
xtreg net_kld_con over_rtg_dm over_rtg_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year i.naics_2, re base
eststo nic2
xtreg ni over_rtg_dm net_kld_con_dm over_rtg_m net_kld_con_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year i.naics_2, re base
eststo nic3
* Regression of net income on CSRHub rating
estout nis1 nic1, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_a, fmt(%9.0g %9.0g %9.0g %9.4g) ///
labels("N" "Firms" "Adj. R^2")) ///
legend collabels(none) ///
order(over* net*)
* Regression of CSRHub rating on KLD strengths or concerns
estout nis2 nic2, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_a, fmt(%9.0g %9.0g %9.0g %9.4g) ///
labels("N" "Firms" "Adj. R^2")) ///
legend collabels(none) ///
order(over* net*)
* Regression of net income on CSRHub rating and KLD strengths or concerns
estout nis1 nic1 nis3 nic3, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_a, fmt(%9.0g %9.0g %9.0g %9.4g) ///
labels("N" "Firms" "Adj. R^2")) ///
legend collabels(none) ///
order(over* net*)
* Regression of net income on CSRHub rating and KLD strengths and KLD concerns
xtreg ni over_rtg_dm net_kld_str_dm net_kld_con_dm over_rtg_m net_kld_str_m net_kld_con_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year i.naics_2, re base
eststo nistrcon
*/
***===========================================================***
* DATA FROM CLEAN-ALL-CSTAT-VARIABLES-FROM-CUSIPS.DO *
* Uses exact matching on CUSIPs to match datasets *
***===========================================================***
use data/csrhub-kld-cstat-matched-on-cusip.dta, clear
*** Descriptive analysis
d
corr revt ni tobinq roa net_kld_str net_kld_con over_rtg, means
/// Main CFP - CSR performance
*** Contemporaneous
* CSRHub
eststo clear
foreach dv of varlist revt ni tobinq roa {
foreach iv of varlist net_kld_str net_kld_con over_rtg {
qui xtreg `dv' `iv', fe cluster(cusip_n)
eststo reg1_`dv'
qui xtreg `dv' `iv' i.year, fe cluster(cusip_n)
eststo reg1yr_`dv'
}
}
estout *, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Fixed effects regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
* KLD
eststo clear
foreach dv of varlist revt ni tobinq roa {
xtreg `dv' net_kld_str net_kld_con, fe cluster(cusip_n)
eststo reg2_`dv'
xtreg `dv' net_kld_str net_kld_con i.year, fe cluster(cusip_n)
eststo reg2yr_`dv'
}
estout *, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Fixed effects regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
*** Lagged independent variables
* CSRHub
xtset
eststo clear
foreach dv of varlist revt ni tobinq roa {
foreach iv of varlist net_kld_str net_kld_con over_rtg {
qui xtreg `dv' L12.`iv', fe cluster(cusip_n)
eststo reg3_`dv'
qui xtreg `dv' L12.`iv' i.year, fe cluster(cusip_n)
eststo reg3yr_`dv'
}
}
estout *, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Fixed effects regression on lagged CSR. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
eststo clear
* KLD
xtset
eststo clear
foreach dv of varlist revt ni tobinq roa {
qui xtreg `dv' L12.net_kld_str L12.net_kld_con, fe cluster(cusip_n)
eststo reg2_`dv'
qui xtreg `dv' L12.net_kld_str L12.net_kld_con i.year, fe cluster(cusip_n)
eststo reg2yr_`dv'
}
estout *, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Fixed effects regressions. Panel is CUSIP-year. Errors clustered by CUSIP.")
eststo clear
*** Random effects within-between models
* CSRHub contemporaneous
xtset
foreach dv of varlist revt ni tobinq roa {
qui xtreg `dv' over_rtg_dm over_rtg_m, re cluster(cusip_n)
eststo rewb1_`dv'_1
qui xtreg `dv' over_rtg_dm over_rtg_m i.year, re cluster(cusip_n)
eststo rewb1_`dv'_2
}
estout rewb1*, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Random effects within-between regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
* CSRHub lagged
xtset
foreach dv of varlist revt ni tobinq roa {
qui xtreg `dv' L12.over_rtg_dm L12.over_rtg_m, re cluster(cusip_n)
eststo rewb2_`dv'_1
qui xtreg `dv' L12.over_rtg_dm L12.over_rtg_m i.year, re cluster(cusip_n)
eststo rewb2_`dv'_2
}
estout rewb2*, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Random effects within-between regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
* KLD contemporaneous
xtset
foreach dv of varlist revt ni tobinq roa {
qui xtreg `dv' net_kld_str_dm net_kld_con_dm net_kld_str_m net_kld_con_m, re cluster(cusip_n)
eststo rewb3_`dv'_1
qui xtreg `dv' net_kld_str_dm net_kld_con_dm net_kld_str_m net_kld_con_m i.year, re cluster(cusip_n)
eststo rewb3_`dv'_2
}
estout rewb3*, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Random effects within-between regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
* KLD lagged
xtset
foreach dv of varlist revt ni tobinq roa {
qui xtreg `dv' L12.net_kld_str_dm L12.net_kld_con_dm L12.net_kld_str_m L12.net_kld_con_m, re cluster(cusip_n)
eststo rewb4_`dv'_1
qui xtreg `dv' L12.net_kld_str_dm L12.net_kld_con_dm L12.net_kld_str_m L12.net_kld_con_m i.year, re cluster(cusip_n)
eststo rewb4_`dv'_2
}
estout rewb4*, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Random effects within-between regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
*** Compare contemporaneous and lagged KLD
estout rewb3_r* rewb4_r*, cells(b(star) z(par fmt(%9.4f))) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Random effects within-between regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
/// Introducing control variables
capt log close
log using logs/control-variable-analysis.txt, text replace
/*** 1) Barnett and Salomon (2012) model CFP -> f(CSP) with control variables:
a. Firm size (CSTAT EMP)
b. Debt (CSTAT DLTT / AT)
c. Ad intensity (CSTAT XAD / SALE) Missing assumed = 0
d. R&D intensity (CSTAT XRD / SALE)
*/
*** Lagged B&S model, without lagged DV because independent variables are lagged
capt n drop fm
mark fm
markout fm revt ni tobinq roa l12.net_kld_str l12.net_kld_con l12.over_rtg l12.emp l12.debt l12.ad l12.rd year
local d = 0
foreach dv of varlist revt ni tobinq roa {
local d = `d' + 1
local i = 0
foreach iv of varlist net_kld_str net_kld_con over_rtg {
local i = `i' + 1
qui xtreg `dv' l12.`iv' if fm==1, fe cluster(cusip_n)
eststo fm_`d'_`i'_1
qui xtreg `dv' l12.`iv' i.year if fm==1, fe cluster(cusip_n)
eststo fm_`d'_`i'_1
qui xtreg `dv' l12.`iv' l12.emp i.year if fm==1, fe cluster(cusip_n)
eststo fm_`d'_`i'_3
qui xtreg `dv' l12.`iv' l12.emp l12.debt i.year if fm==1, fe cluster(cusip_n)
eststo fm_`d'_`i'_4
qui xtreg `dv' l12.`iv' l12.emp l12.debt l12.ad i.year if fm==1, fe cluster(cusip_n)
eststo fm_`d'_`i'_5
qui xtreg `dv' l12.`iv' l12.emp l12.debt l12.ad l12.rd i.year if fm==1, fe cluster(cusip_n)
eststo fm_`d'_`i'_6
}
}
* Compare model progression by DV for net_kld_str
forvalues model = 1/4 {
estout fm_`model'_1*, cells(b(star) z(par fmt(%9.4f))) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Fixed effects regressions. Panel: CUSIP-yearmonth. Errors clustered by CUSIP.")
}
* Compare model progression by DV for net_kld_con
forvalues model = 1/4 {
estout fm_`model'_2*, cells(b(star) z(par fmt(%9.4f))) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Fixed effects regressions. Panel: CUSIP-yearmonth. Errors clustered by CUSIP.")
}
* Compare model progression by DV for over_rtg
forvalues model = 1/4 {
estout fm_`model'_3*, cells(b(star) z(par fmt(%9.4f))) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Fixed effects regressions. Panel: CUSIP-yearmonth. Errors clustered by CUSIP.")
}
* Compare full models for each DV
estout fm_1*6 fm_2*6 fm_3*6 fm_4*6, cells(b(star) z(par fmt(%9.4f))) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
order(*net_kld_str *net_kld_con *over_rtg) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Fixed effects regressions. Panel: CUSIP-yearmonth. Errors clustered by CUSIP.")
*** REWB MODELS
xtreg revt net_kld*_dm emp_dm net_kld*_m emp_m i.year, re cluster(cusip_n)
xtreg revt net_kld*_dm emp_dm debt_dm net_kld*_m emp_m debt_m i.year, re cluster(cusip_n)
xtreg revt net_kld*_dm emp_dm debt_dm rd_dm net_kld*_m emp_m debt_m rd_m i.year, re cluster(cusip_n)
xtreg revt net_kld*_dm emp_dm debt_dm rd_dm ad_dm net_kld*_m emp_m debt_m rd_m ad_m i.year, re cluster(cusip_n)
xtreg revt net_kld*_dm debt_dm rd_dm ad_dm size_dm net_kld*_m debt_m rd_m ad_m size_m i.year, re cluster(cusip_n)
xtreg revg net_kld*_dm emp_dm net_kld*_m emp_m i.year, re cluster(cusip_n)
xtreg revg net_kld*_dm emp_dm debt_dm net_kld*_m emp_m debt_m i.year, re cluster(cusip_n)
xtreg revg net_kld*_dm emp_dm debt_dm rd_dm net_kld*_m emp_m debt_m rd_m i.year, re cluster(cusip_n)
xtreg revg net_kld*_dm emp_dm debt_dm rd_dm ad_dm net_kld*_m emp_m debt_m rd_m ad_m i.year, re cluster(cusip_n)
xtreg revg net_kld*_dm debt_dm rd_dm ad_dm size_dm net_kld*_m debt_m rd_m ad_m size_m i.year, re cluster(cusip_n)
xtreg f12.revt net_kld*_dm emp_dm net_kld*_m emp_m i.year, re cluster(cusip_n)
xtreg f12.revt net_kld*_dm emp_dm debt_dm net_kld*_m emp_m debt_m i.year, re cluster(cusip_n)
xtreg f12.revt net_kld*_dm emp_dm debt_dm rd_dm net_kld*_m emp_m debt_m rd_m i.year, re cluster(cusip_n)
xtreg f12.revt net_kld*_dm emp_dm debt_dm rd_dm ad_dm net_kld*_m emp_m debt_m rd_m ad_m i.year, re cluster(cusip_n)
xtreg f12.revt net_kld*_dm debt_dm rd_dm ad_dm size_dm net_kld*_m debt_m rd_m ad_m size_m i.year, re cluster(cusip_n)
capt log close
* November 26, 2018
***=======================================***
* IDENTIFICATION STRATEGY *
* Capture effect of exogenous change *
* in CSR performance on stakeholder *
* perceptions and financial performance *
***=======================================***
/* PLAN
- Create exogenous change in CSR performance variable
- Propensity score match using CSTAT data on propensity to
have exogenous change in CSR performance variable
- Run difference-in-differences regressions using treated and control groups
*/
/// Load data
use data/csrhub-kld-cstat-matched-on-cusip.dta, clear
/// Create exogenous change in CSR performance variable
sum over_rtg, d
* Overall standard deviation: 7.6225
xtsum over_rtg
/* 523,303 cusip-yearmonths
8,781 cusips
Average yearmonths for a cusip: ~60
Minimum deviation from within-cusip average: 16.99357 - global mean 52.10112 = -35.10755
In the data: over_rtg over_rtg_m over_rtg_dm ym cusip_n
23.4304 58.53795 -35.10755 2009m6 349380000
Maximum deviation from within-cusip average: 81.90155 - global mean 52.10112 = 29.80043
In the data: over_rtg over_rtg_m over_rtg_dm ym cusip_n
74.3148 44.51437 29.80043 2017m7 100011000
Average within-cusip standard deviation: 4.73081
Between std. dev. is higher than the within. This implies that two cusips drawn
at random would vary more on over_rtg than would a single cusip in two randomly
selected yearmonths.
*/
* Plot within-cusip deviations on over_rtg with lines for 1, 2, and 3 standard deviations
xtset cusip_n year
gen one_month_change_over_rtg_dm = over_rtg_dm - l.over_rtg_dm
/*
set scheme plotplainblind
xtsum over_rtg
local sd1p = `r(sd_w)'
local sd1n = `r(sd_w)' * -1
local sd2p = `r(sd_w)' * 2
local sd2n = `r(sd_w)' * -2
local sd3p = `r(sd_w)' * 3
local sd3n = `r(sd_w)' * -3
scatter one_month_change_over_rtg_dm cusip_n, sort mlabsize(tiny) m(p) mcolor(black%30) ///
yline(`sd1p') ///
yline(`sd1n') ///
yline(`sd2p') ///
yline(`sd2n') ///
yline(`sd3p') ///
yline(`sd3n')
*/
* Define exogenous change as a 1-month change in over_rtg_dm >= 3 standard deviations of within-firm over_rtg std. dev.
xtset
xtsum over_rtg
gen treat3_date = (abs(over_rtg_dm-l.over_rtg_dm) >= 3*`r(sd_w)') & over_rtg_dm!=. & l.over_rtg_dm!=.
label var treat3_date "Indicator =1 if ym of 3 std dev treatment"
by cusip_n: gen trt_date = year if treat3_date==1
sort cusip_n trt_date
by cusip_n: replace trt_date = trt_date[_n-1] if _n!=1
by cusip_n: gen post3=(year>=trt_date)
label var post3 "Indicator =1 if on or after date of 3 std dev treatment"
xtset
by cusip_n: egen treated3= max(post)
label var treated3 "Indicator = 1 if cusip_n ever 3 std dev treated"
* Check if any cusip treated more than once
bysort cusip_n: egen sumtrt=sum(treat3_date)
tab sumtrt
/*
sumtrt | Freq. Percent Cum.
------------+-----------------------------------
0 | 865,285 96.79 96.79
1 | 27,324 3.06 99.85
2 | 1,184 0.13 99.98
3 | 89 0.01 99.99
4 | 101 0.01 100.00
------------+-----------------------------------
Total | 893,983 100.00
*/
codebook cusip_n if sumtrt>1
* 15 cusip_n with >1 treatment
codebook cusip_n if sumtrt==1
* 290 cusip_n treated once
drop trt_date sumtrt
* Define exogenous change as a 1-month change in over_rtg_dm >= 2 standard deviations of within-firm over_rtg std. dev.
xtset
xtsum over_rtg
gen treat2_date = (abs(over_rtg_dm-l.over_rtg_dm) >= 2*`r(sd_w)') & over_rtg_dm!=. & l.over_rtg_dm!=.
label var treat2_date "Indicator =1 if ym of 2 std dev treatment"
by cusip_n: gen trt_date = ym if treat2_date==1
sort cusip_n trt_date
by cusip_n: replace trt_date = trt_date[_n-1] if _n!=1
by cusip_n: gen post2=(ym>=trt_date)
label var post2 "Indicator =1 if on or after date of 2 std dev treatment"
xtset
by cusip_n: egen treated2= max(post)
label var treated2 "Indicator = 1 if cusip_n ever 2 std dev treated"
* Check if any cusip treated more than once
bysort cusip_n: egen sumtrt=sum(treat2_date)
tab sumtrt
/*
sumtrt | Freq. Percent Cum.
------------+-----------------------------------
0 | 756,231 84.59 84.59
1 | 115,579 12.93 97.52
2 | 20,143 2.25 99.77
3 | 1,545 0.17 99.95
4 | 209 0.02 99.97
5 | 192 0.02 99.99
7 | 84 0.01 100.00
------------+-----------------------------------
Total | 893,983 100.00
*/
codebook cusip_n if sumtrt>1
* 227 cusip_n with >1 treatment
codebook cusip_n if sumtrt==1
* 1,261 cusip_n treated once
drop trt_date sumtrt
/// Treatment group characteristics
* 3 std dev
tabstat revt ni roa emp debt rd ad, by(treated3) stat(mean sd p50 min max N) longstub
set scheme plotplainblind
graph bar (sum) treat3_date, over(year) ///
ti("Count of treated firms by year")
* 2 std dev
tabstat revt ni roa emp debt rd ad, by(treated2) stat(mean sd p50 min max N) longstub
set scheme plotplainblind
graph bar (sum) treat2_date, over(year) ///
ti("Count of 2 std dev treated firms by year")
/// Compare treated to non-treated
tabstat revt revg ni ni_growth at emp xad xrd age tobinq mkt2book roa revpct, ///
by(treated) stat(mean sd p50 min max N) long
* November 28, 2018
***=======================================***
* Analysis from Nov. 21 meeting *
* with Alfie *
***=======================================***
/// Variation in over_rtg within firms
xtsum over_rtg
/* 523,303 cusip-yearmonths
8,781 cusips
Average yearmonths for a cusip: ~60
Minimum deviation from within-cusip average: 16.99357 - global mean 52.10112 = -35.10755
In the data: over_rtg over_rtg_m over_rtg_dm ym cusip_n
23.4304 58.53795 -35.10755 2009m6 349380000
Maximum deviation from within-cusip average: 81.90155 - global mean 52.10112 = 29.80043
In the data: over_rtg over_rtg_m over_rtg_dm ym cusip_n
74.3148 44.51437 29.80043 2017m7 100011000
Average within-cusip standard deviation: 4.73081
Between std. dev. is higher than the within. This implies that two cusips drawn
at random would vary more on over_rtg than would a single cusip in two randomly
selected yearmonths.
*/
* Generate standard deviation variable
bysort cusip_n: egen ovr_std = sd(over_rtg)
replace ovr_std=. if over_rtg==.
* Histogram
histogram ovr_std, bin(100)
* Correlation with number of observations
bysort cusip_n ovr_std: gen N=_N
replace N=. if over_rtg==.
corr ovr_std N
/*
| ovr_std N
-------------+------------------
ovr_std | 1.0000
N | 0.2045 1.0000
*/
/*** 1) Barnett and Salomon (2012) model CFP -> f(CSP) with control variables:
a. Firm size (CSTAT EMP)
b. Debt (CSTAT DLTT / AT)
c. Ad intensity (CSTAT XAD / SALE) Missing assumed = 0
d. R&D intensity (CSTAT XRD / SALE)
2) Variables from other studies of the CFP -> f (CSR) model
e. Industry
f. Firm age
g. Industry average
i. Advertising intensity
ii. Firm size
iii. Risk
h. CapEx / Assets
i. CSP (Environment)
j. CSP (ESG)
k. CSP (Governance)
l. CSP (Social)
m. Dividends
n. Insider ownership and square of this term
o. Leverage
p. Liquidity
q. Positive earnings in previous year
*/
/// CSP AND STAKEHOLDER MANAGEMENT
*** Direct relationship: contemporaneous
xtset
foreach dv of varlist net_kld_str net_kld_con {
qui xtreg `dv' over_rtg_dm over_rtg_m, re cluster(cusip_n)
eststo rewb5_`dv'_1
qui xtreg `dv' over_rtg_dm over_rtg_m i.year, re cluster(cusip_n)
eststo rewb5_`dv'_2
}
estout rewb5*, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
indicate(Year FEs = *.year) ///
title("Random effects within-between regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
/// INDUSTRY RELATIONSHIPS
* Generate 2-digit NAICS
gen naics2=substr(naics,1,2)
destring(naics2), gen(naics_2)
replace naics_2=31 if naics_2==32 | naics_2==33 /* Manufacturing */
replace naics_2=44 if naics_2==45 /* Retail Trade */
replace naics_2=48 if naics_2==49 /* Transport and Warehousing */
* Set base industry as retail trade
fvset base 44 naics_2
*** Industry dummies
bysort cusip_n: egen naics_2_m = mean(naics_2)
by cusip_n: gen naics_2_dm = naics_2 - naics_2_m
label var naics_2_m "CUSIP-level mean naics_2"
label var naics_2_dm "CUSIP-level de-meaned naics_2 (always 0 unless firm moves sectors)"
* Set base industry as retail trade
fvset base 44 naics_2_m
xtset
foreach dv of varlist revt ni tobinq roa {
qui xtreg `dv' i.naics_2_dm i.naics_2_m, re cluster(cusip_n) base
eststo rewb6_`dv'_1
qui xtreg `dv' i.naics_2_dm i.naics_2_m i.year, re cluster(cusip_n) base
eststo rewb6_`dv'_2
}
estout rewb6*, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
title("Random effects regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
xtset
foreach dv of varlist over_rtg net_kld_str net_kld_con {
qui xtreg `dv' i.naics_2_dm i.naics_2_m, re cluster(cusip_n) base
eststo rewb7_`dv'_1
qui xtreg `dv' i.naics_2_dm i.naics_2_m i.year, re cluster(cusip_n) base
eststo rewb7_`dv'_2
}
estout rewb7*, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_o r2_w r2_b, fmt(%9.0g %9.0g %9.4g %9.4g %9.4g) ///
labels("N" "CUSIPs")) ///
legend collabels(none) ///
mlabel(,dep) ///
drop(_cons) ///
title("Random effects regressions. Panel is CUSIP-yearmonth. Errors clustered by CUSIP.")
/// Barron & Kinny Mediation Analysis
*** All independent variables lagged 12 months by regressing 12-month leading DV.
foreach dv of varlist revt ni tobinq roa {
foreach iv of varlist net_kld_str net_kld_con {
xtreg f12.`dv' over_rtg emp debt rd ad i.year, fe cluster(cusip_n)
eststo `dv'_m1
xtreg `iv' over_rtg emp debt rd ad i.year, fe cluster(cusip_n)
eststo `dv'_m2
xtreg f12.`dv' over_rtg `iv' emp debt rd ad i.year, fe cluster(cusip_n)
eststo `dv'_m3
}
}
estout revt* ni* tobinq* roa*, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_a, fmt(%9.0g %9.0g %9.0g %9.4g) labels("N" "Firms" "Adj. R^2")) ///
legend collabels(none) ///
keep(over_rtg net* emp debt rd ad _cons) ///
order(over_rtg net* emp debt rd ad _cons) ///
mlabel(,dep) ///
title("Fixed effects regressions. Panel CUSIP-yearmonth. Errors clustered by CUSIP.")
*** KLD and CSRHub lagged 12 months. Other variables contemporaneous with DV.
foreach dv of varlist revt ni tobinq roa {
foreach iv of varlist net_kld_str net_kld_con {
xtreg `dv' l12.over_rtg emp debt rd ad i.year, fe cluster(cusip_n)
eststo `dv'_m1
xtreg l12.`iv' l12.over_rtg emp debt rd ad i.year, fe cluster(cusip_n)
eststo `dv'_m2
xtreg `dv' l12.over_rtg l12.`iv' emp debt rd ad i.year, fe cluster(cusip_n)
eststo `dv'_m3
estout `dv'_m1 `dv'_m2 `dv'_m3, cells(b(star fmt(%9.3f)) z(par)) ///
stats(N N_g r2_a, fmt(%9.0g %9.0g %9.0g %9.4g) ///
labels("N" "Firms" "Adj. R^2")) ///
legend collabels(none) ///
keep(L12.over_rtg L12.`iv' emp debt rd ad _cons) ///
order(L12.over_rtg L12.`iv' emp debt rd ad _cons) ///
title("Fixed effects regression of `dv' on `iv'. CSR variables lagged 12 months. Errors clustered by CUSIP.")
}
}
*** WITHIN-BETWEEN RANDOM EFFECTS MODELS
*** All industries
*** Net KLD strengths
xtreg f12.revt over_rtg_dm over_rtg_m emp_dm debt_dm rd_dm ad_dm emp_m debt_m rd_m ad_m i.year, ///