-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathData_Analysis_H1_H2.Rmd
1211 lines (1020 loc) · 50 KB
/
Data_Analysis_H1_H2.Rmd
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
---
title: "Data_Analysis_H1_H2"
author: "Susanne_Rehorst"
date: "25-5-2022"
output: html_document
---
# Data Analysis H1 & H2
In the documents Data_Processing_Regulations.Rmd and Data_Processing_Metrics.Rmd, the data was cleaned and processed. In this markdown, analysis will be performed on this processed data for Hypothesis 1 and Hypothesis 2 (quantity, readability and linguistic characteristics).
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Load or install packages:
```{r}
library(dplyr)
library(stringr)
library(ggplot2)
library(ggpubr)
```
Set Working Directory
```{r}
setwd("~/Thesis")
```
## Load in the data
There are 3 data files used for this analysis. The first one is Descriptive_Data.RData, which contains the meta data for each regulation document and descriptive statistics, like the amount of words and the readability of the regulation document. The second data file that is used is Processed_Data.RData. This data file contains the regulation data, split into tokens. The third data file that is used is Metrics_Data.RData. This file contains the text describing ESG metrics. This data is in a tokenized data format. The metrics data is used to benchmark the content of the regulations document (measuring how many ESG topics are covered by the regulations).
```{r}
load("Descriptive_Data.RData")
load("Processed_Data.RData")
load("Metrics_Data.RData")
```
# Hypothesis 1: Quantity
The first hypothesis tests the differences in quantity and readability between mandatory and voluntary regulatory documents.
# Quantity
## Merging total words
First of all, Descriptive_Data.RData is used to inspect the quantity of words and sentences. Especially ,the quantity of words needs to be adjusted, as the program qualifies some words as non-words. This is not correct, but this is caused by very long sentences without punctuation ending marks (e.g., periods, question mark). To fix this, a merge is done on the words and non-words.
```{r}
Descriptive_Data$totalwords <- rowSums(Descriptive_Data[,c(4,5)])
```
## Merging on document and group level
In order to compare regulations documents, there is merging on 2 levels. Level 1 merges documents that belong to the same region, have the same compliance (Mandatory or Voluntary) and apply to the same topic (E, S, G or a combination thereof) and refer to each other (by amendment or indirectly in the text). By merging them, this controls for the fact that in some regions, regulations of the same type and that refer to each other are scattered across multiple documents. This would imply that the quantity is lower while this is actually not the case.
Level 2 Merges even further, by merging level 1 documents that already apply to the same region, have the same compliance, refer to each other, REGARDLESS if they have the same topic. Referring means that document refer to each other because one regulation amends the other OR if one documents indirectly refers to the other document in the text. By also looking at group level, there can be controlled for regions that show their ESG regulations in 1 document and regions that publish their E, S, G regulations at different sources, even though they refer to each other and should be used in conjunction with each other.
## Level 1 merging
In order to merge on level 1, a merge ID variable is created to uniquely identify groups.
```{r}
# Create the merge ID variable
names <- c("GROUP_ID","DOC_TYPE","M")
Descriptive_Data[,names] <- lapply(Descriptive_Data[,names], as.character)
Descriptive_Data$MERGE_ID <- paste(Descriptive_Data$GROUP_TYPE, Descriptive_Data$GROUP_ID,Descriptive_Data$DOC_TYPE,Descriptive_Data$M)
# Set variables back to factor
names <- c("MERGE_ID","DOC_ID","GROUP_ID","GROUP_TYPE","DOC_TYPE","M","REGION")
Descriptive_Data[,names] <- lapply(Descriptive_Data[,names], factor)
# Get merged data by grouping on MERGE_ID
DOC_Quantity <- Descriptive_Data %>% group_by(MERGE_ID) %>%
summarize(totalwords=sum(totalwords),
sents=sum(sents))
# Split the MERGE_ID variable
DOC_Quantity[c('GROUP_TYPE', 'GROUP_ID', 'DOC_TYPE', 'M')] <- str_split_fixed(DOC_Quantity$MERGE_ID,' ',4)
# Create new merge variable
DOC_Quantity$MERGE_ID <- paste(DOC_Quantity$DOC_TYPE,DOC_Quantity$M)
# Set variables to factor
names <- c("MERGE_ID","GROUP_TYPE", "GROUP_ID","DOC_TYPE","M")
DOC_Quantity[,names] <- lapply(DOC_Quantity[,names], factor)
# Remove Group ID 42, 43, 44, as they do not contain ESG regulations (only key ESG metrics)
DOC_Quantity <- DOC_Quantity[DOC_Quantity$GROUP_ID!="42" & DOC_Quantity$GROUP_ID!="43" & DOC_Quantity$GROUP_ID!="44", ]
DOC_Quantity <- droplevels(DOC_Quantity)
```
Get the summary statistics for the aggregated data set. These summary statistics show the average length of mandatory and voluntary documents, split by group type. Of course, ESG should only be compared to ESG as it is likely that these documents are larger.
```{r}
DOC_Stats <- DOC_Quantity %>%
group_by(MERGE_ID) %>%
summarize(N=length(MERGE_ID),
w_min = min(totalwords),
w_q1 = quantile(totalwords, 0.25),
w_median = median(totalwords),
w_mean = mean(totalwords),
w_q3 = quantile(totalwords, 0.75),
w_max = max(totalwords),
w_SD=sd(totalwords),
s_min = min(sents),
s_q1 = quantile(sents, 0.25),
s_median = median(sents),
s_mean = mean(sents),
s_q3 = quantile(sents, 0.75),
s_max = max(sents),
s_SD=sd(sents))
DOC_Stats
```
## Level 2 merging
Next, analysis is performed on group level. These summary statistics give more insights into group level. The average amount of words and sentences can give an indication if there is a difference between the amount of mandatory and voluntary regulations.
```{r}
# Group the data by Group_ID
Group_Quantity <- Descriptive_Data %>%
group_by(GROUP_ID, GROUP_TYPE, M) %>%
summarize(totalwords=sum(totalwords),
sentences=sum(sents)) %>% ungroup()
# Remove Group ID 42, 43, 44, as they do not contain ESG regulations (only key ESG metrics)
Group_Quantity <- Group_Quantity[Group_Quantity$GROUP_ID!="42" & Group_Quantity$GROUP_ID!="43" & Group_Quantity$GROUP_ID!="44", ]
Group_Quantity <- droplevels(Group_Quantity)
# Get summary statistics
Group_Stats <- Group_Quantity %>%
group_by(GROUP_TYPE, M) %>%
summarize(
w_min = min(totalwords),
w_q1 = quantile(totalwords, 0.25),
w_median = median(totalwords),
w_mean = mean(totalwords),
w_q3 = quantile(totalwords, 0.75),
w_max = max(totalwords),
w_SD=sd(totalwords),
s_min = min(sentences),
s_q1 = quantile(sentences, 0.25),
s_median = median(sentences),
s_mean = mean(sentences),
s_q3 = quantile(sentences, 0.75),
s_max = max(sentences),
s_SD=sd(sentences))
Group_Stats
```
Besides, it is calculated what percentage of ESG group documents is made out of pure governance documents by combining information from DOC_Quantity and GROUP_Quantity. Initially, corporate governance regulations were the first ones that were introduced. So it is interesting to see if they still have a large weight in the current ESG regulations. Also, the country IDs are merged with the descriptive data, to examine differences on a country level.
```{r}
# Create GROUP_ID, REGION identifier
Country_ID <- Descriptive_Data[,c(50,59)]
Country_ID <- distinct(Country_ID)
DOC_Quantity <- merge(DOC_Quantity, Country_ID, by.x = "GROUP_ID", by.y = "GROUP_ID", all.x = TRUE, all.y = FALSE)
Group_Quantity <- merge(Group_Quantity, Country_ID, by.x = "GROUP_ID", by.y = "GROUP_ID", all.x = TRUE, all.y = FALSE)
```
```{r}
# Calculate percentage of G documents in ESG groups, by region
G_Percentage <- DOC_Quantity %>% filter(M=="1" & GROUP_TYPE=="ESG") %>% group_by(GROUP_ID) %>% mutate(
stotalwords=sum(totalwords),
p_wgovernance=ifelse(DOC_TYPE=="G",(totalwords/stotalwords),0),
stotalsents=sum(sents),
p_sgovernance=ifelse(DOC_TYPE=="G",(sents/stotalsents),0),
)
# Create summary table, by Region by doc type
Q_Region_DOC <- DOC_Quantity %>% group_by(REGION, DOC_TYPE) %>% summarise(
w_total = sum(totalwords),
s_toal = sum(sents))
# Create summary table, by Region by group type
Q_Region_GROUP <- Group_Quantity %>% group_by(REGION, GROUP_TYPE, M) %>% summarise(
w_total = sum(totalwords),
s_toal = sum(sentences))
G_Percentage
Q_Region_DOC
Q_Region_GROUP
```
## Test if differences in quantity are significant between mandatory and voluntary regulations
Test if differences in quantity are significant between mandatory and voluntary regulations. Also, log of totalwords and sentences is taken to create 2 new variables. This is done as a check, in case the quantity of words and sentences is heavily distributed to the right. An indication of this can already be given if the median is lower than the mean quantity. Another way to check this is with a histogram.
```{r}
# Plots overall
hist(Group_Quantity$totalwords)
hist(Group_Quantity$sentences)
plot(density(Group_Quantity$totalwords))
plot(density(Group_Quantity$sentences))
# Plots comparing distribution of mandatory vs voluntary
plot1<- ggplot(DOC_Quantity, aes(x = sents, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
plot2 <- ggplot(DOC_Quantity, aes(x = totalwords, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
plot3<- ggplot(ESG_Group_Quantity, aes(x = log(sentences), fill=M)) +
geom_density(alpha = 0.5) +
labs(y= "density", x = "number of sentences") +
theme(text=element_text(size=15, family="serif")) +
ggtitle("4.1a Sentence distribution ESG reporting standards")
plot4 <- ggplot(ESG_Group_Quantity, aes(x =log(totalwords), fill=M)) +
geom_density(alpha = 0.5) +
labs(y= "density", x = "number of words") +
theme(text=element_text(size=15, family="serif")) +
ggtitle("4.1b Word distribution ESG reporting standards")
ggarrange(plot1, plot2, plot3, plot4)
ggarrange(plot3, plot4)
```
Regression models are used to see if difference in average quantity between mandatory and voluntary documents is significant. This is done on a group level, as groups are the least influenced by scattering of documents across different sources. The first 4 models look at document level and control for the different doc type. The models 5 to 8 look at group level and control for group type. The models 9 to 12 look at group level and do a subset analysis to only compare mandatory and voluntary ESG.
```{r}
# Create log transformed variables
Group_Quantity$logwords <- log(Group_Quantity$totalwords)
Group_Quantity$logsents <- log(Group_Quantity$sentences)
DOC_Quantity$logwords <- log(DOC_Quantity$totalwords)
DOC_Quantity$logsents <- log(DOC_Quantity$sents)
# Significance between M and V (doc level)
model1 <- lm(totalwords ~ M+DOC_TYPE, data = DOC_Quantity)
model2 <- lm(sents ~ M+DOC_TYPE, data = DOC_Quantity)
# Log version
model3 <- lm(logwords ~ M+DOC_TYPE, data = DOC_Quantity)
model4 <- lm(logsents ~ M+DOC_TYPE, data = DOC_Quantity)
# Significance between M and V (group level)
model5 <- lm(totalwords ~ M+GROUP_TYPE, data = Group_Quantity)
model6 <- lm(sentences ~ M+GROUP_TYPE, data = Group_Quantity)
# Log version
model7 <- lm(logwords ~ M+GROUP_TYPE, data = Group_Quantity)
model8 <- lm(logsents ~ M+GROUP_TYPE, data = Group_Quantity)
# Significance between M and V ESG regulations
# Create a sub sample
ESG_Group_Quantity <- Group_Quantity[Group_Quantity$GROUP_TYPE=="ESG", ]
# Significance between M and V (group level)
model9 <- lm(totalwords ~ M, data = ESG_Group_Quantity)
model10 <- lm(sentences ~ M, data = ESG_Group_Quantity)
# Log version
model11 <- lm(logwords ~ M, data = ESG_Group_Quantity)
model12 <- lm(logsents ~ M, data = ESG_Group_Quantity)
# Results
summary(model1)
summary(model2)
summary(model3)
summary(model4)
summary(model5)
summary(model6)
summary(model7)
summary(model8)
summary(model9)
summary(model10)
summary(model11)
summary(model12)
```
# H2a Linguistic characteristics: Readability
## Correct for non-words
This section analyzes the differences in readability score between groups. First of all, there are 7 out of of 70 cases removed where the amount of non-words > 0. When non-words >0, this is an indication that the software was not able to correctly identify sentences and words. This is due to long lists where terms are summed up, but do not contain a punctuation ending mark. As a consequence, readability scores use the wrong amount of words and sentences and are therefore not correct.
```{r}
Readability <- Descriptive_Data[Descriptive_Data$GROUP_ID!="2"& Descriptive_Data$GROUP_ID!="4"& Descriptive_Data$GROUP_ID!="17"& Descriptive_Data$GROUP_ID!="20"& Descriptive_Data$GROUP_ID!="21"& Descriptive_Data$GROUP_ID!="23"& Descriptive_Data$GROUP_ID!="31", ]
Readability <- Readability[Readability$GROUP_ID!="42" & Readability$GROUP_ID!="43" & Readability$GROUP_ID!="44", ]
```
## Average readability between documents: Mandatory vs Voluntary documents
First, average readability between mandatory and voluntary documents is examined, irrespective of ESG type. For Quantity, this could not be done, because ESG automatically contains more words or sentences than an E or G document. But readability formulas are not influenced by sizes. For this analysis, 4 formulas are utilized. Each formula has its own characteristics. As a robustness check, it is examined if results are similar across different readability formulas.
```{r}
Readability_Total <- Readability %>%
group_by(M) %>%
summarize(average_gl=mean(gl),
average_ari=mean(ari),
average_smog=mean(smog),
average_cl=mean(cl),
med_gl=median(gl),
med_ari=median(ari),
med_smog=median(smog),
med_cl=median(cl))%>% ungroup()
Readability_Total
```
The difference in readability score between mandatory and voluntary documents is tested on significance. Also, the distribution is inspected to see if log transformation is needed.
```{r}
# Plots comparing distribution of mandatory vs voluntary
plot1<- ggplot(Readability, aes(x = gl, fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "FK Readability Score") + ggtitle("4.2a Distribution FK Score - Group Level 1")
theme(text=element_text(size=12, family="serif"))
plot2 <- ggplot(Readability, aes(x = ari, fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "AR Readability Index") + ggtitle("4.2b Distribution AR Index - Group Level 1")
theme(text=element_text(size=12, family="serif"))
plot3 <- ggplot(Readability, aes(x = cl, fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "CL Readability Index") + ggtitle("4.2c Distribution CL Index - Group Level 1")
theme(text=element_text(size=12, family="serif"))
plot4<- ggplot(Group_Readability, aes(x = gl, fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "FK Readability Score") + ggtitle("4.2d Distribution FK Score - Group Level 2")
theme(text=element_text(size=12, family="serif"))
plot5 <- ggplot(Group_Readability, aes(x = ari, fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "AR Readability Index") + ggtitle("4.2e Distribution AR Index - Group Level 2")
theme(text=element_text(size=12, family="serif"))
plot6 <- ggplot(Group_Readability, aes(x = cl, fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "CL Readability Index") + ggtitle("4.2f Distribution CL Index - Group Level 2")
theme(text=element_text(size=12, family="serif"))
plot11<- ggplot(Readability, aes(x = log(gl), fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "FK Readability Score") + ggtitle("4.2a Distribution FK Score - Group Level 1")
theme(text=element_text(size=12, family="serif"))
plot21 <- ggplot(Readability, aes(x = log(ari), fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "AR Readability Index") + ggtitle("4.2b Distribution AR Index - Group Level 1")
theme(text=element_text(size=12, family="serif"))
plot31 <- ggplot(Readability, aes(x = log(cl), fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "CL Readability Index") + ggtitle("4.2c Distribution CL Index - Group Level 1")
theme(text=element_text(size=12, family="serif"))
plot41<- ggplot(Group_Readability, aes(x = log(gl), fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "FK Readability Score") + ggtitle("4.2d Distribution FK Score - Group Level 2")
theme(text=element_text(size=12, family="serif"))
plot51 <- ggplot(Group_Readability, aes(x = log(ari), fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "AR Readability Index") + ggtitle("4.2e Distribution AR Index - Group Level 2")
theme(text=element_text(size=12, family="serif"))
plot61 <- ggplot(Group_Readability, aes(x = log(cl), fill = M)) +
geom_density(alpha = 0.5) + labs(y= "density", x = "CL Readability Index") + ggtitle("4.2f Distribution CL Index - Group Level 2")
theme(text=element_text(size=12, family="serif"))
ggarrange(plot1, plot2, plot3, plot4, plot5, plot6)
ggarrange(plot11, plot21, plot31, plot41, plot51,plot61)
```
Regression models:
```{r}
# Log transform variables
Readability$log_gl <- log(Readability$gl)
Readability$log_ari <- log(Readability$ari)
Readability$log_smog <- log(Readability$smog)
Readability$log_cl <- log(Readability$cl)
# Test for significance
model10 <- lm(gl~M, data = Readability)
model11 <- lm(log_gl~M, data = Readability)
model12 <- lm(ari~M, data = Readability)
model13 <- lm(log_ari~M, data = Readability)
model14 <- lm(smog~M, data = Readability)
model15 <- lm(log_smog~M, data = Readability)
model16 <- lm(cl~M, data = Readability)
model17 <- lm(log_cl~M, data = Readability)
summary(model10)
summary(model11)
summary(model12)
summary(model13)
summary(model14)
summary(model15)
summary(model16)
summary(model17)
```
## Average readability between documents: Mandatory or Voluntary, subset by DOC_TYPE (doc level)
After examining the average readability score between mandatory and voluntary, this difference is examined in more detail by making a distinction in DOC_TYPE. So, if it is an ESG, G, or E document.
```{r}
Readability_DOC <- Readability %>%
group_by(DOC_TYPE, M) %>%
summarize(average_gl=mean(gl),
average_ari=mean(ari),
average_smog=mean(smog),
average_cl=mean(cl),
med_gl=median(gl),
med_ari=median(ari),
med_smog=median(smog),
med_cl=median(cl))%>% ungroup()
Readability_DOC
```
Again, the significance between certain groups on doc level is examined. The differences that are examined are ESG(M)-ESG(V), ESG(M)-G(M), ESG(V)-E(V).
```{r}
# Log transform variables
Readability$log_gl <- log(Readability$gl)
Readability$log_ari <- log(Readability$ari)
Readability$log_smog <- log(Readability$smog)
Readability$log_cl <- log(Readability$cl)
# Create sub-samples
ESG_Readability_DOC <- Readability[Readability$DOC_TYPE=="ESG", ]
M_Readability_DOC <- Readability[Readability$M=="1" & Readability$DOC_TYPE=="ESG" | Readability$M=="1" & Readability$DOC_TYPE=="G", ]
V_Readability_DOC <- Readability[Readability$M=="0" & Readability$DOC_TYPE=="ESG" | Readability$M=="0" & Readability$DOC_TYPE=="E", ]
# Test for significance - ESG Mandatory vs ESG Voluntary
model101 <- lm(gl~M, data = ESG_Readability_DOC)
model111 <- lm(log_gl~M, data = ESG_Readability_DOC)
model121 <- lm(ari~M, data = ESG_Readability_DOC)
model131 <- lm(log_ari~M, data = ESG_Readability_DOC)
model141 <- lm(smog~M, data = ESG_Readability_DOC)
model151 <- lm(log_smog~M, data = ESG_Readability_DOC)
model161 <- lm(cl~M, data = ESG_Readability_DOC)
model171 <- lm(log_cl~M, data = ESG_Readability_DOC)
summary(model101)
summary(model111)
summary(model121)
summary(model131)
summary(model141)
summary(model151)
summary(model161)
summary(model171)
# Test for significance - ESG Mandatory vs Governance Mandatory
model102 <- lm(gl~DOC_TYPE, data = M_Readability_DOC)
model112 <- lm(log_gl~DOC_TYPE, data = M_Readability_DOC)
model122 <- lm(ari~DOC_TYPE, data = M_Readability_DOC)
model132 <- lm(log_ari~DOC_TYPE, data = M_Readability_DOC)
model142 <- lm(smog~DOC_TYPE, data = M_Readability_DOC)
model152 <- lm(log_smog~DOC_TYPE, data = M_Readability_DOC)
model162 <- lm(cl~DOC_TYPE, data = M_Readability_DOC)
model172 <- lm(log_cl~DOC_TYPE, data = M_Readability_DOC)
summary(model102)
summary(model112)
summary(model122)
summary(model132)
summary(model142)
summary(model152)
summary(model162)
summary(model172)
# Test for significance - ESG Voluntary vs Environmental Voluntary
model103 <- lm(gl~DOC_TYPE, data = V_Readability_DOC)
model113 <- lm(log_gl~DOC_TYPE, data = V_Readability_DOC)
model123 <- lm(ari~DOC_TYPE, data = V_Readability_DOC)
model133 <- lm(log_ari~DOC_TYPE, data = V_Readability_DOC)
model143 <- lm(smog~DOC_TYPE, data = V_Readability_DOC)
model153 <- lm(log_smog~DOC_TYPE, data = V_Readability_DOC)
model163 <- lm(cl~DOC_TYPE, data = V_Readability_DOC)
model173 <- lm(log_cl~DOC_TYPE, data = V_Readability_DOC)
summary(model103)
summary(model113)
summary(model123)
summary(model133)
summary(model143)
summary(model153)
summary(model163)
summary(model173)
```
## Average Readability between groups: Mandatory vs Voluntary, subset by Group Type (group level)
As a final part of the analysis, the differences between mandatory and voluntary are examined, while sub-setting at group type. The concept of grouping documents is already explained in the Quantity analysis part of this document. By looking at average readability within a group, the overall readability of documents within the same group is examined. So, a conclusion can be drawn on how readability is overall for a company when they need to apply to regulations applying to a certain region. Therefore, this group analysis also allows to draw conclusions on regional differences.
```{r}
# Group the data by Group_ID
Group_Readability <- Readability %>%
group_by(GROUP_ID, GROUP_TYPE, M) %>%
summarize(gl=mean(gl),
ari=mean(ari),
smog=mean(smog),
cl=mean(cl))%>% ungroup()
# Remove Group ID 42, 43, 44, as they do not contain ESG regulations (only key ESG metrics)
Group_Readability <- Group_Readability[Group_Readability$GROUP_ID!="42" & Group_Readability$GROUP_ID!="43" & Group_Readability$GROUP_ID!="44", ]
Group_Readability <- droplevels(Group_Readability)
# Get summary statistics by M
Group_R_Stats_total <- Group_Readability %>%
group_by(M) %>%
summarize(med_gl=median(gl),
med_ari=median(ari),
med_smog=median(smog),
med_cl=median(cl),
average_gl=mean(gl),
average_ari=mean(ari),
average_smog=mean(smog),
average_cl=mean(cl)) %>% ungroup()
Group_R_Stats_total
# Get summary statistics by M and Group Type
Group_R_Stats <- Group_Readability %>%
group_by(GROUP_TYPE, M) %>%
summarize(med_gl=median(gl),
med_ari=median(ari),
med_smog=median(smog),
med_cl=median(cl),
average_gl=mean(gl),
average_ari=mean(ari),
average_smog=mean(smog),
average_cl=mean(cl)) %>% ungroup()
Group_R_Stats
```
The region is added to the results on group level. This allows to examine if differences are driven by regional differences.
```{r}
Group_Readability <- merge(Group_Readability, Country_ID, by.x = "GROUP_ID", by.y = "GROUP_ID", all.x = TRUE, all.y = FALSE)
```
```{r}
# Create summary table, by Region by doc type
Readability_Region_DOC <- Readability %>% group_by(REGION, DOC_TYPE) %>% summarise(
average_gl=mean(gl),
average_ari=mean(ari),
average_smog=mean(smog),
average_cl=mean(cl))
# Create summary table, by Region by group type
Readability_Region_GROUP <- Group_Readability %>% group_by(REGION, GROUP_TYPE, M) %>% summarise(
average_gl=mean(gl),
average_ari=mean(ari),
average_smog=mean(smog),
average_cl=mean(cl))
# Create summary table, by Region by M
Readability_Region <- Group_Readability %>% group_by(REGION, M) %>% summarise(
average_gl=mean(gl),
average_ari=mean(ari),
average_smog=mean(smog),
average_cl=mean(cl))
Readability_Region_DOC
Readability_Region_GROUP
Readability_Region
```
Lastly, the significance is tested on a group level for readability scores. Difference is examined between mandatory and voluntary. Also, a sub-set analysis is done to test if differences are significant between certain groups.
```{r}
# Log transform variables
Group_Readability$log_gl <- log(Group_Readability$gl)
Group_Readability$log_ari <- log(Group_Readability$ari)
Group_Readability$log_smog <- log(Group_Readability$smog)
Group_Readability$log_cl <- log(Group_Readability$cl)
# Test for significance - M vs V
model1011 <- lm(gl~M, data = Group_Readability)
model1111 <- lm(log_gl~M, data = Group_Readability)
model1211 <- lm(ari~M, data = Group_Readability)
model1311 <- lm(log_ari~M, data = Group_Readability)
model1411 <- lm(smog~M, data = Group_Readability)
model1511 <- lm(log_smog~M, data = Group_Readability)
model1611 <- lm(cl~M, data = Group_Readability)
model1711 <- lm(log_cl~M, data = Group_Readability)
summary(model1011)
summary(model1111)
summary(model1211)
summary(model1311)
summary(model1411)
summary(model1511)
summary(model1611)
summary(model1711)
# Create sub sample
ESG_Group_Readability <- Group_Readability[Group_Readability$GROUP_TYPE=="ESG", ]
M_Group_Readability <- Group_Readability[Group_Readability$M=="1" & Group_Readability$GROUP_TYPE=="ESG" | Group_Readability$M=="1" & Group_Readability$GROUP_TYPE=="G", ]
V_Group_Readability <- Group_Readability[Group_Readability$M=="0" & Group_Readability$GROUP_TYPE=="ESG" | Group_Readability$M=="0" & Group_Readability$GROUP_TYPE=="E", ]
# Test for significance - ESG M vs ESG V
modelx101 <- lm(gl~M, data = ESG_Group_Readability)
modelx111 <- lm(log_gl~M, data = ESG_Group_Readability)
modelx121 <- lm(ari~M, data = ESG_Group_Readability)
modelx131 <- lm(log_ari~M, data = ESG_Group_Readability)
modelx141 <- lm(smog~M, data = ESG_Group_Readability)
modelx151 <- lm(log_smog~M, data = ESG_Group_Readability)
modelx161 <- lm(cl~M, data = ESG_Group_Readability)
modelx171 <- lm(log_cl~M, data = ESG_Group_Readability)
summary(modelx101)
summary(modelx111)
summary(modelx121)
summary(modelx131)
summary(modelx141)
summary(modelx151)
summary(modelx161)
summary(modelx171)
# Test for significance - ESG M vs G M
modelx102 <- lm(gl~GROUP_TYPE, data = M_Group_Readability)
modelx112 <- lm(log_gl~GROUP_TYPE, data = M_Group_Readability)
modelx122 <- lm(ari~GROUP_TYPE, data = M_Group_Readability)
modelx132 <- lm(log_ari~GROUP_TYPE, data = M_Group_Readability)
modelx142 <- lm(smog~GROUP_TYPE, data = M_Group_Readability)
modelx152 <- lm(log_smog~GROUP_TYPE, data = M_Group_Readability)
modelx162 <- lm(cl~GROUP_TYPE, data = M_Group_Readability)
modelx172 <- lm(log_cl~GROUP_TYPE, data = M_Group_Readability)
summary(modelx102)
summary(modelx112)
summary(modelx122)
summary(modelx132)
summary(modelx142)
summary(modelx152)
summary(modelx162)
summary(modelx172)
# Test for significance - ESG V vs E V
modelx103 <- lm(gl~GROUP_TYPE, data = V_Group_Readability)
modelx113 <- lm(log_gl~GROUP_TYPE, data = V_Group_Readability)
modelx123 <- lm(ari~GROUP_TYPE, data = V_Group_Readability)
modelx133 <- lm(log_ari~GROUP_TYPE, data = V_Group_Readability)
modelx143 <- lm(smog~GROUP_TYPE, data = V_Group_Readability)
modelx153 <- lm(log_smog~GROUP_TYPE, data = V_Group_Readability)
modelx163 <- lm(cl~GROUP_TYPE, data = V_Group_Readability)
modelx173 <- lm(log_cl~GROUP_TYPE, data = V_Group_Readability)
summary(modelx103)
summary(modelx113)
summary(modelx123)
summary(modelx133)
summary(modelx143)
summary(modelx153)
summary(modelx163)
summary(modelx173)
```
#H2b & H2c. Linguistic Characteristics - Restrictiveness
H2b and H2c aim to test differences in linguistic characteristics between texts. This is done by counting the amount of certain words. It is expected that the average amount of restrictive words, action words, negative and positive strong words, and exemption words is significantly higher among mandatory documents. On the other hand, it is expected that the average amount of advice words, example words and framework words is significantly higher among voluntary documents. It is expected that voluntary documents have a more guiding character and use less direct and restrictive language. Regarding international frameworks, it is examined which one is most referred to.
# Count relative amount of words
As a first part of the analysis, the total number of words per word category is divided by the total number of words. This prevents a bias where large texts already contain a larger number of category words. Afterwards, this number is multiplied by 1000 for better interpretation. So, the amount of category words per 1000 words is the new measure that has been created.
```{r}
R_Data <- Descriptive_Data
R_Data <- R_Data[R_Data$GROUP_ID!="42" & R_Data$GROUP_ID!="43" & R_Data$GROUP_ID!="44", ]
R_Data$negative_strong <- 1000* R_Data$negative_strong/R_Data$totalwords
R_Data$positive_strong <- 1000* R_Data$positive_strong/R_Data$totalwords
R_Data$exemption <- 1000* R_Data$exemption/R_Data$totalwords
R_Data$example <- 1000* R_Data$example/R_Data$totalwords
R_Data$restriction <- 1000* R_Data$restriction/R_Data$totalwords
R_Data$advice <- 1000* R_Data$advice/R_Data$totalwords
R_Data$action<- 1000* R_Data$action/R_Data$totalwords
R_Data$framework<- 1000* R_Data$framework/R_Data$totalwords
```
Variable transformation is also done to see which of the 5 largest international voluntary frameworks (cdp cdsb gri iirc sasb) are mentioned the most across the current voluntary reporting standards. Also, the mentioning of sustainable development goals (SDGs) is counted and the number that TCFD is mentioned (TCFD is a special framework for climate related financial disclosure).
```{r}
R_Data$cdp <- 1000* R_Data$cdp/R_Data$totalwords
R_Data$cdsb <- 1000* R_Data$cdsb/R_Data$totalwords
R_Data$gri <- 1000* R_Data$gri/R_Data$totalwords
R_Data$sasb<- 1000* R_Data$sasb/R_Data$totalwords
R_Data$tcfd <- 1000* R_Data$tcfd/R_Data$totalwords
R_Data$iirc <- 1000* R_Data$iirc/R_Data$totalwords
R_Data$sdg <- 1000* R_Data$sdg/R_Data$totalwords
```
## Average linguistic characteristics between documents: Mandatory vs Voluntary documents
First the difference between mandatory and voluntary documents is examined, irrespective of ESG type.
```{r}
R_Total <- R_Data %>%
group_by(M) %>%
summarize(average_negative_strong=mean(negative_strong),
average_positive_strong=mean(positive_strong),
average_exemption=mean(exemption),
average_example=mean(example),
average_restriction=mean(restriction),
average_advice=mean(advice),
average_action=mean(action),
average_framework=mean(framework),
median_negative_strong=median(negative_strong),
median_positive_strong=median(positive_strong),
median_exemption=median(exemption),
median_example=median(example),
median_restriction=median(restriction),
median_advice=median(advice),
median_action=median(action),
median_framework=median(framework)) %>% ungroup()
R_Total
```
The numbers can also be visualized in a bar chart, where average (relative) frequency per 1000 words is shown per each word category, per Mandatory/Voluntary. Also, the distribution of mentioning of frameworks across voluntary regulations can be visualized in a bar chart.
```{r}
# Average frequency per 1000 words, per word category, by M
ggplot(R_Total, aes(factor(M), average_restriction, fill=M)) +
geom_bar(stat="identity", position = "dodge") +
scale_fill_brewer(palette = "Set1")
# Table with average mentioning of framework
R_Data_frameworks <- R_Data %>% filter(M=="0" & DOC_TYPE=="E" | M=="0" & DOC_TYPE=="ESG") %>% group_by(DOC_TYPE) %>%
summarise(cdp=mean(cdp),
cdsb=mean(cdsb),
gri=mean(gri),
sasb=mean(sasb),
tcfd=mean(tcfd),
iirc=mean(iirc),
sdg=mean(sdg))
R_Data_frameworks
# Shape data framework to long format
library(reshape2)
frameworks_long <- melt(R_Data_frameworks, id.vars=c("DOC_TYPE"))
frameworks_long$variable <- as.factor(frameworks_long$variable)
# Make a bar chart
ggplot(frameworks_long, aes(factor(variable), value, fill=DOC_TYPE)) +
geom_bar(stat="identity", position = "dodge") +
scale_fill_brewer(palette = "Set2") +
labs(y= "Frequency per 1000 words", x = "Frameworks") +
theme(text=element_text(size=12, family="serif"))
```
The difference in linguistic characteristics between mandatory and voluntary documents is tested on significance. Also, the distribution is inspected to see if log transformation is needed.
```{r}
# Plots comparing distribution of mandatory vs voluntary
plot1<- ggplot(R_Data, aes(x = negative_strong , fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
plot2 <- ggplot(R_Data, aes(x = positive_strong, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
plot3<- ggplot(R_Data, aes(x = exemption, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
plot4 <- ggplot(R_Data, aes(x = action, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
plot5 <- ggplot(R_Data, aes(x = restriction, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
ggarrange(plot1, plot2, plot3, plot4, plot5)
plot6<- ggplot(R_Data, aes(x = example, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
plot7 <- ggplot(R_Data, aes(x = advice, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
plot8<- ggplot(R_Data, aes(x = framework, fill = M)) +
geom_density(alpha = 0.5) +
theme(text=element_text(size=12, family="serif"))
ggarrange(plot6, plot7, plot8)
```
The difference between groups is also tested for significance by performing a regression analysis.
```{r}
# Test for significance
# Overall
rmodel10 <- lm(negative_strong~M, data = R_Data)
rmodel11 <- lm(positive_strong~M, data = R_Data)
rmodel12 <- lm(exemption~M, data = R_Data)
rmodel13 <- lm(example~M, data = R_Data)
rmodel14 <- lm(restriction~M, data = R_Data)
rmodel15 <- lm(advice~M, data = R_Data)
rmodel16 <- lm(action~M, data = R_Data)
rmodel17 <- lm(framework~M, data = R_Data)
summary(rmodel10)
summary(rmodel11)
summary(rmodel12)
summary(rmodel13)
summary(rmodel14)
summary(rmodel15)
summary(rmodel16)
summary(rmodel17)
```
## Average linguistic characteristics between documents: Mandatory or Voluntary, subset by DOC_TYPE (ESG)
After examining the average linguistic score between mandatory and voluntary, this difference is examined in more detail by making a distinction in DOC_TYPE. So, if it is an ESG, G, or E document. Because the relative frequency is used, differences in document size do not influence the measurement.
```{r}
R_DOC <- R_Data %>%
group_by(DOC_TYPE, M) %>%
summarize(average_negative_strong=mean(negative_strong),
average_positive_strong=mean(positive_strong),
average_exemption=mean(exemption),
average_example=mean(example),
average_restriction=mean(restriction),
average_advice=mean(advice),
average_action=mean(action),
average_framework=mean(framework),
average_cdp=mean(cdp),
average_cdsb=mean(cdsb),
average_gri=mean(gri),
average_sasb=mean(sasb),
average_tcfd=mean(tcfd),
average_iirc=mean(iirc),
average_sdg=mean(sdg),
median_negative_strong=median(negative_strong),
median_positive_strong=median(positive_strong),
median_exemption=median(exemption),
median_example=median(example),
median_restriction=median(restriction),
median_advice=median(advice),
median_action=median(action),
median_framework=median(framework),
median_cdp=median(cdp),
median_cdsb=median(cdsb),
median_gri=median(gri),
median_sasb=median(sasb),
median_tcfd=median(tcfd),
median_iirc=median(iirc),
median_sdg=median(sdg))%>% ungroup()
R_DOC
```
Again, the significance between certain groups on doc level is examined. The differences that are examined are ESG(M)-ESG(V), ESG(M)-G(M), ESG(V)-E(V).
```{r}
# Create sub-sample
ESG_R_DOC <- R_Data[R_Data$DOC_TYPE=="ESG", ]
M_R_DOC <- R_Data[R_Data$M=="1" & R_Data$DOC_TYPE=="ESG" | R_Data$M=="1" &
R_Data$DOC_TYPE=="G", ]
V_R_DOC <- R_Data[R_Data$M=="0" & R_Data$DOC_TYPE=="ESG" | R_Data$M=="0" &
R_Data$DOC_TYPE=="E", ]
# ESG mandatory vs ESG Voluntary #########################
ermodel10 <- lm(negative_strong~M, data = ESG_R_DOC)
ermodel11 <- lm(positive_strong~M, data = ESG_R_DOC)
ermodel12 <- lm(exemption~M, data = ESG_R_DOC)
ermodel13 <- lm(example~M, data = ESG_R_DOC)
ermodel14 <- lm(restriction~M, data = ESG_R_DOC)
ermodel15 <- lm(advice~M, data = ESG_R_DOC)
ermodel16 <- lm(action~M, data = ESG_R_DOC)
ermodel17 <- lm(framework~M, data = ESG_R_DOC)
summary(ermodel10)
summary(ermodel11)
summary(ermodel12)
summary(ermodel13)
summary(ermodel14)
summary(ermodel15)
summary(ermodel16)
summary(ermodel17)
# ESG mandatory vs G Mandatory #########################
ermodelx10 <- lm(negative_strong~DOC_TYPE, data = M_R_DOC)
ermodelx11 <- lm(positive_strong~DOC_TYPE, data = M_R_DOC)
ermodelx12 <- lm(exemption~DOC_TYPE, data = M_R_DOC)
ermodelx13 <- lm(example~DOC_TYPE, data = M_R_DOC)
ermodelx14 <- lm(restriction~DOC_TYPE, data = M_R_DOC)
ermodelx15 <- lm(advice~DOC_TYPE, data = M_R_DOC)
ermodelx16 <- lm(action~DOC_TYPE, data = M_R_DOC)
ermodelx17 <- lm(framework~DOC_TYPE, data = M_R_DOC)
summary(ermodelx10)
summary(ermodelx11)
summary(ermodelx12)
summary(ermodelx13)
summary(ermodelx14)
summary(ermodelx15)
summary(ermodelx16)
summary(ermodelx17)
# ESG voluntary vs E voluntary #########################
ermodelyx10 <- lm(negative_strong~DOC_TYPE, data = V_R_DOC)
ermodelyx11 <- lm(positive_strong~DOC_TYPE, data = V_R_DOC)
ermodelyx12 <- lm(exemption~DOC_TYPE, data = V_R_DOC)
ermodelyx13 <- lm(example~DOC_TYPE, data = V_R_DOC)
ermodelyx14 <- lm(restriction~DOC_TYPE, data = V_R_DOC)
ermodelyx15 <- lm(advice~DOC_TYPE, data = V_R_DOC)
ermodelyx16 <- lm(action~DOC_TYPE, data = V_R_DOC)
ermodelyx17 <- lm(framework~DOC_TYPE, data = V_R_DOC)
#frameworks separated
fermodelyx11 <- lm(cdp~DOC_TYPE, data = V_R_DOC)
fermodelyx12 <- lm(cdsb~DOC_TYPE, data = V_R_DOC)
fermodelyx13 <- lm(gri~DOC_TYPE, data = V_R_DOC)
fermodelyx14 <- lm(sasb~DOC_TYPE, data = V_R_DOC)
fermodelyx15 <- lm(tcfd~DOC_TYPE, data = V_R_DOC)
fermodelyx16 <- lm(iirc~DOC_TYPE, data = V_R_DOC)
fermodelyx17 <- lm(sdg~DOC_TYPE, data = V_R_DOC)
summary(ermodelyx10)
summary(ermodelyx11)
summary(ermodelyx12)
summary(ermodelyx13)
summary(ermodelyx14)
summary(ermodelyx15)
summary(ermodelyx16)
summary(ermodelyx17)
summary(fermodelyx11)
summary(fermodelyx12)
summary(fermodelyx13)
summary(fermodelyx14)
summary(fermodelyx15)
summary(fermodelyx16)
summary(fermodelyx17)
```
## Average Linguistic Characteristics: Mandatory vs Voluntary, subset by Group Type
As a final part of the analysis, the differences between mandatory and voluntary are examined, while sub-setting at group type. The concept of grouping documents is already explained in the Quantity analysis part of this document. By looking at averages within a group, the overall linguistic characteristics of documents can be examined. So, a conclusion can be drawn on how restrictive mandatory ESG documentation compared to voluntary ESG documentation is.
```{r}
# Group the data by Group_ID
Group_R <- R_Data %>%
group_by(GROUP_ID, GROUP_TYPE, M) %>%
summarize(negative_strong=sum(negative_strong),
positive_strong=sum(positive_strong),
exemption=sum(exemption),
example=sum(example),
restriction=sum(restriction),
advice=sum(advice),
action=sum(action),
framework=sum(framework),
cdp=sum(cdp),
cdsb=sum(cdsb),
gri=sum(gri),
sasb=sum(sasb),
tcfd=sum(tcfd),
iirc=sum(iirc),
sdg=sum(sdg))%>% ungroup()
# Get summary statistics by group type and by M
Group_Restrictions_Stats <- Group_R %>%
group_by(GROUP_TYPE, M) %>%
summarize(average_negative_strong=mean(negative_strong),
average_positive_strong=mean(positive_strong),
average_exemption=mean(exemption),
average_example=mean(example),
average_restriction=mean(restriction),
average_advice=mean(advice),
average_action=mean(action),
average_framework=mean(framework),
average_cdp=mean(cdp),
average_cdsb=mean(cdsb),
average_gri=mean(gri),
average_sasb=mean(sasb),
average_tcfd=mean(tcfd),
average_iirc=mean(iirc),
average_sdg=mean(sdg),
median_negative_strong=median(negative_strong),
median_positive_strong=median(positive_strong),
median_exemption=median(exemption),
median_example=median(example),
median_restriction=median(restriction),
median_advice=median(advice),
median_action=median(action),
median_framework=median(framework),
median_cdp=median(cdp),
median_cdsb=median(cdsb),
median_gri=median(gri),
median_sasb=median(sasb),
median_tcfd=median(tcfd),
median_iirc=median(iirc),
median_sdg=median(sdg)) %>% ungroup()
# Get summary statistics by M
Group_Restrictions_total <- Group_R %>%
group_by(M) %>%
summarize(average_negative_strong=mean(negative_strong),
average_positive_strong=mean(positive_strong),
average_exemption=mean(exemption),
average_example=mean(example),
average_restriction=mean(restriction),
average_advice=mean(advice),
average_action=mean(action),
average_framework=mean(framework),
average_cdp=mean(cdp),
average_cdsb=mean(cdsb),