-
Notifications
You must be signed in to change notification settings - Fork 3
/
analysis-datasharing.Rmd
1944 lines (1486 loc) · 81.2 KB
/
analysis-datasharing.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 Sharing Policies - Analysis"
author: "Analysis by Jessica Minnier, OHSU; github:jminnier"
date: "February 2, 2017"
output:
html_document:
code_folding: hide
number_sections: yes
theme: cerulean
toc: yes
toc_float: yes
---
```{r setup, include=FALSE}
list.of.packages <- c("broom","devtools","dplyr","ggplot2",
"tibble","tidyr","reshape2","stringr","knitr","pander","readxl")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
# install.packages(list.of.packages) # run this if some packages are too old and cause errors
# from http://stackoverflow.com/questions/4090169/elegant-way-to-check-for-missing-packages-and-install-them
library(ggplot2)
library(reshape2)
library(knitr)
library(pander)
library(readxl)
library(tidyverse)
library(tableone)
library(magrittr)
library(irr)
library(janitor)
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, tidy=TRUE, message = FALSE,fig.path = "figs/",fig.keep=TRUE)
```
# Data Processing
Here we read in the data and do some name and format manipulation.
Note, the abbreviation DSM denotes "Data Sharing Mark" and OAM denotes "Open Access Mark."
```{r data_process}
# read journal data
exceldat <- read_excel("../Data-Sharing-Policies_2017-01-25.xlsx", sheet = "Data",
na = "N/A")
jdata <- exceldat[-1,] # remove line of info
jdata <- jdata[-which(is.na(jdata$Journal)),] # remove NAs
# add labels for DSM
dsm_labels = c(
"Required as condition of publication, barring exceptions",
"Required but no explicit statement regarding effect on publication/editorial decisions",
"Explicitly encouraged/addressed, but not required.",
"Mentioned indirectly",
"Only protein, proteomic, and/or genomic data sharing are addressed.",
"No mention"
)
# Recommended Sharing Method
rsm_labels = c(
"Public Online Repository", "Journal Hosted",
"By Reader Request to Authors","Multiple methods equally recommended",
"Unspecified"
)
journal_host_labels = c(
"Journal will host regardless of size",
"Journal has data hosting file/s size limit","Unspecified"
)
# Fix typos:
# One line has an end line character when should be 'b'
jdata$`Copyright/Licensing Mark`[jdata$`Copyright/Licensing Mark`=="b\n"] = "b"
jdata$`Reproducibility Noted Mark`[jdata$`Reproducibility Noted Mark`=="a\n"] = "a"
# Space after an a
jdata$`Archival/Retention Mark`[jdata$`Archival/Retention Mark`=="a "] = "a"
jdata$`Protein, Proteomic, Genomic, or Microaray (Sequence or Structural) Data Sharing Addressed/Required with Deposit to Specific Data Banks`[jdata$`Protein, Proteomic, Genomic, or Microaray (Sequence or Structural) Data Sharing Addressed/Required with Deposit to Specific Data Banks`%in%c("a\n","a ")] = "a"
jdata$`Protein, Proteomic, Genomic, or Microaray (Sequence or Structural) Data Sharing Addressed/Required with Deposit to Specific Data Banks`[jdata$`Protein, Proteomic, Genomic, or Microaray (Sequence or Structural) Data Sharing Addressed/Required with Deposit to Specific Data Banks`%in%c("b\n","b ")] = "b"
# easier shorter names
jdata <- jdata%>%mutate(
citable_2013 = `{2013} Citable Articles`,
citable_2014 = `2014 Citable Items`,
citable_2015 = `2015 Citable Articles`,
dsm=as.numeric(`Data Sharing Mark`),
dsm_fac = factor(dsm,levels = 1:6,
labels=dsm_labels),
dsm2 = 1*(dsm<3),
dsm2_fac = factor(dsm2,levels=0:1,
labels=c("Not Required","Required")),
dsm2_fac_flip = factor(dsm2,levels=c(1,0), # reverse levels for for plotting only
labels=c("Required","Not Required")),
oam=as.numeric(`Open Access Mark`),
oam_fac = factor(oam,levels=0:1,
labels=c("Subscription","Open Access")),
if_2013=`2013 Impact Factor`,
if_2014=`2014 Impact Factor`,
if_2015 = `2015 Impact Factor`,
total_cites_2013 = `2013 Total Cites`,
total_cites_2014 = `2014 Total Cites`,
total_cites_2015 = `2015 Total Cites`,
omic_data_sharing_fac = factor(`Protein, Proteomic, Genomic, or Microaray (Sequence or Structural) Data Sharing Addressed/Required with Deposit to Specific Data Banks`,
levels=c("a","b"),
labels=c("Yes","No")),
rec_pref_sharing_fac = factor(`Recommended/Preferred Sharing Mark`,levels=c("A","B","C","D","E"),
labels=rsm_labels),
journal_hosts_fac = factor(`Size Guidelines if Journal Hosted Provided`,levels=c("a","b","c"),labels=journal_host_labels),
copyright_licensing_fac = factor(`Copyright/Licensing Mark`,levels=c("a","b"),
labels=c("Explicitly stated or mentioned","No Mention")),
archival_retention_fac = factor(`Archival/Retention Mark`,levels=c("a","b"),
labels=c("Explicitly stated","No Mention")),
reproducibility_noted_fac = factor(`Reproducibility Noted Mark`,levels=c("a","b"),
labels=c("Explicitly stated","No Mention"))
)
# create long data for plotting and dplyr
jdata_if_long <- jdata%>%select(Journal,dsm:if_2015)%>%
rename(`2013`=if_2013,`2014`=if_2014,`2015`=if_2015)%>%
gather(year,impact_factor,`2013`:`2015`)
jdata_tc_long <- jdata%>%select(Journal,contains("total_cites"))%>%
rename(`2013`=total_cites_2013,`2014`=total_cites_2014,`2015`=total_cites_2015)%>%
gather(year,total_cites,`2013`:`2015`)
jdata_cit_long <- jdata%>%select(Journal,contains("citable_"))%>%
rename(`2013`=citable_2013,`2014`=citable_2014,`2015`=citable_2015)%>%
gather(year,citable_items,`2013`:`2015`)
jdata_long = left_join(jdata_if_long,jdata_tc_long)
jdata_long = left_join(jdata_long,jdata_cit_long)
```
# Data Summaries and Distributions
We have data from `r nrow(jdata)` journals, including impact factor (IF) and total number of citations in years 2013 and 2014.
Data Sharing Mark (DSM) has 6 categories, and we create a collapsed DSM variable that has two categories for "required" (DSM = 1 or 2) and "not required" (DSM = 3, 4, 5 or 6).
The labels for Data Sharing Mark (DSM) are as follows:
```{r dsmlabel}
kable(tibble("DSM Numeric Value"=1:6,"DSM Description Label"=dsm_labels))
```
## Summary of Continuous Data
```{r}
tmps = summary(jdata%>%select(if_2013:if_2015,
citable_2013:citable_2015,
total_cites_2013:total_cites_2015))
kable(tmps)
```
## TABLE METHODS X: Distribution of Impact Factors for Journal Titles
We include 2013 values in the manuscript and include 2014 values in the appendix.
This is a table categorizing journal impact factor (JIF) into ranges. The number of journals within each range and the percentage of the total number of journals is presented.
### 2013
```{r, results='asis'}
jdata$if_2013_cat = cut(jdata$if_2013,breaks = c(0,2,4,6,8,10,30,43),
include.lowest = TRUE,right = FALSE,
labels = c("<2","2-3.99","4-5.99","6-7.99","8-9.99","10-29.99","30-43")
)
jdata$if_2014_cat = cut(jdata$if_2014,breaks = c(0,2,4,6,8,10,30,43),
include.lowest = TRUE,right = FALSE,
c("<2","2-3.99","4-5.99","6-7.99","8-9.99","10-29.99","30-43")
)
jdata$if_2015_cat = cut(jdata$if_2015,breaks = c(0,2,4,6,8,10,30,43),
include.lowest = TRUE,right = FALSE,
c("<2","2-3.99","4-5.99","6-7.99","8-9.99","10-29.99","30-43")
)
jdata%>%group_by(if_2013_cat)%>%summarize("Number"=n())%>%mutate(
"# (%)"=paste0(Number,"\t(",round(100*Number/nrow(jdata),1),"%)"))%>%select(-Number)%>%
rename("IF 2013 Category"=if_2013_cat)%>%kable()
```
### 2014, 2015
```{r, results='asis'}
tmp = jdata%>%group_by(if_2014_cat)%>%summarize("Number"=n())%>%
mutate(
"2014 # (%)"=paste0(Number,"\t(",round(100*Number/nrow(jdata),1),"%)"))%>%select(-Number)%>%
rename("IF Category"=if_2014_cat)
tmp2 = jdata%>%group_by(if_2015_cat)%>%summarize("Number"=n())%>%
mutate(
"2015 # (%)"=paste0(Number,"\t(",round(100*Number/nrow(jdata),1),"%)"))%>%select(-Number)%>%
rename("IF Category"=if_2015_cat)
#replace NA
left_join(tmp,tmp2)%>%mutate(`IF Category`=ifelse(is.na(`IF Category`),
"Not Reported",as.character(`IF Category`)))%>%kable()
```
## TABLE METHODS X: Distribution of Citable Items for Journal Titles by Category
The total number of citable items per journal is categorized into ranges and the number of journals and percentage of total number of journals in each category is presented.
### 2013
```{r}
my_cut_fun <- function(x) {
cut(x,
breaks=c(0,100,500,1000,32000),
labels=c("<100","100-500",
"500-1000","1000-32000"),right=FALSE)
}
jdata = jdata%>%mutate(citable_2013_cat = my_cut_fun(jdata$citable_2013),
citable_2014_cat = my_cut_fun(jdata$citable_2014),
citable_2015_cat = my_cut_fun(jdata$citable_2015))
jdata%>%group_by(citable_2013_cat)%>%summarize("Number"=n())%>%
mutate(
"# (%)"=paste0(Number,"\t(",round(100*Number/nrow(jdata),1),"%)"))%>%select(-Number)%>%
rename("Total Citable Items 2013 Category"=citable_2013_cat)%>%kable()
```
### 2014, 2015
```{r}
tmp1 = jdata%>%group_by(citable_2014_cat)%>%summarize("Number"=n())%>%
rename(`Total Citable Items Category`=citable_2014_cat)%>%
mutate(
"2014 # (%)"=paste0(Number,"\t(",round(100*Number/nrow(jdata),1),"%)"))%>%select(-Number)
tmp2 = jdata%>%group_by(citable_2015_cat)%>%summarize("Number"=n())%>%
rename(`Total Citable Items Category`=citable_2015_cat)%>%
mutate(
"2015 # (%)"=paste0(Number,"\t(",round(100*Number/nrow(jdata),1),"%)"))%>%select(-Number)
left_join(tmp1,tmp2)%>%mutate(`Total Citable Items Category`=ifelse(is.na(`Total Citable Items Category`),
"Not Reported",
as.character(`Total Citable Items Category`)))%>%kable()
```
## TABLE METHODS X: Distribution of Citable Items for Journal Titles
Min, 25th percentile, mean, median, 75th percentile, and max.
```{r}
tmp1 = jdata_long%>%group_by(year)%>%
summarize_at(vars(citable_items),
funs(Total="sum",Min="min",
Q25 = quantile(.,probs=.25),Mean="mean",Median="median",
Q75 = quantile(.,probs=.75),Max="max"),na.rm=T)%>%
add_column("Journals"="With PLoS One",.after="year")
tmp2 = jdata_long%>%filter(!Journal=="PLoS One")%>%group_by(year)%>%
summarize_at(vars(citable_items),
funs(Total="sum",Min="min",
Q25 = quantile(.,probs=.25),Mean="mean",Median="median",
Q75 = quantile(.,probs=.75),Max="max"),na.rm=T) %>%
add_column("Journals"="Remove PLoS One",.after="year")
tmp = bind_rows(tmp1,tmp2)%>%arrange(Journals,year)
tmp = tmp%>%arrange(desc(Journals),year)
kable(tmp,caption="Citable Items by Year",digits=1)
```
## TABLE: Number of journals per data sharing mark (DSM)
```{r}
tmp = jdata%>%group_by(dsm,dsm_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata))
tmp1 = tmp%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"))%>%
select(-N,-Percent)%>%
rename("DSM"=dsm,"DSM Description"=dsm_fac)
kable(tmp1)
```
## TABLE: Publishing Volume by Data Sharing Mark
```{r}
tmp1 = jdata%>%group_by(dsm,dsm_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2013),
"MedianC"=median(citable_2013,na.rm=T),
"PercentC" = 100*sum(citable_2013)/sum(jdata$citable_2013)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2013" = paste(MedianC," "), # need a space or kable malfunctions
"# Citable Items 2013 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("DSM"=dsm,"DSM Description"=dsm_fac)
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(dsm,dsm_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2013),
"PercentC" = 100*sum(citable_2013)/sum(jdata$citable_2013[!jdata$Journal=="PLoS One"])
)%>%
mutate("# Citable Items 2013, Remove PLoS One (%)" =
paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("DSM"=dsm,"DSM Description"=dsm_fac)
tmp = left_join(tmp1,tmp2)
tmp1 = jdata%>%group_by(dsm,dsm_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2014, na.rm=T),
"MedianC"=median(citable_2014,na.rm=T),
"PercentC" = 100*sum(citable_2014,na.rm=T)/sum(jdata$citable_2014,na.rm=T)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2014" = paste(MedianC," "), # need a space or kable malfunctions
"# Citable Items 2014 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("DSM"=dsm,"DSM Description"=dsm_fac)
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(dsm,dsm_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2014,na.rm=T),
"PercentC" =
100*sum(citable_2014,na.rm=T)/sum(jdata$citable_2014[!jdata$Journal=="PLoS One"],na.rm=T)
)%>%
mutate("# Citable Items 2014, Remove PLoS One (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("DSM"=dsm,"DSM Description"=dsm_fac)
tmp3 = left_join(tmp1,tmp2)
tmp = left_join(tmp,tmp3)
tmp1 = jdata%>%group_by(dsm,dsm_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2015, na.rm=T),
"MedianC"=median(citable_2015,na.rm=T),
"PercentC" = 100*sum(citable_2015,na.rm=T)/sum(jdata$citable_2015,na.rm=T)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2015" = paste(MedianC," "), # need a space or kable malfunctions
"# Citable Items 2015 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("DSM"=dsm,"DSM Description"=dsm_fac)
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(dsm,dsm_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2015,na.rm=T),
"PercentC" =
100*sum(citable_2015,na.rm=T)/sum(jdata$citable_2015[!jdata$Journal=="PLoS One"],na.rm=T)
)%>%
mutate("# Citable Items 2015, Remove PLoS One (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("DSM"=dsm,"DSM Description"=dsm_fac)
tmp3 = left_join(tmp1,tmp2)
tmp = left_join(tmp,tmp3)
#kable(tmp)
tmpt = data_frame("DSM Description"="Total",
"# Journals (%)"=paste0(nrow(jdata)," (100%)"),
"Median # Citable Items per Journal 2013" =as.character(median(jdata$citable_2013)),
"# Citable Items 2013 (%)"=paste0(sum(jdata$citable_2013)," (100%)"),
"# Citable Items 2013, Remove PLoS One (%)"=
paste0(sum(jdata$citable_2013[!jdata$Journal=="PLoS One"])," (100%)"),
"Median # Citable Items per Journal 2014" =as.character(median(jdata$citable_2014,na.rm=T)),
"# Citable Items 2014 (%)"=paste0(sum(jdata$citable_2014,na.rm=T)," (100%)"),
"# Citable Items 2014, Remove PLoS One (%)"=
paste0(sum(jdata$citable_2014[!jdata$Journal=="PLoS One"],na.rm=T)," (100%)"),
"Median # Citable Items per Journal 2015" =as.character(median(jdata$citable_2015,na.rm=T)),
"# Citable Items 2015 (%)"=paste0(sum(jdata$citable_2015,na.rm=T)," (100%)"),
"# Citable Items 2015, Remove PLoS One (%)"=
paste0(sum(jdata$citable_2015[!jdata$Journal=="PLoS One"],na.rm=T)," (100%)")
)
tmpt = bind_rows(tmp,tmpt)
kable(tmpt)
```
```{r barplot_pct,fig.width=9,fig.height=7,include=FALSE}
# 2013
tmp1 = jdata%>%group_by(dsm,dsm_fac)%>%
summarize("N_journals"=n(),"Percent_journals"=100*n()/nrow(jdata),
"Nc"=sum(citable_2013),
"MedianC"=median(citable_2013,na.rm=T),
"PercentC" = 100*sum(citable_2013)/sum(jdata$citable_2013)
)
tmp1$year = "2013"
tmp1$plos = "with PLoS One"
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(dsm,dsm_fac)%>%
summarize("N_journals"=n(),"Percent_journals"=100*n()/nrow(jdata),
"Nc"=sum(citable_2013),
"MedianC"=median(citable_2013,na.rm=T),
"PercentC" = 100*sum(citable_2013)/sum(jdata$citable_2013[!jdata$Journal=="PLoS One"])
)
tmp2$year = "2013"
tmp2$plos = "without PLoS One"
tmp = bind_rows(tmp1,tmp2)
# 2013
tmp1 = jdata%>%group_by(dsm,dsm_fac)%>%
summarize("N_journals"=n(),"Percent_journals"=100*n()/nrow(jdata),
"Nc"=sum(citable_2014,na.rm=T),
"MedianC"=median(citable_2014,na.rm=T),
"PercentC" = 100*sum(citable_2014,na.rm=T)/sum(jdata$citable_2014,na.rm=T)
)
tmp1$year = "2014"
tmp1$plos = "with PLoS One"
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(dsm,dsm_fac)%>%
summarize("N_journals"=n(),"Percent_journals"=100*n()/nrow(jdata),
"Nc"=sum(citable_2014,na.rm=T),
"MedianC"=median(citable_2014,na.rm=T),
"PercentC" = 100*sum(citable_2014,na.rm=T)/sum(jdata$citable_2014[!jdata$Journal=="PLoS One"],na.rm=T))
tmp2$year = "2014"
tmp2$plos = "without PLoS One"
tmp3 = bind_rows(tmp1,tmp2)
tmp = bind_rows(tmp,tmp3)
tmp_n = tmp%>%select(dsm:Percent_journals,year,plos)%>%rename(N=N_journals,Percent=Percent_journals)
tmp_n$type = "Journal"
tmp_n = tmp_n%>%filter(plos=="with PLoS One") # basically the same
tmp_c = tmp%>%select(dsm,dsm_fac,Nc,PercentC,year,plos)%>%rename(N=Nc,Percent=PercentC)
tmp_c$type = "Citable Items"
tmplong = bind_rows(tmp_n,tmp_c)
tmplong = tmplong%>%unite(type2,type,plos,sep=" ",remove = FALSE)
tmplong$type2[tmplong$type=="Journal"] = "Journals"
tmplong = tmplong
tmplong = tmplong%>%filter(year=="2013") #similar by year
tmplong$type2 = factor(tmplong$type2,levels=c("Journals","Citable Items with PLoS One","Citable Items without PLoS One"))
ggplot(tmplong,aes(x=dsm,y=Percent,fill=dsm_fac,alpha=type2))+geom_bar(stat="identity",position = "dodge") +
geom_text(aes(label=paste0(round(Percent,1),"%"),y=Percent),
#alpha=1,
position=position_dodge(width=0.9),vjust=1.4,size=2,color="black",show.legend = FALSE)+
guides(alpha=guide_legend(title="Percent of",ncol=1),
fill = guide_legend(title = "Data Sharing Mark", ncol = 1))+
# facet_grid(year~.)+
scale_alpha_manual(values = c(0.4, 0.6,0.9))+
theme_minimal()+xlab("Data Sharing Mark (1-6)")+xlim(as.character(1:6))+ theme(legend.position = "bottom")
```
```{r barplot_pct_stacked,fig.width=9,fig.height=7,include=FALSE}
ggplot(tmplong,aes(x=type2,y=Percent,fill=dsm_fac))+geom_bar(stat="identity") +
geom_text(aes(label=paste0(round(Percent,1),"%"),y=Percent),
#alpha=1,
position=position_stack(),vjust=1.4,size=3,color="black",show.legend = FALSE)+
guides(alpha=guide_legend(title="Percent of",ncol=1),
fill = guide_legend(title = "Data Sharing Mark", ncol = 1))+
theme_minimal()+xlab("")+theme(axis.text.x = element_text(angle = 45, hjust = .9))
```
```{r barplot_pct_stacked_horiz,fig.width=9,fig.height=5}
tmplong$type1 = factor(tmplong$type2,levels=c("Citable Items without PLoS One","Citable Items with PLoS One","Journals"))
ggplot(tmplong,aes(x=type1,y=Percent,fill=dsm_fac))+geom_bar(stat="identity") +
geom_text(aes(label=paste0(round(Percent,1),"%"),y=Percent),
#alpha=1,
position=position_stack(),hjust=1.2,size=3,color="black",show.legend = FALSE)+
guides(alpha=guide_legend(title="Percent of",ncol=1),
fill = guide_legend(title = "Data Sharing Mark", ncol = 1))+
theme_minimal()+xlab("")+coord_flip()+ theme(legend.position = "bottom")
```
## FIGURE 1 - Percentage of journals per each data sharing mark (DSM).
The top bar shows the percentage of all journals for each data sharing mark. The middle bar
shows the percentage of citable items from each journal (including PLoS One) for each data
sharing mark. The lower bar shows the percentage of citable items for each journal
(excluding PLoS One) for each data sharing mark. Because of the journal PLoS One’s high
publishing activity, we analyzed the percentage of citable items for each data sharing mark
including and excluding PLoS One. The shades from dark to light represent DSM 1-6.
```{r fig1_barplot_pct_stacked_horiz,fig.width=9,fig.height=4,dpi=500}
tmplong$type1 = factor(tmplong$type2,levels=c("Citable Items without PLoS One","Citable Items with PLoS One","Journals"))
tmplong$dsm_fac_reverse = factor(tmplong$dsm_fac,levels=levels(tmplong$dsm_fac)[6:1])
ggplot(tmplong,aes(x=type1,y=Percent,fill=dsm_fac_reverse))+geom_bar(stat="identity") +
geom_text(aes(label=paste0(round(Percent,1),"%"),y=Percent),
#alpha=1,
position=position_stack(),hjust=1.2,size=3,color="black",show.legend = FALSE)+
#scale_fill_brewer(palette="Greys")+
scale_fill_manual(values = RColorBrewer::brewer.pal(n=7, name="Blues")[1:6],
breaks=levels(tmplong$dsm_fac),
#labels=levels(tmplong$dsm_fac))+
labels=paste(1:6,levels(tmplong$dsm_fac)))+
guides(fill = guide_legend(title = "Data Sharing Mark", ncol = 1))+
theme_minimal()+xlab("")+coord_flip()+ theme(legend.position = "bottom")
```
## TABLE RESULTS X: Number of journals & Citable Items per data sharing 2 categories
```{r}
#summarize citable items
tmp1 = jdata%>%group_by(dsm2,dsm2_fac)%>%
summarize("N"=n(),
"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2013),
"MedianC"=median(citable_2013,na.rm=T),
"PercentC" = 100*sum(citable_2013)/sum(jdata$citable_2013)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2013" = paste(MedianC," "), # need a space or kable malfunctions
"# Citable Items 2013 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)"))%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("DSM"=dsm2,"DSM Description"=dsm2_fac)
#summarize citable items, removing PLoS One
#do not need median since removing one journal will not change this except by .5
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(dsm2,dsm2_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2013),
"PercentC" = 100*sum(citable_2013)/sum(jdata$citable_2013[!jdata$Journal=="PLoS One"])
)%>%
mutate("# Citable Items 2013, Remove PLoS One (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("DSM"=dsm2,"DSM Description"=dsm2_fac)
tmp = left_join(tmp1,tmp2)
tmp1 = jdata%>%group_by(dsm2,dsm2_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2014, na.rm=T),
"MedianC"=median(citable_2014,na.rm=T),
"PercentC" = 100*sum(citable_2014,na.rm=T)/sum(jdata$citable_2014,na.rm=T)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2014" = paste(MedianC," "),
"# Citable Items 2014 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)")
)%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("DSM"=dsm2,"DSM Description"=dsm2_fac)
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(dsm2,dsm2_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2014,na.rm=T),
"PercentC" =
100*sum(citable_2014,na.rm=T)/sum(jdata$citable_2014[!jdata$Journal=="PLoS One"],na.rm=T)
)%>%
mutate("# Citable Items 2014, Remove PLoS One (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("DSM"=dsm2,"DSM Description"=dsm2_fac)
tmp3 = left_join(tmp1,tmp2)
tmp = left_join(tmp,tmp3)
tmp1 = jdata%>%group_by(dsm2,dsm2_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2015, na.rm=T),
"MedianC"=median(citable_2015,na.rm=T),
"PercentC" = 100*sum(citable_2015,na.rm=T)/sum(jdata$citable_2015,na.rm=T)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2015" = paste(MedianC," "),
"# Citable Items 2015 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)")
)%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("DSM"=dsm2,"DSM Description"=dsm2_fac)
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(dsm2,dsm2_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2015,na.rm=T),
"PercentC" =
100*sum(citable_2015,na.rm=T)/sum(jdata$citable_2015[!jdata$Journal=="PLoS One"],na.rm=T)
)%>%
mutate("# Citable Items 2015, Remove PLoS One (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("DSM"=dsm2,"DSM Description"=dsm2_fac)
tmp3 = left_join(tmp1,tmp2)
tmp = left_join(tmp,tmp3)
tmp = tmp%>%arrange(desc(DSM))
tmp$DSM[1] = "DSM 1&2"
tmp$DSM[2] = "DSM 3-6"
kable(tmp)
```
## TABLE RESULTS X: Distribution of Open Access by Journal and Citable Item
```{r}
tmp1 = jdata%>%group_by(oam_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2013),
"MedianC"=median(citable_2013,na.rm=T),
"PercentC" = 100*sum(citable_2013)/sum(jdata$citable_2013)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2013" = paste(MedianC," "),
"# Citable Items 2013 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("Open Access"=oam_fac)
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(oam_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2013),
"PercentC" = 100*sum(citable_2013)/sum(jdata$citable_2013[!jdata$Journal=="PLoS One"])
)%>%
mutate("# Citable Items 2013, Remove PLoS One (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("Open Access"=oam_fac)
tmp = left_join(tmp1,tmp2)
tmp1 = jdata%>%group_by(oam_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2014, na.rm =T),
"MedianC"=median(citable_2014,na.rm=T),
"PercentC" = 100*sum(citable_2014, na.rm =T)/sum(jdata$citable_2014, na.rm=T)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2014" = paste(MedianC," "), # need a space or kable malfunctions for some reason
"# Citable Items 2014 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("Open Access"=oam_fac)
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(oam_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2014, na.rm =T),
"PercentC" = 100*sum(citable_2014, na.rm =T)/sum(jdata$citable_2014[!jdata$Journal=="PLoS One"], na.rm=T)
)%>%
mutate("# Citable Items 2014, Remove PLoS One (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("Open Access"=oam_fac)
tmp3 = left_join(tmp1,tmp2)
tmp = left_join(tmp,tmp3)
tmp1 = jdata%>%group_by(oam_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2015, na.rm =T),
"MedianC"=median(citable_2015,na.rm=T),
"PercentC" = 100*sum(citable_2015, na.rm =T)/sum(jdata$citable_2015, na.rm=T)
)%>%
mutate("# Journals (%)" = paste0(N, "\t(",round(Percent,1),"%)"),
"Median # Citable Items per Journal 2015" = paste(MedianC," "), # need a space or kable malfunctions for some reason
"# Citable Items 2015 (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC,-MedianC)%>%
rename("Open Access"=oam_fac)
tmp2 = jdata%>%filter(!Journal=="PLoS One")%>%group_by(oam_fac)%>%
summarize("N"=n(),"Percent"=100*n()/nrow(jdata),
"Nc"=sum(citable_2015, na.rm =T),
"PercentC" = 100*sum(citable_2015, na.rm =T)/sum(jdata$citable_2015[!jdata$Journal=="PLoS One"], na.rm=T)
)%>%
mutate("# Citable Items 2015, Remove PLoS One (%)" = paste0(Nc, "\t(",round(PercentC,1),"%)") )%>%
select(-N,-Nc,-Percent,-PercentC)%>%
rename("Open Access"=oam_fac)
tmp3 = left_join(tmp1,tmp2)
tmp = left_join(tmp,tmp3)
tmp = tmp%>%arrange(desc(`Open Access`))
kable(tmp)
```
## TABLE X: DSM by Open Access
Open Access Mark (OAM) has two categories, Subscription and Open Access.
Here we present a table of number of open access or subscription journals (number of citable items) within each DSM as well as the percent of journals (percent of citable items) that are open access within each DSM. For the DSM 1 we present number and percent citable items with and without PLoS One.
```{r, results='asis'}
# obtain open access counts at journal level
tmptable = with(jdata,table(dsm,oam_fac))
tmptable = cbind(tmptable,"% Open Access"=100*tmptable[,2]/rowSums(tmptable))
tmptable = as_data_frame(tmptable)
tmptable = tmptable%>%add_column()
# obtain open access counts at citable item level
jcit = left_join(
left_join(jdata%>%group_by(dsm)%>%summarize("tot_cit"=sum(citable_2013)),
jdata%>%filter(oam_fac=="Subscription")%>%group_by(dsm)%>%summarize("sub_cit"=sum(citable_2013))),
jdata%>%filter(oam_fac=="Open Access")%>%group_by(dsm)%>%summarize(open_cit = sum(citable_2013))
)
jcit$open_cit[is.na(jcit$open_cit)] = 0
jcit$pct_open_cit = 100*jcit$open_cit/jcit$tot_cit
#without Plos One
open_cit = jdata%>%filter(Journal!="PLoS One",
oam_fac=="Open Access",
dsm==1)%>%summarize("open_cit"=sum(citable_2013))
tot_cit = jdata%>%filter(Journal!="PLoS One",
dsm==1)%>%summarize("open_cit"=sum(citable_2013))
pct_cit = round(100*open_cit/tot_cit,2)
printtab = data_frame(
"DSM"=dsm_labels,
"Subscription"=paste0(tmptable$Subscription," (",jcit$sub_cit,")"),
"Open Access"=paste0(tmptable$`Open Access`," (",jcit$open_cit,")"),
"% Open Access"=paste0(round(tmptable$`% Open Access`,2),"% (",
round(jcit$pct_open_cit,2),"%)")
)
# add in without Plos One #s
printtab[1,3] = gsub(")",paste0("; ",open_cit,"*)"),printtab[1,3])
printtab[1,4] = gsub(")",paste0("; ",pct_cit,"%*)"),printtab[1,4])
kable(printtab)
```
*After removing PLoS One
## Table of 2 category DSM by Open Access
```{r}
# obtain open access counts at journal level
tmptable = with(jdata,table(dsm2,oam_fac))
tmptable = cbind(tmptable,"% Open Access"=100*tmptable[,2]/rowSums(tmptable))
tmptable = as_data_frame(tmptable)
# obtain open access counts at citable item level
jcit = left_join(
left_join(jdata%>%group_by(dsm2)%>%summarize("tot_cit"=sum(citable_2013)),
jdata%>%filter(oam_fac=="Subscription")%>%group_by(dsm2)%>%
summarize("sub_cit"=sum(citable_2013))),
jdata%>%filter(oam_fac=="Open Access")%>%group_by(dsm2)%>%summarize(open_cit = sum(citable_2013))
)
jcit$open_cit[is.na(jcit$open_cit)] = 0
jcit$pct_open_cit = 100*jcit$open_cit/jcit$tot_cit
#without Plos One
open_cit = jdata%>%filter(Journal!="PLoS One",
oam_fac=="Open Access",
dsm2==1)%>%summarize("open_cit"=sum(citable_2013))
tot_cit = jdata%>%filter(Journal!="PLoS One",
dsm2==1)%>%summarize("open_cit"=sum(citable_2013))
pct_cit = round(100*open_cit/tot_cit,2)
printtab = data_frame(
"DSM"=levels(jdata$dsm2_fac),
"Subscription"=paste0(tmptable$Subscription," (",jcit$sub_cit,")"),
"Open Access"=paste0(tmptable$`Open Access`," (",jcit$open_cit,")"),
"% Open Access"=paste0(round(tmptable$`% Open Access`,2),"% (",
round(jcit$pct_open_cit,2),"%)")
)
printtab = printtab%>%arrange(desc(DSM))
# add in without Plos One #s
printtab[1,3] = gsub(")",paste0("; ",open_cit,"*)"),printtab[1,3])
printtab[1,4] = gsub(")",paste0("; ",pct_cit,"%*)"),printtab[1,4])
kable(printtab)
```
*After removing PLoS One
## TABLE X: Frequencies of Data Sharing Policies
```{r}
jdata$omic_data_sharing_fac = relevel(jdata$omic_data_sharing_fac,ref="No")
jdata$copyright_licensing_fac = relevel(jdata$copyright_licensing_fac,ref="No Mention")
jdata$archival_retention_fac = relevel(jdata$archival_retention_fac,ref="No Mention")
jdata$reproducibility_noted_fac = relevel(jdata$reproducibility_noted_fac,ref="No Mention")
varlist = c("omic_data_sharing_fac","rec_pref_sharing_fac","journal_hosts_fac","copyright_licensing_fac",
"archival_retention_fac","reproducibility_noted_fac")
t1 = CreateTableOne(varlist,data = jdata)
x1 <- print(t1,printToggle = FALSE,noSpaces = FALSE)
tmp = rownames(x1)
tmptab = as_data_frame(x1)%>%add_column("Variable"=tmp,.before = "Overall")
tmptab$Variable = gsub("omic_data_sharing_fac","Omic Data Sharing Required",tmptab$Variable)
tmptab$Variable = gsub("rec_pref_sharing_fac","Recommended Sharing Method",tmptab$Variable)
tmptab$Variable = gsub("journal_hosts_fac","Journal Hosting Limit",tmptab$Variable)
tmptab$Variable = gsub("copyright_licensing_fac","Copyright Licensing of Data",tmptab$Variable)
tmptab$Variable = gsub("archival_retention_fac","Archival Retention Policy",tmptab$Variable)
tmptab$Variable = gsub("reproducibility_noted_fac","Reproducibility or Analogous Concepts Noted as Purpose of Data Policy",tmptab$Variable)
tmptab$Overall = gsub(")","%)",tmptab$Overall)
kable(tmptab)
```
## TABLE: Recommended Data Sharing Method by DSM 1-5
```{r}
tmp = with(jdata,table(dsm_fac,rec_pref_sharing_fac))
tmp = cbind("dsm"=1:6,tmp)
tmp = tmp[-nrow(tmp),]
tmp = as_data_frame(tmp)
tmp[6,] = colSums(tmp)
tmp[6,1] = "Total"
tmppct = round(100*tmp[,-1]/rowSums(tmp[,-1]),2)
for(ii in 2:ncol(tmp)) {
tmp[,ii] = paste0(unlist(tmp[,ii])," (",tmppct[,ii-1],"%)")
}
kable(tmp)
```
## FIGURE: Recommended Data Sharing Method by DSM 1-5
```{r fig2_tile_percent_recDSM_2, fig.width=9,fig.height=7,dpi=400}
tmp = with(jdata,table(dsm_fac,rec_pref_sharing_fac))
tmp = cbind("dsm"=1:6,tmp)
tmp = tmp[-nrow(tmp),]
tmp = as_data_frame(tmp)
tmp[6,] = colSums(tmp)
tmp[6,1] = "Total (DSM 1-5)"
tmppct = cbind(tmp[,1],100*tmp[,-1]/rowSums(tmp[,-1]))
tmpn = tmp
for(ii in 2:ncol(tmp)) {
tmp[,ii] = paste0(unlist(tmp[,ii]),"\n(",round(tmppct[,ii],1),"%)")
}
tmplonglab = tmp%>%gather(key=type,value=label,-dsm)
tmplong = tmpn%>%gather(key=type,value=n,-dsm)
tmplong2 = tmppct%>%gather(key=type,value=Percent,-dsm)
tmplong = left_join(tmplong,tmplong2)
tmplong = left_join(tmplonglab,tmplong)
tmplong$type = factor(tmplong$type,
levels=c("Unspecified","Multiple methods equally recommended","By Reader Request to Authors",
"Journal Hosted","Public Online Repository"),
labels=c("Unspecified","Multiple Methods Equally Recommended","By Reader Request to Authors",
"Journal Hosted","Public Online Repository"))
ggplot(tmplong,aes(dsm,type,fill=Percent))+geom_tile(show.legend=TRUE)+geom_text(aes(label=label),color="white")+
theme_minimal()+ylab("")+xlab("Data Sharing Mark")+scale_fill_continuous(limits=c(0,100))
```
## FIGURE 3: Recommended data sharing method by data sharing mark (DSM) 1-5.
The number (percent) of journals with each recommended data sharing method is represented by each tile, with darker shades denoting higher percentages of journals with the given data sharing method.
```{r fig3_tile_percent_recDSM, fig.width=9,fig.height=7,dpi=400}
tmplong$lowpct = factor(1*tmplong$Percent<25)
ggplot(tmplong,aes(dsm,type,fill=Percent))+
geom_tile(show.legend=TRUE)+geom_text(aes(label=label,color=lowpct),show.legend = FALSE)+
theme_minimal()+ylab("")+xlab("Data Sharing Mark")+
scale_color_manual(values=c("White","Black"))+
guides(color="none",label="none")+
scale_fill_continuous(limits=c(0,100),low=RColorBrewer::brewer.pal(n=7, name="Blues")[1],high=RColorBrewer::brewer.pal(n=7, name="Blues")[7])
```
```{r}
tmptable = data.frame(table(jdata$omic_data_sharing_fac,useNA="ifany"))
colnames(tmptable) = c("Protein, Proteomic, Genomic Data Sharing Required with Deposit to Specific Data Banks","# (%)")
tmptable[,2] = paste0(tmptable[,2]," (",sprintf("%.1f",100*tmptable[,2]/sum(tmptable[,2]),1),"%)")
kable(tmptable)
tmptable = data.frame(table(jdata$rec_pref_sharing_fac,useNA="ifany"))
colnames(tmptable) = c("Recommended Sharing Method","# (%)")
tmptable[,2] = paste0(tmptable[,2]," (",sprintf("%.1f",100*tmptable[,2]/sum(tmptable[,2]),1),"%)")
kable(tmptable)
tmptable = data.frame(table(jdata$journal_hosts_fac,useNA="ifany"))
tmptable[,1] = as.character(tmptable[,1])
colnames(tmptable) = c("Journal Hosting Limit","# (%)")
tmptable[nrow(tmptable),1] ="N/A"
tmptable[,2] = paste0(tmptable[,2]," (",sprintf("%.1f",100*tmptable[,2]/sum(tmptable[,2]),1),"%)")
kable(tmptable)
tmptable = data.frame(table(jdata$copyright_licensing_fac,useNA="ifany"))
colnames(tmptable) = c("Copyright Licensing of Data","# (%)")
tmptable[,2] = paste0(tmptable[,2]," (",sprintf("%.1f",100*tmptable[,2]/sum(tmptable[,2]),1),"%)")
kable(tmptable)
tmptable = data.frame(table(jdata$archival_retention_fac,useNA="ifany"))
colnames(tmptable) = c("Archival Retention Policy","# (%)")
tmptable[,2] = paste0(tmptable[,2]," (",sprintf("%.1f",100*tmptable[,2]/sum(tmptable[,2]),1),"%)")
kable(tmptable)
tmptable = data.frame(table(jdata$reproducibility_noted_fac,useNA="ifany"))
colnames(tmptable) = c("Reproducibility or Analogous Concepts Noted as Purpose of Data Policy","# (%)")
tmptable[,2] = paste0(tmptable[,2]," (",sprintf("%.1f",100*tmptable[,2]/sum(tmptable[,2]),1),"%)")
kable(tmptable)
```
**Journal Hosting by Recommended Sharing Policy**
```{r}
tmptable = with(jdata,table(journal_hosts_fac,rec_pref_sharing_fac,useNA="ifany"))
rownames(tmptable)[nrow(tmptable)] = "N/A"
kable(tmptable)
```
## Distribution of Impact Factor - Normality Tests
First we must determine whether IF or some transformation of IF is normally distributed. We can visually assess this by plotting histograms and density plots.
```{r density_if, fig.show='hold', fig.width=5, fig.height=5}
# check normality
ggplot(jdata_long,aes(impact_factor,fill=year))+geom_density(alpha=0.4)+
theme_minimal()+xlab("Impact Factor")+ggtitle("Density of IF by Year")
ggplot(jdata_long,aes(impact_factor,fill=year))+geom_histogram(alpha=0.4,bins=40)+
theme_minimal()+xlab("Impact Factor")+ggtitle("Histogram of IF by Year")
# check normality of log
ggplot(jdata_long,aes(log(impact_factor),fill=year))+geom_density(alpha=0.4)+
theme_minimal()+xlab("log(IF)")+ggtitle("Density of log(IF) by Year")
ggplot(jdata_long,aes(log(impact_factor),fill=year))+geom_histogram(alpha=0.4,bins=40)+
theme_minimal()+xlab("Impact Factor")+ggtitle("Histogram of log(IF) by Year")
```
We can also test the Normality assumption with the Shapiro Wilk's Test. We can test IF by year, as well as log(IF). We can also test within each DSM group since the main assumption for ANOVA is that the outcome (IF) is normal within each group.
```{r shapirowilk}
norm_test1 = data.frame("Y"=c("IF 2013","IF 2014","log(IF) 2013","log(IF) 2014"),
rbind(broom::tidy(shapiro.test(jdata$if_2013)),
broom::tidy(shapiro.test(jdata$if_2014)),
broom::tidy(shapiro.test(log(jdata$if_2013))),
broom::tidy(shapiro.test(log(jdata$if_2014)))
))
norm_test1$p.value = as.character(signif(norm_test1$p.value,2))
kable(norm_test1,digits=4,caption = "Shapiro Wilk Normality Test p-values of IF")
# check normality within dsm groups
norm_test = jdata%>%group_by(dsm_fac)%>%summarize(
"if_2013.pvalue"=shapiro.test(if_2013)$p.value,
"if_2014.pvalue"=shapiro.test(if_2014)$p.value, "log_if_2013.pvalue"=shapiro.test(log(if_2013))$p.value,
"log_if_2014.pvalue"=shapiro.test(log(if_2014))$p.value
)
norm_test[,-1] = apply(norm_test[,-1] ,2,function(k) as.character(signif(k,2)))
kable(norm_test,digits=4,
caption = "Shapiro Wilk Normality Test p-values of IF within DSM Groups")
```
The p-values from the Shapiro Wilk's test are mostly very significant (hence we reject the normality assumption) and in general Impact Factor appears to be quite skewed so **nonparametric tests** (Wilcoxon, Kruskal-Wallis) will be more appropriate. Taking the log helps somewhat but does not solve the problem. Furthermore log-IF is much less intepretable. **Hence, we use nonparametric tests to compare distributions.**
## Impact Factor vs. Data Sharing Mark
We wish to assess how Impact Factor differs between journals with different data sharing types.
### Summarize Impact Factor Within Groups
We can describe the minimum, maximum, mean, and median of Impact factor as well as total citations for each DSM type.
```{r impact_factor_dsm_table}
tmpsum = jdata_long%>%group_by(dsm,dsm_fac,year)%>%summarize(
"Number of Journals"=n(),
"min_IF"=min(impact_factor,na.rm=T),
"mean_IF"=mean(impact_factor,na.rm=T),
"median_IF"=median(impact_factor,na.rm=T),
"max_IF"=max(impact_factor,na.rm=T),
"min_TotalCites"=min(total_cites,na.rm=T),
"mean_TotalCites"=mean(total_cites,na.rm=T),