The analysis is created using a master script and two helper scripts, format_netdat and stack_dat. Together, these scripts perform all analyses in the paper.
**Master script**
The master script has the following package dependencies:
1. metaSEM
2. metafor
3. mvmeta
4. stringr
5. igraph
6. plyr
7. psych
8. car
The master script calls the two helper scripts using ddply. The master script does the following tasks:
1. Finds general descriptive information about the dataset
2. Creates a network plot of the procedures that are compared to each other in the dataset
3. Using format_netdat, calculates standardized mean differences and variance components for the implicit, explicit, and behavioral data and formats the results for analysis
4. Using stack_dat, calculates additional variance components for the relationships between implicit & explicit and implicit & behavioral data, then creates merged datasets of the implicit & explicit and implicit & behavioral data for analysis
5. Analyzes implicit data using network meta-analysis
6. Completes moderator analysis of implicit data
7. Compares implicit & explicit data
8. Compares implicit & behavioral data
9. Analyzes indirect effects of procedures on explicit bias through implicit bias
**format_netdat**
This function is intended to be called by ddply. The function calculates standardized mean differences and their variance components from a single study. The study can consist of two or more groups of people with either a quantitative or a categorical outcome variable. The function returns a single vector of data formated as appropriate for multivariate network meta-analysis.
Inputs:
1. A data frame containing Ns, means, sds, calculated and reported effect sizes, and group identifiers
2. The names of the N, mean, sd, effect size, and group variables
3. A vector of showing the desired ordering of the groups. The group that is listed last is taken to be the reference group
4. a, a moderate number (e.g., 0)
5. b, an arbitrarily large number (e.g., 1000)
6. k, a number between 0 and 1, inclusive
7. Optionally, a vector of pre-test post-test correlations for each study. This is assumed to be NA if the study is not a pre-test post-test design
8. Optionally, a vector of TRUEs and FALSEs indicating whether the outcome variable is dichotomous
The function has a single output net_dat, a vector that contains:
1. Comparisons between each group and the reference. A study missing the reference group will be augmented with a "virtual" reference group using the data augmentation method from White, Barrett, Jackson, & Higgins (2012).
2. The within-studies variance-covariance matrix, arranged as a vector in the order specified by lower.tri(). A study missing the reference group will have the variances and covariances involving this missing reference group augmented using the user-specified parameter b (a large number).
3. A "design" variable which represents the groups in the current study contains
10. Analyzes indirect effects of procedures on behavior through implicit bias
11. Checks implicit, explicit, and behavioral data for bias using comparison-adjusted funnel plots
12. Creates figures for steps 5-11
**stack_dat**
This function is intended to be called by ddply. Assuming that two sets of studies consist of two or more groups with two outcome variables, takes a single study and the data formatted by format_netdat for multivariate network meta-analysis and returns a row that contains both sets of effect sizes, their variance components, and the variance components representing the dependencies between the two sets of effect sizes.
Inputs:
1. A data frame d representing a single study's worth of data. Each row represents a separate group of the study
2. The names of the variables in d representing the correlation between the two outcomes, and the ns, means, standard deviations, and group labels for each group
3. net_dat_1 and net_dat_2, which are complete datasets generated by format_netdat of the two outcome variables
4. The desired ordering for each group. This should match the ordering given to format_netdat in creating net_dat_1 and net_dat_2
5. The name of the variable in d, net_dat_1, and net_dat_2 that identifies the study id
6. b, a moderate number used to generate net_dat_1 and net_dat_2 if some studies did not contain the reference group
7. k, a large number used to generate net_dat_1 and net_dat_2 if some studies did not contain the reference group
8. Optionally, variables that describe whether either outcome in the current study contains the reference group
The output is a single vector containing:
1. The standardized mean differences for each outcome
2. The variance components for each outcome
3. The variance components for the degree of dependency between the effect sizes of the two sets of outcomes