|
| 1 | +# Meta-analysis of the rodent object-in-context task: Get flowchart numbers |
| 2 | +# Written by Milou Sep |
| 3 | + |
| 4 | +rm(list=ls()) |
| 5 | +library(dplyr) |
| 6 | +library(osfr) # to interact with Open Science Framework |
| 7 | +# instructions: https://github.com/CenterForOpenScience/osfr |
| 8 | +# Authenticate to OSF (see: http://centerforopenscience.github.io/osfr/articles/auth.html). Via osf_auth("PAT") in the commentline. (note PAT can be derived from OSF) |
| 9 | +library(readxl) |
| 10 | + |
| 11 | + |
| 12 | +# retrieve OSF files ------------------------------------------------------ |
| 13 | +#search hits |
| 14 | +osf_retrieve_file("dvwhn") %>% osf_download(path = "data", conflicts="overwrite") # search hits search string thesis MV |
| 15 | +osf_retrieve_file("umz5k") %>% osf_download(path = "data", conflicts="overwrite") # search hits new search string (25.5.20) |
| 16 | +# Screening |
| 17 | +osf_retrieve_file("j7sfm") %>% osf_download(path = "data", conflicts="overwrite") # screening search string thesis MV |
| 18 | +osf_retrieve_file("bz3sj") %>% osf_download(path = "data", conflicts="overwrite") # screening new search string |
| 19 | +# data extraction file |
| 20 | +osf_retrieve_file("qadch") %>% osf_download(path = "data", conflicts="overwrite") |
| 21 | + |
| 22 | +# Load data --------------------------------------------------------------- |
| 23 | +# search documents (PMID's) |
| 24 | +search1.thesis <- read.table("data/hits.search.thesis.MV.txt", quote="\"", comment.char="") |
| 25 | +search2.meta <- read.table("data/hits.new.search.meta.oic.v25.5.20.txt", quote="\"", comment.char="") |
| 26 | +# screening documents |
| 27 | +screeing.search1 <-read.csv2("data/Screening S1 thesis search PMIDs.csv", na.strings = c("")) |
| 28 | +screeing.search2 <-read.csv2("data/Screening S2 new.in.new.search.PMIDs.csv", na.strings = c("")) |
| 29 | +# data extraction file |
| 30 | +read_excel("data/280121_Data_Extraction_RoB.xlsx", sheet = "Extraction_converted", na=c("N/A", "#VALUE!"))->data |
| 31 | + |
| 32 | + |
| 33 | +# Compare PMIDs ----------------------------------------------------------- |
| 34 | +search1.thesis$V1[!search1.thesis$V1 %in% search2.meta$V1]-> not.in.new |
| 35 | +search2.meta$V1[!search2.meta$V1 %in% search1.thesis$V1]->new.in.new |
| 36 | +search2.meta$V1[search2.meta$V1 %in% search1.thesis$V1]->old.in.new |
| 37 | + |
| 38 | +# Count hits and screened papers |
| 39 | +nrow(search2.meta) #253 |
| 40 | +nrow(search1.thesis) # 54 |
| 41 | +nrow(screeing.search1) # 54 |
| 42 | +length(new.in.new) #219 |
| 43 | +nrow(screeing.search2) # 219 (so correct) |
| 44 | +length(not.in.new) # 20 |
| 45 | +length(old.in.new) # 34 |
| 46 | +#new in new + old in new |
| 47 | +219+34 # =253 |
| 48 | +# not in new + old in new |
| 49 | +20+34 # = 54 |
| 50 | + |
| 51 | + |
| 52 | +# Counts for Flowchart ---------------------------------------------------- |
| 53 | +# Total |
| 54 | +screeing.search1 %>% filter(PMID %in% old.in.new) %>% nrow()# 34 |
| 55 | +screeing.search2 %>% filter(PMID %in% new.in.new) %>% nrow() # 219 |
| 56 | +34+219 #= 253 |
| 57 | + |
| 58 | + |
| 59 | +# Counts search 1 (thesis) ------------------------------------------------ |
| 60 | +# str(screeing.search1) |
| 61 | + |
| 62 | +screeing.search1 %>% |
| 63 | + filter(PMID %in% old.in.new) %>% |
| 64 | + filter(inclusie_july2020 == "yes") %>% nrow() # 30 included |
| 65 | + |
| 66 | +screeing.search1 %>% |
| 67 | + filter(PMID %in% old.in.new) %>% |
| 68 | + filter(full.text.checked.july2020 == "no") %>% #nrow()# 26 |
| 69 | + filter(inclusie_july2020 == "yes") %>% nrow()# 26 included without full text check |
| 70 | + |
| 71 | +screeing.search1 %>% |
| 72 | + filter(PMID %in% old.in.new) %>% |
| 73 | + filter(full.text.checked.july2020 == "yes") %>% #nrow()# 8 full text checked |
| 74 | + filter(inclusie_july2020 == "yes") # of that 4 included (so 4 excluded) |
| 75 | + |
| 76 | +screeing.search1 %>% |
| 77 | + filter(PMID %in% old.in.new) %>% |
| 78 | + filter(inclusie_july2020 == "no?" | inclusie_july2020 == "no") # 4 excluded (reason for all: no OIC) |
| 79 | + |
| 80 | + |
| 81 | +# Counts search 2 (new) --------------------------------------------------- |
| 82 | +# str(screeing.search2) |
| 83 | + |
| 84 | +#total |
| 85 | +screeing.search2 %>% filter(PMID %in% new.in.new) %>% |
| 86 | + filter(final.inclusion.screening == "Yes") %>% nrow() # 10 included |
| 87 | + |
| 88 | +#included without full text check |
| 89 | +screeing.search2 %>% filter(PMID %in% new.in.new) %>% #View() |
| 90 | + filter(full.text.checked.MS == "no") %>% #nrow()# 140 full text NOT checked |
| 91 | + filter(final.inclusion.screening == "Yes") # of that 10 included |
| 92 | + |
| 93 | +# excluded without full text check in s2 (+ reasons for exclusion) |
| 94 | +screeing.search2 %>% filter(PMID %in% new.in.new) %>% #View() |
| 95 | + filter(full.text.checked.MS == "no") %>% |
| 96 | + filter(final.inclusion.screening == "No") %>% #nrow()# 130 |
| 97 | + mutate(Reason.for.exclusion = factor(Reason.for.exclusion))%>% |
| 98 | + select(Reason.for.exclusion) %>% table() |
| 99 | + |
| 100 | +# included after full text check |
| 101 | +screeing.search2 %>% filter(PMID %in% new.in.new) %>% |
| 102 | + filter(full.text.checked.MS == "yes"| is.na(full.text.checked.MS)) %>% #nrow()# 79 full text checked |
| 103 | + filter(final.inclusion.screening == "Yes") # of that 0 included |
| 104 | + |
| 105 | +# excluded after full text check in s2 (+ reason for exclusion) |
| 106 | +screeing.search2 %>% filter(PMID %in% new.in.new) %>% |
| 107 | + filter(full.text.checked.MS == "yes"| is.na(full.text.checked.MS)) %>% |
| 108 | + filter(final.inclusion.screening == "No") %>% #nrow() # 79 excluded |
| 109 | + mutate(Reason.for.exclusion = factor(Reason.for.exclusion))%>% |
| 110 | + select(Reason.for.exclusion) %>% table() |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | +# Unique inclusions thesis search + new search ---------------------------- |
| 115 | +30 + 10 # total 40 inclusions following screening |
| 116 | + |
| 117 | + |
| 118 | +# Compare to numbers in data extraction file ------------------------------ |
| 119 | +data %>% distinct(PMID) %>%nrow() # 41 studies |
| 120 | + |
| 121 | + |
| 122 | +# Difference inclusions vs data extraction: snowballing ------------------- |
| 123 | +screeing.search1 %>% filter(inclusie_july2020 == "yes") %>% select(PMID) ->inclusions.S1 |
| 124 | +screeing.search2 %>% filter(final.inclusion.screening == "Yes") %>% select(PMID)->inclusions.S2 |
| 125 | +c(inclusions.S1 , inclusions.S2) %>% unlist() -> inclusions |
| 126 | + |
| 127 | +data %>% filter(!PMID %in% inclusions) # 1 identified via snowballing |
| 128 | + |
| 129 | +# To check: all inclusions from screening files are in dataset |
| 130 | +inclusions[(!inclusions %in% data$PMID)] |
| 131 | + |
| 132 | + |
| 133 | +# Total inclusions -------------------------------------------------------- |
| 134 | +# of these 41 studies, 4 studies are included in the systematic review but excluded for the meta-analyses due to missing data. Also see the prepare_data.rmd script. |
| 135 | + |
| 136 | + |
| 137 | +# save file local --------------------------------------------------------- |
| 138 | +# Note these files are also on OSF (https://osf.io/d9eu4/) |
| 139 | +write.table(not.in.new, file = "processed_data/not.in.new.search.csv", sep = ';', row.names = F) |
| 140 | +write.table(new.in.new, file = "processed_data/new.in.new.search.csv", sep = ';', row.names = F) |
| 141 | +write.table(old.in.new, file = "processed_data/old.in.new.search.csv", sep = ';', row.names = F) |
0 commit comments