-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSupplemental.Rmd
1092 lines (627 loc) · 39 KB
/
Supplemental.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: "Rethinking Stakeholder Engagement: A Multidimensional Framework Inspired by Meta-Analysis of Food, Energy, and Water Research"
author: "-"
date: "`r Sys.Date()`"
output:
pdf_document:
toc: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
\newpage
# Supplemental Materials Summary
The benefits for involving stakeholders in research projects are well established. We investigated recent papers related to food-energy-water systems to assess whether stakeholders were engaged, when they were engaged, which stakeholders were involved, the level of their involvement, whether the needs of stakeholders were considered, and whether stakeholder engagement was evaluated and monitored. Stakeholder engagement theory and research suggest that stakeholder engagement is effective only when it is considered as an integrated process, but our review suggests that this is not common practice. We developed a framework to assist scientists in engaging stakeholders in an integrated and thoughtful manner. Our framework includes six dimensions: 1. When should stakeholders be engaged and for how long? 2. Who should be engaged (identification and diversity)? 3. What role should stakeholders play? 4. How can researchers meet stakeholder needs? 5. What methods of engagement should be used? 6. How to evaluate and monitor the engagement?
We conducted two literature searches: an initial search in 2020 and a follow-up search in 2023 to capture literature published between 2020 and 2023. We conducted the searches in two different online databases, ScienceDirect and WorldCat, to ensure a comprehensive identification of relevant literature. We identified 177 publications from our initial search and 540 publications in our follow up search, resulting in a total of 717 publications. We then manually screened the papers and removed additional papers that did not meet the criteria above on reading the manuscript, resulting in 489 total papers for analysis.
This supplemental materials provides:
* A summary of the variables quantified from the literature reviews;
* Chi-square testing of whether a solution was proposed or not vs. 1) stakeholder engagement as well as 2) whether a computational model was used;
* Summary statistics graphs of the literature analysis; and
* Regression and odds ratio testing for a variety of factors
```{r echo=FALSE, warning=FALSE, message=FALSE}
library(ggplot2)
library(epiDisplay)
crcdata <- read.csv("./data/crc_data_ES2.csv")
#set YN to 01
require(dplyr)
crcdata <- crcdata %>%
mutate(solution_proposed_YN = ifelse(solution_proposed_YN == "N",0,1))
require(dplyr)
crcdata <- crcdata %>%
mutate(solution_implemented_YN = ifelse(solution_implemented_YN == "N",0,1))
require(dplyr)
crcdata <- crcdata %>%
mutate(S_stakeholder_engagment_YN = ifelse(S_stakeholder_engagment_YN == "N",0,1))
#fix colnames
names(crcdata)[names(crcdata) == 'STE_IAP2_NA'] <- 'STE_IAP2_data_gathering'
names(crcdata)[names(crcdata) == 'G_na'] <- 'G_nogeography'
names(crcdata)[43] <- "SC_researcher"
names(crcdata)[51] <- "G_notdescribed"
```
\newpage
# Variable Summary
Below is a list of the categorical variables generated from the literature reviews
```{r echo=FALSE, warning=FALSE, message=FALSE}
library(knitr)
library(kableExtra)
df <- data.frame(Variables = c("Year", "Solution Proposed", "Solution Implemented", "Solution Type", "Computational Model Used", "Researcher Type", "Stakeholder Type", "Stakeholder Engagment Scale - Ghodsvali", "Stakeholder Engagment Scale - IAP2", "Stakeholder Engagement Scale - Local", "Geographical Type"), Description = linebreak(c("Year of citation", "Was a solution proposed?", "Was a solution implemented?","If a solution was proposed, what was the solution type? Groups include: Technology, Policy, Institutional, Social, Economic, Ecological, and Educational.", "Was a computational model used?", "What was the research type? Groups include: NGO, English, Math, Computer Science, Physics, Engineering, Interdisciplinary, Social Science, Economics, Agriculture, and Other","What was the stakeholder type? Groups include: Farmers, Combined Government, Combined Coalition, Combined Industry, Migrants, Youth, Public, Univerity, and Experts", "If a stakeholder was engaged, categorization of the engagement using the Ghodsvali scale. Groups include: Nominal, Instrumental, Representation, and Transformative", "If a stakeholder was engaged, categorization of the engagement using the IAP2 scale. Groups include: Data Gathering, Inform, Consult, Involve, Collaborate, and Empower", "If a stakeholder was engaged, categorization of the engagement using a customized scale. Groups include: Researcher, Data Gathering, Inform, Perspectives, Planning, Identify, Envision, and Implement", "What the geography type? Groups include: Not Described, Local, Regional, National, Multinational, Global, and No Geography")))
kable(df, col.names = c("Variable Name", "Description"), escape = F, caption = "Table T1: Variable Descriptions") %>% column_spec(2, width = "2in") %>% column_spec(c(1:2), width = "2.5in") %>% kable_styling(full_width = FALSE,latex_options = c("hold_position", "scale_down"), font_size = 8) %>% collapse_rows(columns = 2) %>% kable_classic_2(full_width = F) %>% row_spec(0,bold=TRUE)
```
<!-- \newpage -->
<!-- # Variable Summary REFINED -->
<!-- Below is a list of the categorical variables generated from the literature reviews REFINED -->
<!-- ```{r echo=FALSE, warning=FALSE, message=FALSE} -->
<!-- library(knitr) -->
<!-- library(kableExtra) -->
<!-- df <- data.frame(Variables = c("Year", "Solution Proposed", "Solution Implemented", "Stakeholder Type", "Stakeholder Engagment Scale - Ghodsvali", "Stakeholder Engagment Scale - IAP2", "Stakeholder Engagement Scale - Local"), Description = linebreak(c("Year of citation", "Was a solution proposed?", "Was a solution implemented?","What was the stakeholder type? Groups include: Farmers, Combined Government, Combined Coalition, Combined Industry, Migrants, Youth, Public, Univerity, and Experts", "If a stakeholder was engaged, categorization of the engagement using the Ghodsvali scale. Groups include: Nominal, Instrumental, Representation, and Transformative", "If a stakeholder was engaged, categorization of the engagement using the IAP2 scale. Groups include: Data Gathering, Inform, Consult, Involve, Collaborate, and Empower", "If a stakeholder was engaged, categorization of the engagement using a customized scale. Groups include: Researcher, Data Gathering, Inform, Perspectives, Planning, Identify, Envision, and Implement"))) -->
<!-- kable(df, col.names = c("Variable Name", "Description"), escape = F, caption = "Table T1: Variable Descriptions") %>% column_spec(2, width = "2in") %>% column_spec(c(1:2), width = "2.5in") %>% kable_styling(full_width = FALSE,latex_options = c("hold_position", "scale_down"), font_size = 8) %>% collapse_rows(columns = 2) %>% kable_classic_2(full_width = F) %>% row_spec(0,bold=TRUE) -->
<!-- ``` -->
\newpage
# Chi-Square Testing
## Chi Square Testing: solution proposed or not vs. vs. stakeholder engagement
Chi Square and Fishers Exact Test on contingency table with Solution/No Solution as the explanatory variable, and engaged stakeholder/did not engage stakeholder as the response variable.
**ChiSquare = 26: Fishers Exact Test Odds Ratio: 10: Not Independent**
Both chi square and fishers exact test were significant, with a chi square approximation of ~26, which is well above the critical value (3.84 with one degree of freedom). Fishers Exact Test returned an odds ratio of ~10. The alternative hypothesis: true odds ratio is not equal to 1, therefore the null hypothesis is rejected - the groups are not independent.
The Fishers Exact Test defaults to associating the odds ratio (which can represent effect size) with the first cell. In this instance "The odds of having a solution is 10 times that for an engaged stakeholder". You could flip the response and explanatory variables, but the odds ratio would stay the same.
For more info on this topic see: Kim HY. Statistical notes for clinical researchers: Chi-squared test and Fisher's exact test. Restor Dent Endod. 2017 May;42(2):152-155. doi: 10.5395/rde.2017.42.2.152. Epub 2017 Mar 30. PMID: 28503482; PMCID: PMC5426219.
```{r, echo=FALSE}
library(Barnard)
crcdata$solution_proposed_YN <- as.factor(crcdata$solution_proposed_YN)
crcdata$S_stakeholder_engagment_YN <- as.factor(crcdata$S_stakeholder_engagment_YN)
crcdata$solution_implemented_YN <- as.factor(crcdata$solution_implemented_YN)
levels(crcdata$S_stakeholder_engagment_YN) = c("N", "Y")
levels(crcdata$S_stakeholder_engagment_YN) = c("N", "Y")
levels(crcdata$solution_proposed_YN) = c("N", "Y")
levels(crcdata$solution_implemented_YN) = c("N", "Y")
crcdata_table <- table(crcdata$solution_proposed_YN, crcdata$S_model_YN)
colnames(crcdata_table) <- c("M", "NM")
#custom add
crcdata_table <- rbind(crcdata_table[2,], crcdata_table[1,])
crcdata_table[1,] <- rev(crcdata_table[1,])
solution_stakeholder <- crcdata_table
# solution_stakeholder <-
# as.matrix(
# read.table(text=
# " E NE
# S 14 4
# NS 76 400",
# header=TRUE,
# row.names=1)
# )
names(dimnames(solution_stakeholder)) <- c('solution','stakeholder')
solution_stakeholder
solution_stakeholder <- as.table(solution_stakeholder)
summary(solution_stakeholder)
fisher.test(solution_stakeholder)
btest <- c(solution_stakeholder[1,1:2], solution_stakeholder[2,1:2])
barnard.test(13,5,95,370)
```
\newpage
## Chi Square Testing: solution proposed or not vs. computational model used or not?
Chi Square and Fishers Exact Test on the contingency table with solution proposed (solution/no solution) as the explanatory variable, and whether a computational model used (model/no model) as the response variable.
**ChiSquare = .57: Fishers Exact Test Odds Ratio = .668: Independent**
Both chi square and fishers exact test (FET) were insignificant/borderline, with a chi square approximation of ~.57, which is well below to the critical value (3.84 for one degree of freedom). FET returned an odds ratio of under 1, therefore the null is accepted - the groups are independent.
The FET defaults to associating the odds ratio (which can represent effect size) with the first cell. In this instance "The odds of having a solution is .67 times that for having a model". You could flip the response and explanatory variables, but the odds ratio would stay the same.
```{r, echo=FALSE}
library(Barnard)
crcdata$S_model_YN <- as.factor(crcdata$S_model_YN)
crcdata$S_model_YN <- factor(crcdata$S_model_YN, levels = c("Y", "N"))
crcdata_table <- table(crcdata$solution_proposed_YN, crcdata$S_model_YN)
colnames(crcdata_table) <- c("M", "NM")
crcdata_table <- rbind(crcdata_table[2,], crcdata_table[1,])
#crcdata_table[2,] <- rev(crcdata_table[2,])
solution_model <-
crcdata_table
# solution_model <-
# as.matrix(
# read.table(text=
# " M NM
# S 11 7
# NS 377 94",
# header=TRUE,
# row.names=1)
# )
names(dimnames(solution_model)) <- c('solution','model')
solution_model
solution_model <- as.table(solution_model)
summary(solution_model)
fisher.test(solution_model)
barnard.test(13,5,370,95)
```
\newpage
# Summary Statistics Graphs
## Were solutions proposed in the set of all papers?
```{r echo=FALSE, warning=FALSE, message=FALSE}
ggplot(crcdata,aes(x=solution_proposed_YN, fill=year)) + ggtitle("Solution Proposed: Y=18") + labs(x="Was a solution proposed?") +
geom_bar(stat = "count", position = "dodge", fill="#99CC99") + theme_minimal() + theme_minimal()+
theme(text = element_text(),
axis.text.x = element_text(angle = 0, hjust = 1))
```
\newpage
## Were solutions implemented in the set of all papers?
```{r echo=FALSE, warning=FALSE, message=FALSE}
ggplot(crcdata,aes(x=solution_implemented_YN, fill=year)) + ggtitle("Solution Implemented: Y=11") + labs(x="Was a solution implemented?") + geom_bar(stat = "count", position = "dodge", fill="#99CC99") + theme_minimal()+
theme(text = element_text(),
axis.text.x = element_text(angle = 0, hjust = 1))
```
\newpage
## What were the solution types?
```{r echo=FALSE, warning=FALSE, message=FALSE}
# par(mar = c(8,4,4,4))
# plot3 <- barplot(colSums(crcdata[,4:10]), las=2, main="Solution Types: N=18", names.arg = c("Technological", "Policy", "Institutional", "Social", "Economic", "Ecological", "Educational"))
plot3_data <- colSums(crcdata[,4:10])
p3a <- as.data.frame(plot3_data)
p3a$group <- c("Technological", "Policy", "Institutional", "Social", "Economic", "Ecological", "Educational")
#
ggplot(p3a, aes(x=group, y=plot3_data)) + geom_bar(stat="identity",fill="#99CC99") + theme_bw() + theme(axis.text.x = element_text(angle = 90, vjust = 1, hjust=1)) +
xlab("Solution Types") + ylab("Count")
```
\newpage
## Was a computational model used?
```{r echo=FALSE, warning=FALSE, message=FALSE}
ggplot(crcdata,aes(x=S_model_YN, fill=year)) + ggtitle("Computational Model Used: Y=366") + labs(x="Was a computational model used?") +
geom_bar(stat = "count", position = "dodge", fill="#99CC99") + theme_minimal()
```
\newpage
## Were stakeholders engaged?
```{r echo=FALSE, warning=FALSE, message=FALSE}
# nrow(subset(crcdata, solution_proposed_YN == "1"))/nrow(subset(crcdata, solution_proposed_YN == "0"))
#
# nrow(subset(crcdata, solution_implemented_YN == "1"))/nrow(subset(crcdata, solution_implemented_YN == "0"))
#stakeholder
#par(mar = c(4,4,4,4))
#barplot(table(crcdata$S_stakeholder_engagment_YN), main = "Stakeholder Engagment: Y=92")
ggplot(crcdata,aes(x=S_stakeholder_engagment_YN, fill=year)) + ggtitle("Stakeholder Engagement: YES=92") + labs(x="Were stakeholders engaged?") +
geom_bar(stat = "count", position = "dodge", fill="#99CC99") + theme_minimal()
```
\newpage
## All FEWS papers by year
```{r echo=FALSE, warning=FALSE, message=FALSE}
#year
crcdata_remove2011 <- subset(crcdata, year != "2011")
ggplot(crcdata_remove2011, aes(x=year)) +
geom_bar(stat="count")+theme_bw() + scale_x_continuous(breaks = crcdata$year) +
geom_bar(stat = "count", position = "dodge", fill="#99CC99") + theme_minimal()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
```
```{r echo=FALSE, warning=FALSE, message=FALSE, results=FALSE}
#year
png("./images/fews_year.png", res=300, width = 1500, height = 1500 )
ggplot(crcdata_remove2011, aes(x=year)) +
geom_bar(stat="count")+theme_bw() + scale_x_continuous(breaks = crcdata$year) +
geom_bar(stat = "count", position = "dodge", fill="#99CC99") + theme_minimal() + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
dev.off()
```
\newpage
## Level of stakeholder engagement by year - Ghodsvali scale
```{r echo=FALSE, warning=FALSE, message=FALSE}
#year
library(dplyr)
crcdata_new <- crcdata %>%
mutate(ghodsvali = sprintf("%d_%d_%d_%d", STE_G_nominal, STE_G_instrumental, STE_G_representation, STE_G_transformative))
crcdata_new <- crcdata_new[!(crcdata_new$ghodsvali %in% "0_0_0_0"),]
library(dplyr)
crcdata_new <- crcdata_new %>%
mutate(ghodsvali = recode(ghodsvali, '0_0_0_0' = 'none', '1_0_0_0' = 'nominal', '0_1_0_0' = 'instrumental', '0_0_1_0' = 'representative', '0_0_0_1' = 'transformative' ))
crcdata_new$ghodsvali <- as.factor(crcdata_new$ghodsvali)
crcdata_new$ghodsvali <- factor(crcdata_new$ghodsvali, levels = c("nominal", "instrumental", "representative", "transformative"))
my_colors <- c("#99CC99", "#669999", "#6666CC", "#CC9966")
ggplot(crcdata_new, aes(fill=ghodsvali, x=year)) +
geom_bar(position="stack", stat="count")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + scale_x_continuous(breaks = crcdata_new$year) + scale_fill_manual(values = my_colors) + scale_fill_discrete(name = "Ghodsvali Scale")
```
```{r echo=FALSE, warning=FALSE, message=FALSE, results=FALSE}
png("./images/fews_ghodsvali.png", res=300, width = 1500, height = 1500 )
ggplot(crcdata_new, aes(fill=ghodsvali, x=year)) +
geom_bar(position="stack", stat="count")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + scale_x_continuous(breaks = crcdata_new$year) + scale_fill_manual(values = my_colors) + scale_fill_discrete(name = "Ghodsvali Scale")
dev.off()
```
\newpage
## Level of stakeholder engagement by year - IAP2 scale
```{r echo=FALSE, warning=FALSE, message=FALSE}
#year
library(dplyr)
crcdata_new <- crcdata %>%
mutate(IAP2 = sprintf("%d_%d_%d_%d_%d_%d", STE_IAP2_data_gathering,STE_IAP2_inform,STE_IAP2_consult,STE_IAP2_involve,STE_IAP2_collab,STE_IAP2_empower))
crcdata_new <- crcdata_new[!(crcdata_new$IAP2 %in% "0_0_0_0_0_0"),]
library(dplyr)
crcdata_new <- crcdata_new %>%
mutate(IAP2 = recode(IAP2, '1_0_0_0_0_0' = 'data gathering', '0_1_0_0_0_0' = 'inform', '0_0_1_0_0_0' = 'consult', '0_0_0_1_0_0' = 'involve', '0_0_0_0_1_0' = 'collab', '0_0_0_0_0_1' = 'empower'))
crcdata_new$IAP2 <- as.factor(crcdata_new$IAP2)
crcdata_new$IAP2 <- factor(crcdata_new$IAP2, levels = c("data gathering", "inform", "consult", "involve", "collab", "empower"))
my_colors <- c("#99CC99", "#669999", "#6666CC", "#9966CC", "#CC9966", "#FFCC66")
ggplot(crcdata_new, aes(fill=IAP2, x=year)) +
geom_bar(position="stack", stat="count")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + scale_x_continuous(breaks = crcdata_new$year) + scale_fill_manual(values = my_colors) + scale_fill_discrete(name = "IAP2 Scale")
```
```{r echo=FALSE, warning=FALSE, message=FALSE, results=FALSE}
png("./images/fews_iap2.png", res=300, width = 1500, height = 1500 )
ggplot(crcdata_new, aes(fill=IAP2, x=year)) +
geom_bar(position="stack", stat="count")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + scale_x_continuous(breaks = crcdata_new$year) + scale_fill_manual(values = my_colors) + scale_fill_discrete(name = "IAP2 Scale")
dev.off()
```
\newpage
## Level of stakeholder engagement by year - Local scale
```{r echo=FALSE, warning=FALSE, message=FALSE}
#year
library(dplyr)
crcdata_new <- crcdata %>%
mutate(local = sprintf("%d_%d_%d_%d_%d_%d_%d_%d", SC_researcher,SC_datagathering,SC_inform,SC_perspectives,SC_plan,SC_identify,SC_envision,SC_implement))
crcdata_new <- crcdata_new[!(crcdata_new$local %in% "0_0_0_0_0_0_0_0"),]
library(dplyr)
crcdata_new <- crcdata_new %>%
mutate(local = dplyr::recode(local, '1_0_0_0_0_0_0_0' ='researcher', '0_1_0_0_0_0_0_0'='data gathering', '0_0_1_0_0_0_0_0' = 'inform', '0_0_0_1_0_0_0_0' = 'perspectives', '0_0_0_0_1_0_0_0' = 'plan', '0_0_0_0_0_1_0_0' = 'identify', '0_0_0_0_0_0_1_0' = 'envision', '0_0_0_0_0_0_0_1' = 'implement', '1_0_0_0_0_0_0_1' ='researcher', '1_1_0_0_0_0_0_0' ='researcher' ))
crcdata_new$local <- as.factor(crcdata_new$local)
crcdata_new$local <- factor(crcdata_new$local, levels = c("researcher", "data gathering", "inform", "perspectives", "plan", "identify", "envision", "implement"))
my_colors <- c("#66FF33", "#339900", "#99CC99", "#669999", "#6666CC", "#9966CC", "#CC9966", "#FFCC66")
ggplot(crcdata_new, aes(fill=local, x=year)) +
geom_bar(position="stack", stat="count")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + scale_x_continuous(breaks = crcdata_new$year) + scale_fill_manual(values = my_colors)+ scale_fill_discrete(name = "Local Scale")
```
\newpage
## Stakeholder engagement by year
```{r echo=FALSE, warning=FALSE, message=FALSE}
#year
library(dplyr)
crcdata_st <- read.csv("./data/crc_data_ES2.csv")
my_colors <- c("#99CC99", "#CC9966")
crcdata_stremove2011 <- subset(crcdata_st, year != "2011")
colnames(crcdata_stremove2011)[22] <- "Stakeholder Engagement"
ggplot(crcdata_stremove2011, aes(fill=`Stakeholder Engagement`, x=year)) +
geom_bar(position="stack", stat="count")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + scale_x_continuous(breaks = crcdata_st$year) + guides(col=guide_legend("Stakeholder Engagement? Yes or No")) + scale_fill_manual(values = my_colors)
```
\newpage
<!-- ## Level of Stakeholder Engagement by Year - Local -->
```{r echo=FALSE, warning=FALSE, message=FALSE}
#year
# library(dplyr)
#
# crcdata_new <- crcdata %>%
# mutate(IAP2 = sprintf("%d_%d_%d_%d_%d_%d", STE_IAP2_data_gathering,STE_IAP2_inform,STE_IAP2_consult,STE_IAP2_involve,STE_IAP2_collab,STE_IAP2_empower))
#
# crcdata_new <- crcdata_new[!(crcdata_new$IAP2 %in% "0_0_0_0_0_0"),]
#
# library(dplyr)
# crcdata_new <- crcdata_new %>%
# mutate(IAP2 = recode(IAP2, '1_0_0_0_0_0' = 'data gathering', '0_1_0_0_0_0' = 'inform', '0_0_1_0_0_0' = 'consult', '0_0_0_1_0_0' = 'involve', '0_0_0_0_1_0' = 'collab', '0_0_0_0_0_1' = 'empower'))
#
# ggplot(crcdata_new, aes(fill=IAP2, x=year)) +
# geom_bar(position="stack", stat="count")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + scale_x_continuous(breaks = crcdata_new$year)
```
\newpage
## Researcher types
```{r echo=FALSE, warning=FALSE, message=FALSE}
#researcher
df <- t(t(colSums(crcdata[,12:17])))
df <- df[order(df[,1], decreasing = TRUE),]
par(mar = c(6,4,4,4))
#barplot(df, las=2, main = "Researcher Types")
df <- data.frame(df)
rownames(df) <- c("Engineering", "Physics", "Imterdisciplinary", "Computer Science", "Math", "NGO")
df$group <- row.names(df)
df$group <- factor(df$group, levels=c("Engineering", "Physics", "Imterdisciplinary", "Computer Science", "Math", "NGO"))
ggplot(df, aes(x=group, y=df)) +
geom_bar(stat='identity', fill="#99CC99")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + guides(col=guide_legend("Researcher Types")) +labs(y= "Count", x = "Researcher Type")
```
\newpage
## Stakeholder types
```{r echo=FALSE, warning=FALSE, message=FALSE}
#stakeholder types
df <- t(t(colSums(crcdata[,23:32])))
df <- df[order(df[,1], decreasing = TRUE),]
par(mar = c(11,4,4,4))
#barplot(df, las=2, main = "Stakeholder Types")
df <- data.frame(df)
rownames(df) <- c("Combined Government", "Combined Industry", "Farmers", "University", "Combined Coalition", "Public", "Experts", "Tribal Nations", "Youth", "Migrants")
df$group <- row.names(df)
df$group <- factor(df$group, levels=c("Combined Government", "Combined Industry", "Farmers", "University", "Combined Coalition", "Public", "Experts", "Tribal Nations", "Youth", "Migrants"))
ggplot(df, aes(x=group, y=df)) +
geom_bar(stat='identity', fill="#99CC99")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + guides(col=guide_legend("Stakeholder Types")) +labs(y= "Count", x = "Stakeholder Type")
```
\newpage
## Ghodsvali scale breakdown
```{r echo=FALSE, warning=FALSE, message=FALSE}
#ghodsvali scale
df <- t(t(colSums(crcdata[,33:36])))
df <- df[order(df[,1]),]
par(mar = c(11,4,4,4))
#barplot(c(df[3], df[4], df[2], df[1]), las=2, main="Ghodsvali Scale Breakdown")
df <- data.frame(df)
rownames(df) <- c("Transformative", "Representation", "Nominal", "Instrumental")
df$group <- row.names(df)
library(dplyr)
# create a vector with letters in the desired order
x <- c("Nominal", "Instrumental", "Representation", "Transformative" )
df <- df %>%
slice(match(x, group))
#rownames(df) <- c("Transformative", "Representation", "Nominal", "Instrumental")
#df$group <- row.names(df)
#df <- c(df[3,], df[4,], df[2,], df[1,])
df$group <- factor(df$group, levels=c("Nominal", "Instrumental", "Representation", "Transformative"))
ggplot(df, aes(x=group, y=df)) +
geom_bar(stat='identity', fill="#99CC99")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + guides(col=guide_legend("Ghodsvali Scale Breakdown")) +labs(y= "Count", x = "Ghodsvali Scale")
```
\newpage
## IAP2 scale breakdown
```{r echo=FALSE, warning=FALSE, message=FALSE}
#IAP2 scale
df <- t(t(colSums(crcdata[,37:42])))
df <- df[order(df[,1], decreasing = TRUE),]
par(mar = c(12,4,4,4))
#barplot(c(df[2], df[6], df[1], df[3], df[4], df[5]), las=2, main = "IAP2 Scale Breakdown")
df <- data.frame(df)
rownames(df) <- c("Consulting", "Data Gathering", "Involve", "Collaborative", "Empowered", "Informed")
df$group <- row.names(df)
library(dplyr)
# create a vector with letters in the desired order
x <- c("Data Gathering", "Informed", "Consulting", "Involve", "Collaborative", "Empowered" )
df <- df %>%
slice(match(x, group))
#rownames(df) <- c("Transformative", "Representation", "Nominal", "Instrumental")
#df$group <- row.names(df)
#df <- c(df[3,], df[4,], df[2,], df[1,])
df$group <- factor(df$group, levels=c("Data Gathering", "Informed", "Consulting", "Involve", "Collaborative", "Empowered"))
ggplot(df, aes(x=group, y=df)) +
geom_bar(stat='identity', fill="#99CC99")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + guides(col=guide_legend("Ghodsvali Scale Breakdown")) +labs(y= "Count", x = "IAP2 Scale")
```
\newpage
## Local scale breakdown
```{r echo=FALSE, warning=FALSE, message=FALSE}
#local scale
df <- t(t(colSums(crcdata[,43:50])))
#df <- df[order(df[,1], decreasing = TRUE),]
#par(mar = c(9,4,4,4))
#barplot(df, las=2, main="Local Scale Breakdown")
#barplot(c(df[1], df[3], df[6], df[8], df[4], df[2], df[5], df[7]), las=2, main="Local Scale")
df <- data.frame(df)
rownames(df) <- c("Researcher", "Data Gathering", "Inform", "Perspectives", "Plan", "Identify", "Envision", "Implement")
df$group <- row.names(df)
library(dplyr)
# create a vector with letters in the desired order
#x <- c("Researcher", "Data Gathering", "Inform", "Envision", "Collaborative", "Empowered" )
#df <- df %>%
# slice(match(x, group))
#rownames(df) <- c("Transformative", "Representation", "Nominal", "Instrumental")
#df$group <- row.names(df)
#df <- c(df[3,], df[4,], df[2,], df[1,])
df$group <- factor(df$group, levels=c("Researcher", "Data Gathering", "Inform", "Perspectives", "Plan", "Identify", "Envision", "Implement"))
ggplot(df, aes(x=group, y=df)) +
geom_bar(stat='identity', fill="#99CC99")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + guides(col=guide_legend("Local Scale Breakdown")) +labs(y= "Count", x = "Local Scale")
```
\newpage
## Geographic location breakdown
```{r echo=FALSE, warning=FALSE, message=FALSE}
#geography
df <- t(t(colSums(crcdata[,52:57])))
df <- df[order(df[,1], decreasing = TRUE),]
par(mar = c(8,4,4,4))
#barplot(df, las=2, main="Geographic Location Breakdown")
df <- data.frame(df)
rownames(df) <- c("Regional", "Local", "National", "No Geography", "Multinational", "Global")
df$group <- row.names(df)
library(dplyr)
# create a vector with letters in the desired order
#x <- c("Researcher", "Data Gathering", "Inform", "Envision", "Collaborative", "Empowered" )
#df <- df %>%
# slice(match(x, group))
#rownames(df) <- c("Transformative", "Representation", "Nominal", "Instrumental")
#df$group <- row.names(df)
#df <- c(df[3,], df[4,], df[2,], df[1,])
df$group <- factor(df$group, levels=c("Regional", "Local", "National", "No Geography", "Multinational", "Global"))
ggplot(df, aes(x=group, y=df)) +
geom_bar(stat='identity', fill="#99CC99")+theme_bw()+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + guides(col=guide_legend("Geography")) +labs(y= "Count", x = "Geography")
```
```{r echo=FALSE, warning=FALSE, message=FALSE}
#Odds of stakeholder scale predicting whether a solution was proposed or not
ghodsvali.fit<-glm(solution_proposed_YN ~STE_G_nominal+STE_G_instrumental+STE_G_representation+STE_G_transformative,family=binomial,data=crcdata)
IAP2.fit<-glm(solution_proposed_YN ~STE_IAP2_data_gathering+STE_IAP2_inform+STE_IAP2_consult+STE_IAP2_involve+STE_IAP2_collab+STE_IAP2_empower,family=binomial,data=crcdata)
local.fit<-glm(solution_proposed_YN ~SC_researcher+SC_datagathering+SC_inform+SC_perspectives+SC_plan+SC_identify+SC_envision+SC_implement,family=binomial,data=crcdata)
```
\newpage
# Regression Testing
## Ghodsvali scale regression
Ghodsvali scale regression testing on whether a solution was proposed or not
```{r echo=FALSE, warning=FALSE, message=FALSE}
summary(ghodsvali.fit)
```
\newpage
## Ghodsvali scale odds
Odds of Ghodsvali scale predicting whether a solution was proposed or not
```{r echo=FALSE, warning=FALSE, message=FALSE}
logistic.display(ghodsvali.fit)
```
\newpage
## IAP2 scale regression
IAP2 scale regression testing on whether a solution was proposed or not
```{r echo=FALSE, warning=FALSE, message=FALSE}
summary(IAP2.fit)
```
\newpage
## IAP2 scale odds
Odds of IAP2 scale predicting whether a solution was proposed or not
```{r echo=FALSE, warning=FALSE, message=FALSE}
logistic.display(IAP2.fit)
```
\newpage
## Local scale regression
Local scale regression predicting whether a solution was proposed or not
```{r echo=FALSE, warning=FALSE, message=FALSE}
summary(local.fit)
```
\newpage
## Local scale odds
Odds of Local scale predicting whether a solution was proposed or not
```{r echo=FALSE, warning=FALSE, message=FALSE}
logistic.display(local.fit)
```
\newpage
## Engagement vs. solution - regression testing
Regression of whether stakeholder engagement (Y/N) predicts if a solution was proposed (Y/N)
```{r echo=FALSE, warning=FALSE, message=FALSE}
#engagement of stakeholders vs. solutions
stakeholder_vs_solutions <-glm(solution_proposed_YN ~S_stakeholder_engagment_YN,family=binomial,data=crcdata)
summary(stakeholder_vs_solutions)
logistic.display(stakeholder_vs_solutions)
```
\newpage
## Engagement vs. solution - odds
Odds of whether stakeholder engagement (Y/N) predicts if a solution was proposed (Y/N)
```{r echo=FALSE, warning=FALSE, message=FALSE}
#engagement of stakeholders vs. solutions
stakeholder_vs_solutions <-glm(solution_proposed_YN ~S_stakeholder_engagment_YN,family=binomial,data=crcdata)
#summary(stakeholder_vs_solutions)
logistic.display(stakeholder_vs_solutions)
```
\newpage
## Use of computational model vs. solution - regression testing
Regression of whether a computational model was used predicts if a solution was proposed (Y/N)
```{r echo=FALSE, warning=FALSE, message=FALSE}
#Use of computational model vs. solutions
model_vs_solutions <-glm(solution_proposed_YN ~S_model_YN,family=binomial,data=crcdata)
summary(model_vs_solutions)
logistic.display(model_vs_solutions)
```
\newpage
## Use of computational model vs. solution - odds
Odds of whether a computational model was used predicts if a solution was proposed (Y/N)
```{r echo=FALSE, warning=FALSE, message=FALSE}
#Use of computational model vs. solutions
model_vs_solutions <-glm(solution_proposed_YN ~S_model_YN,family=binomial,data=crcdata)
#summary(model_vs_solutions)
logistic.display(model_vs_solutions)
```
\newpage
## Diversity of stakeholders vs solution
Regression of whether Diversity of stakeholders predicts if a solution was proposed (Y/N). In order to represent diversity, we have used a simple ratio calcuation which sums the number of stakeholders involved divided by the total number of possible stakeholder options. A ratio which is closer to 1 has a greater level of stakeholder diversity.
```{r echo=FALSE, warning=FALSE, message=FALSE}
#Diversity of stakeholders vs solutions (using ratio)
crcdata$ST_ratio <- rowSums(crcdata[,23:31])/9
stratio_vs_solutions <-glm(solution_proposed_YN ~ ST_ratio,family=binomial,data=crcdata)
summary(stratio_vs_solutions)
#logistic.display(stratio_vs_solutions)
```
\newpage
## Diversity of stakeholders vs solution - odds
Odds whether Diversity of stakeholders predicts if a solution was proposed (Y/N). In order to represent diversity, we have used a simple ratio calcuation which sums the number of stakeholders involved divided by the total number of possible stakeholder options. A ratio which is closer to 1 has a greater level of stakeholder diversity.
```{r echo=FALSE, warning=FALSE, message=FALSE}
#Diversity of stakeholders vs solutions (using ratio)
crcdata$ST_ratio <- rowSums(crcdata[,23:31])/9
stratio_vs_solutions <-glm(solution_proposed_YN ~ ST_ratio,family=binomial,data=crcdata)
#summary(stratio_vs_solutions)
logistic.display(stratio_vs_solutions)
```
\newpage
## Diversity of stakeholders vs solution - full predictors
```{r echo=FALSE, warning=FALSE, message=FALSE}
#Diversity of stakeholders vs solutions (using ratio)
crcdata$ST_ratio <- rowSums(crcdata[,23:31])/10
stratio_vs_solutions <-glm(solution_proposed_YN ~ ST_farmers + ST_combined_gov + ST_combined_coalition + ST_combined_industry + ST_migrants + ST_public + ST_university + ST_experts,family=binomial,data=crcdata)
summary(stratio_vs_solutions)
#logistic.display(stratio_vs_solutions)
```
\newpage
## Diversity of researchers vs solution - regression testing
Regression of whether Diversity of researchers predicts if a solution was proposed (Y/N). In order to represent diversity, we have used a simple ratio calculation which sums the number of researcher types involved, divided by the total number of possible researcher options. A ratio which is closer to 1 has a greater level of researcher diversity.
```{r echo=FALSE, warning=FALSE, message=FALSE}
#Diversity of researchers vs solutions (using ratio)
crcdata$R_ratio <- rowSums(crcdata[,12:21])/10
rratio_vs_solutions <-glm(solution_proposed_YN ~ R_ratio,family=binomial,data=crcdata)
summary(rratio_vs_solutions)
#logistic.display(rratio_vs_solutions)
```
\newpage
## Diversity of researchers vs solution - odds
Odds of whether Diversity of researchers predicts if a solution was proposed (Y/N). In order to represent diversity, we have used a simple ratio calculation which sums the number of researcher types involved, divided by the total number of possible researcher options. A ratio which is closer to 1 has a greater level of researcher diversity.
```{r echo=FALSE, warning=FALSE, message=FALSE}
#Diversity of researchers vs solutions (using ratio)
crcdata$R_ratio <- rowSums(crcdata[,12:21])/10
rratio_vs_solutions <-glm(solution_proposed_YN ~ R_ratio,family=binomial,data=crcdata)
#summary(rratio_vs_solutions)
logistic.display(rratio_vs_solutions)
```
<!-- ## Interdisciplinary Researchers vs Solution - Regression Testing -->
<!-- In order to accurately reflect diversity of researchers, we run a binomial logistic regression of the interdisciplinary researchers category to assess predictability on stakeholder solution (Y/N). -->
<!-- ```{r echo=FALSE, warning=FALSE, message=FALSE} -->
<!-- #Diversity of researchers vs solutions (using ratio) -->
<!-- crcdata$R_ratio <- rowSums(crcdata[,12:21])/10 -->
<!-- rratio_vs_solutions <-glm(solution_proposed_YN ~ R_interdis,family=binomial,data=crcdata) -->
<!-- summary(rratio_vs_solutions) -->
<!-- #logistic.display(rratio_vs_solutions) -->
<!-- ``` -->
\newpage
## Stakeholder type vs level of engagement (Ghodsvali) - regression testing
```{r echo=FALSE, warning=FALSE, message=FALSE}
#stakeholder type vs level of engagement ghodsvali
ST_engagement<-lm(cbind(ST_farmers,ST_combined_gov,ST_tribal,ST_combined_coalition,ST_combined_industry,ST_migrants,ST_youth,ST_public,ST_university,ST_experts)~STE_G_nominal+STE_G_instrumental+STE_G_representation+STE_G_transformative,data=crcdata)
summary(ST_engagement)
```
<!-- \newpage -->
<!-- ## Stakeholder type vs level of engagement (Ghodsvali) -->
<!-- ) -->
<!-- ```{r echo=FALSE, warning=FALSE, message=FALSE} -->
<!-- #stakeholder type vs level of engagement ghodsvali -->
<!-- ST_engagement_ghodsvali<-lm(cbind(ST_farmers,ST_combined_gov,ST_tribal,ST_combined_coalition,ST_combined_industry,ST_migrants,ST_youth,ST_public,ST_university,ST_experts)~STE_G_nominal+STE_G_instrumental+STE_G_representation+STE_G_transformative,data=crcdata) -->
<!-- ``` -->
\newpage
## Stakeholder type vs level of engagement (IAP2) - regression testing
```{r echo=FALSE, warning=FALSE, message=FALSE}
#stakeholder type vs level of engagement IAP2
ST_engagement_IAP2<-lm(cbind(ST_farmers,ST_combined_gov,ST_tribal,ST_combined_coalition,ST_combined_industry,ST_migrants,ST_youth,ST_public,ST_university,ST_experts)~STE_IAP2_data_gathering+STE_IAP2_inform+STE_IAP2_consult+STE_IAP2_involve+STE_IAP2_collab+STE_IAP2_empower,data=crcdata)
summary(ST_engagement_IAP2)
```
\newpage
## Stakeholder type vs level of engagement (local) - regression testing
```{r echo=FALSE, warning=FALSE, message=FALSE}
#stakeholder type vs level of engagement local
ST_engagement_IAP2<-lm(cbind(ST_farmers,ST_combined_gov,ST_tribal,ST_combined_coalition,ST_combined_industry,ST_migrants,ST_youth,ST_public,ST_university,ST_experts)~SC_researcher+SC_datagathering+SC_inform+SC_perspectives+SC_plan+SC_identify+SC_envision+SC_implement,data=crcdata)
summary(ST_engagement_IAP2)
```
\newpage
## Stakeholder type vs solution - regression testing
```{r echo=FALSE, warning=FALSE, message=FALSE}
#stakeholder type vs solution
ST_solution <- glm(solution_proposed_YN~ST_farmers+ST_combined_gov+ST_tribal+ST_combined_coalition+ST_combined_industry+ST_migrants+ST_youth+ST_public+ST_university+ST_experts, family=binomial, data=crcdata)
summary(ST_solution)
```