Introduction & setup

Introduction

This Narrated Illustration of a Transparent Review Outline (NITRO) accompanies the SysRevving book and the metabefor package. Throughout this file, links to the corresponding SysRevving chapters will be provided. For general reference, you may want to keep the SysRevving glossary ready. For convenience, here is the GitLab repo for this project, and here is the URL to the rendered version of this R Markdown file.

In this fictional example, we want to conduct a systematic review about the determinants of substance use, specifically a scoping review. Note that this review is deliberately very rudimentary, to try to avoid the complexity of the review itself from interfering with understanding the structure.

Setup

Here we check for the required packages (without loading them into R’s search path with library() or require(), to safeguard against accidently forgetting to use the package::function() syntax), specify the paths, and set script-wide settings.

###-----------------------------------------------------------------------------
### Some booleans (logical values, set to TRUE or FALSE) to control which
### actions are executed when the script runs
###-----------------------------------------------------------------------------

runScreeningChunks <- FALSE;

###-----------------------------------------------------------------------------
### Packages
###-----------------------------------------------------------------------------

if ((!(requireNamespace("metabefor", quietly = TRUE))) ||
      (packageVersion("metabefor") < "0.3")) {
  stop("You need to have at least version 0.3 of the `metabefor` package installed; ",
       "install it with:\n\ninstall.packages('metabefor');");
}

metabefor::checkPkgs(
  "here",               ### For easily access to files using 'relative paths'
  "preregr",            ### For specifying (pre)registrations
  "synthesisr",         ### For plotting
  "ggplot2"             ### For plotting
);

### Potentially update to the development version of some packages
# ufs::quietGitLabUpdate("r-packages/preregr@dev", quiet = FALSE);
# ufs::quietGitLabUpdate("r-packages/rock@dev", quiet = FALSE);
# ufs::quietGitLabUpdate("r-packages/metabefor", quiet = FALSE);
# ufs::quietRemotesInstall("rmetaverse/synthesisr",
#                          func = "install_github", quiet = FALSE);

###-----------------------------------------------------------------------------
### Paths
###-----------------------------------------------------------------------------

basePath <- here::here();
preregPath <- file.path(basePath, "prereg");
scriptPath <- file.path(basePath, "scripts");
searchPath <- file.path(basePath, "search");
screeningPath <- file.path(basePath, "screening");
extractionPath <- file.path(basePath, "extraction");
rxsSpecPath <- file.path(basePath, "extraction-Rxs-spec");
outputPath <- file.path(basePath, "output");

###-----------------------------------------------------------------------------
### Settings
###-----------------------------------------------------------------------------

knitr::opts_chunk$set(
  echo = TRUE,
  comment = ""
);

###-----------------------------------------------------------------------------
### Extraction script Google sheets URL
###-----------------------------------------------------------------------------

rxsSpec_googleSheetsURL <-
  paste0("https://docs.google.com/spreadsheets/d/",
         "1Ty38BS7MVXOgC-GJ6zzr7E3rC_vQNOMKe-uCvIuHs3c");

Planning

Research Question

(link to corresponding SysRevving chapter)

Example: The research question is whether the exponential explosion of the scientific literature is also reflected in a growing evidence base for health promotion interventions targeting recreational substance use.

Planning: Synthesis

(link to corresponding SysRevving chapter)

Example: To answer the research question, our synthesis will consist of a plot with years on the X axis, cumulative number of publications on the Y axis, and with spearately, differently colored lines for each substance.

Planning: Extraction

(link to corresponding SysRevving chapter)

Example: The R extraction script specification (Rxs spec) is stored in this Rxs spec google sheet. The below chunks load it, convert it into the Rxs template (that will then be copied and completed for each source from which data are extracted), and show these specifications.

R extraction script specification

Basic Rxs tree structure

metabefor::show_rxsTree_in_rxsStructure(
  rxsSpecObject,
  output = outputPath
);

module1

                levelName
1 source                 
2  °--general            
3      ¦--publicationYear
4      ¦--sourceAuthors  
5      °--sourceTitle    
%0 1->2 2->3 2->4 2->5 1 source 2 General 3 Year 4 Authors 5 Title

module2

                            levelName
1  source                            
2   °--methods                       
3       ¦--sample                    
4       ¦   ¦--sampleSize            
5       ¦   °--samplingStrategy      
6       ¦--method                    
7       °--variables                 
8           °--variable              
9               ¦--variableIdentifier
10              °--measurementLevel  
%0 1->2 2->3 2->6 2->7 3->4 3->5 7->8 8->9 8->10 1 source 2 Methods 3 Sample 4 Sample size 5 Sampling Strategy 6 Method 7 Variables 8 Variable 9 Variable Identifier 10 Measurement Level

module3

                              levelName
1 source                               
2  °--results                          
3      °--associations                 
4          °--association              
5              ¦--associationIdentifier
6              ¦--varId1               
7              ¦--varId2               
8              ¦--r                    
9              °--t                    
%0 1->2 2->3 3->4 4->5 4->6 4->7 4->8 4->9 1 source 2 Results 3 Associations 4 Association 5 Association Identifier 6 Variable Identifier for variable 1 7 Variable Identifier for variable 2 8 Pearson`s r 9 Student`s t

Extraction instructions

cat(rxsSpecObject$rxsInstructions);

Extraction instructions

Introduction

These instructions are for extractors using the minimal rxs example.

More instructions

Normally, these instructions should be comprehensive enough to allow people to extract data reasonably accurately. The instructions with the heading “Opening Remarks” and “Closing Remarks” are added in every rxs file.

Opening Remarks

Welcome to the R Extraction Script (.rxs.Rmd file) for this source!

You can now start extracting. If you haven’t yet studied the extractor instructions, please do so first. If you’re all set, good luck!

Closing Remarks

Well done! You are now done extracting this source. Great job!!!

Now, please knit the R Extraction Script into an HTML file and carefully check whether you entered everything correctly, since it will cost much less time to correct any errors, now that you still have this source in your mind, than later on when you’ll have to dive into it all over.

Entity overview

cat(rxsSpecObject$entityOverview_list);

Extraction script template

This is the extraction script generated based on the extraction script specification.

cat("\n\n<pre><textarea rows='40' cols='124' style='font-family:monospace;font-size:11px;white-space:pre;'>",
    unlist(rxsSpecObject$rxsTemplate),
    "</textarea></pre>\n\n",
    sep="\n");

Planning: Screening

(link to corresponding SysRevving chapter)

Example: …

Preregistration

(link to corresponding SysRevving chapter)

### Note: this chunk doesn't need to be evaluated (i.e. chunk option "eval" is
### set to FALSE), but in case it is, it writes the template to a different
### file than the version with content added and included in the next chunk.
### (For a list of included packages, see data(package='preregr'))

preregr::form_to_rmd_template(
    "genSysRev_v1",
    file = file.path(scriptPath, "preregistration-autogenerated.Rmd"),
    includeYAML = FALSE
);

### Note also that the preregistration form contains a level 2 heading

Generalized Systematic Review Registration Form

Section: Metadata

Title
title
Unspecified
Contributors
authors
Unspecified
Subjects
target_discipline
Unspecified
Tasks and roles
tasks_and_roles
Unspecified

Section: Review methods

Type of review
type_of_review
Unspecified
Review stages
review_stages
Unspecified
Current review stage
current_stage
Unspecified
Start date
start_date
Unspecified
End date
end_date
Unspecified
Background
background
Unspecified
Primary research question(s)
primary_research_question
Unspecified
Secondary research question(s)
secondary_research_question
Unspecified
Expectations / hypotheses
expectations_hypotheses
Unspecified
Dependent variable(s) / outcome(s) / main variables
dvs_outcomes_main_vars
Unspecified
Independent variable(s) / intervention(s) / treatment(s)
ivs_intervention_treatment
Unspecified
Additional variable(s) / covariate(s)
additional_variables
Unspecified
Software
software
Unspecified
Funding
funding
Unspecified
Conflicts of interest
cois
Unspecified
Overlapping authorships
overlapping_authorships
Unspecified

Section: Search strategy

Databases
databases
Unspecified
Interfaces
interfaces
Unspecified
Grey literature
grey_literature
Unspecified
Inclusion and exclusion criteria
inclusions_exclusion_criteria
Unspecified
Query strings
query_strings
Unspecified
Search validation procedure
search_validation_procedure
Unspecified
Other search strategies
other_search_strategies
Unspecified
Procedures to contact authors
procedure_for_contacting_authors
Unspecified
Results of contacting authors
results_of_contacting_authors
Unspecified
Search expiration and repetition
search_expiration_and_repetition
Unspecified
Search strategy justification
search_strategy_justification
Unspecified
Miscellaneous search strategy details
misc_search_strategy_details
Unspecified

Section: Screening

Screening stages
screening_stages
Unspecified
Screened fields / masking
screened_fields_masking
Unspecified
Used exclusion criteria
used_exclusion_criteria
Unspecified
Screener instructions
screener_instructions
Unspecified
Screening reliability
screening_reliability
Unspecified
Screening reconciliation procedure
screening_reconciliation_procedure
Unspecified
Sampling and sample size
sampling_and_sample_size
Unspecified
Screening procedure justification
screening_procedure_justification
Unspecified
Data management and sharing
screening_data_management_and_sharing
Unspecified
Miscellaneous screening details
misc_screening_details
Unspecified

Section: Extraction

Entities to extract
entities_to_extract
Unspecified
Extraction stages
extraction_stages
Unspecified
Extractor instructions
extractor_instructions
Unspecified
Extractor blinding
extractor_blinding
Unspecified
Extraction reliability
extraction_reliability
Unspecified
Extraction reconciliation procedure
extraction_reconciliation_procedure
Unspecified
Extraction procedure justification
extraction_procedure_justification
Unspecified
Data management and sharing
extraction_data_management_and_sharing
Unspecified
Miscellaneous extraction details
misc_extraction_details
Unspecified

Section: Synthesis and Quality Assessment

Planned data transformations
planned_data_transformations
Unspecified
Missing data
missing_data
Unspecified
Data validation
data_validation
Unspecified
Quality assessment
quality_assessment
Unspecified
Synthesis plan
synthesis_plan
Unspecified
Criteria for conclusions / inference criteria
criteria_for_conclusions
Unspecified
Synthesist masking
synthesis_masking
Unspecified
Synthesis reliability
synthesis_reliability
Unspecified
Synthesis reconciliation procedure
synthesis_reconciliation_procedure
Unspecified
Publication bias analyses
publication_bias
Unspecified
Sensitivity analyses / robustness checks
sensitivity_analysis
Unspecified
Synthesis procedure justification
synthesis_procedure_justification
Unspecified
Synthesis data management and sharing
synthesis_data_management_and_sharing
Unspecified
Miscellaneous synthesis details
misc_synthesis_details
Unspecified
preregr::prereg_spec_to_pdf(
  preregrObject,
  file = file.path(preregPath, "registration-1---preregistration.pdf"),
  author = rmarkdown::metadata$author
);

Example: …

Execution

Execution: Screening

(link to corresponding SysRevving chapter)

Example: …

Screening stage 1

###-----------------------------------------------------------------------------
### Process first search batch
### Note that these are sorted by batch
###-----------------------------------------------------------------------------

screenerPackages <-
  metabefor::write_screenerPackage(
    bibliographyDf = searchResults,
    outputPath = screeningPath,
    basename = "stage1_",
    duplicateField = "duplicate"
  );

### Potentially, to screen with revtools:
# revtools::screen_titles(bibHitDf[[1]]);

Execution: Extraction

(link to corresponding SysRevving chapter)

Example: …

Execution: Synthesis

(link to corresponding SysRevving chapter)

Example: …