## First, install the package, if you have not done this already:
if (!require("restriktor")) install.packages("restriktor")
## Then, load the packages:
library(restriktor) # for goric and evSyn functionTutorial for GORIC(A) evidence aggregation
This is a tutorial for performing GORIC(A) evidence aggregation using the evSyn function from the restriktor package. With GORIC(A) evidence aggregation, one aggregates / combines / synthesizes evidence / support for one or more central theories obtained from multiple (diverse / heterogeneous) studies using the GORIC(A).
Two examples using real data are provided.
- The first example is a step-by-step guide that illustrates GORIC(A) evidence aggregation for a central theory regarding a single relationship, using multiple heterogeneous/diverse studies.
- In the second example, GORIC(A) evidence aggregation is applied to several sets of multiple hypotheses that reflect central theories.
Here, data from the research by Berkey and colleagues (1998) is used, which is available in the metafor library.
In both examples, we will show the input for and output of the evSyn function, together with the corresponding evSyn plot. The second example will also show evSyn plot options. In both examples, the function leave1studyout will be demonstrated as well. This function re-runs the evidence synthesis where each time omitting one study; it reports which hypothesis (or better: central theory) is preferred in each reduced set.
In each primary study, a central theory is reflected by a (statistical) hypothesis. This hypothesis may differ per primary study, as long as it reflects the central theory. Section 2 gives an overview of how to specify (study-specific) sets of (study-specific) hypotheses in the evSyn function.
The evSyn function currently accepts the following objects as input:
- a list of vectors with (standardized) parameter estimates;
- a list of vectors with log-likelihood values together with a list of vectors with penalty values;
- a list of vectors with GORIC(A) values;
- a list of vectors with GORIC(A) weights;
- a list of vectors with ratios of GORIC(A) weights (versus a reference hypothesis / central theory);
- a list of objects of class goric;
- a data.frame of class escalc from the metafor package or a regular data.frame using the same labeling.
In the first and last option, evSyn will calculate the GORICA first using goric. Some of the above options will be demonstrated below (in the examples and in Section 3).
Three types of approaches for evidence aggregation (‘type_ev’) are possible:
- “equal”,
- “added”, and
- “average”.
The latter should be used when doing a multiverse analysis and, thus, when the aim is to average results from multiple analysis on one data set (due to different operationalization choices). The other two can be used when aggregating results from multiple studies: In case of an equal-evidence approach, evidence from N = 5 studies with n = 100 observations (with support for the central theory) is meant to be the same as obtaining evidence from 1 study with n = 5 * 100 = 500 observations (with support for the central theory) – as in a meta-analysis. Note, however, that this only holds when the studies render (nearly) the same estimates. When the study-specific estimates differ, as is the case for independent samples, the misfit of a hypothesis adds up over the studies, while the complexity is averaged. Consequently, the equal-evidence approach then favors larger hypotheses (e.g., the failsafe), and more so when more studies are combined; with many (small) studies, it can even prefer the failsafe when the central theory is true (Kuiper, in preparation: ‘Two types of overall evidence for a central theory using an AIC-type criterion’). When the studies can be pooled (i.e., have the same design and thus the same parameters), I recommend applying the GORICA to the meta-analyzed estimates instead (see the last part of Example 2). In the added-evidence approach, the evidence aggregated from N = 5 studies with n = 100 observations (with support for the central theory) is stronger than if the data came from a single study with n = 5 * 100 = 500 observations (with support for the central theory). This approach quantifies the support for the central theory being true in each of the studies, which is in line with the aim of conceptual replications (i.e., studies with different designs).
When combining (many) underpowered studies, the added-evidence approach can favor the smallest hypothesis, also when it is incorrect. One can detect this by checking the (study-specific and overall) log-likelihood (LL) weights (see the next note).
For ease, this tutorial only shows code for the added approach, but one can easily adjust it to the equal approach by specifying “type_ev = ‘equal’” in the evSyn function.
However, when the input is a list of i) GORIC(A) values, ii) GORIC(A) weights, or iii) ratios of GORIC(A) weights, equal-evidence approach is not possible (the added-evidence approach is then used instead).
Notes
- In the examples, the evidence from 4 and 5 primary studies are aggregated. It is of course also possible to perform GORIC(A) evidence aggregation on many more studies.
- For (more) information regarding interpreting the GORIC(A) output, see ‘Guidelines_output_GORIC’ (https://github.com/rebeccakuiper/Tutorials).
- Checking the log-likelihood (LL) weights: The
evSynoutput also reports the (study-specific and overall) LL weights. As for a single study (see ‘Guidelines_output_GORIC’), these can be used for two purposes:- Is the sample size large enough to detect a more complex hypothesis? When the preferred (central) hypothesis does not have the highest LL weight, the studies are probably underpowered (e.g., to detect a true failsafe). This is especially important for the added-evidence approach, since combining (many) underpowered studies can lead to support for the smallest but incorrect hypothesis. Note that a hypothesis with equality restrictions never has the highest fit, even when it is true.
- Is there support for the boundary of hypotheses? When the LL weights of hypotheses are (approximately) the same, there is support for their boundary/overlap. This check is only needed when the boundary is of interest (e.g., \(\beta = 0\) when evaluating \(\beta > 0\)); not when non-zero bounds reflect a minimum meaningful effect (e.g., \(\beta > 0.1\)) or when range restrictions are used (e.g., \(-0.07 < \mu_1 - \mu_2 < 0.07\)). Then, a ratio of GORIC(A) weights of 1 or more is sufficient.
- Is the sample size large enough to detect a more complex hypothesis? When the preferred (central) hypothesis does not have the highest LL weight, the studies are probably underpowered (e.g., to detect a true failsafe). This is especially important for the added-evidence approach, since combining (many) underpowered studies can lead to support for the smallest but incorrect hypothesis. Note that a hypothesis with equality restrictions never has the highest fit, even when it is true.
- The GORIC(A) weights reflect the (un)certainty about which hypothesis (or better: central theory) is the best, not the size of the effect(s). For example, when a hypothesis stating that an effect is at least medium receives (almost) full support, one can be (very) certain that the effect is at least medium; but it can just as well be (very certainly) just medium. This is illustrated for Set 2 of Example 2.
Install and load package Next, you find code to load the evSyn function from the restriktor package, which is needed to perform the analysis. You can find also code to show the documentation for the function in the help-tab.
# If you want to use restriktor from github:
#if (!require("devtools")) install.packages("devtools")
#library(devtools)
#install_github("LeonardV/restriktor")
#install_github("LeonardV/restriktor", force = TRUE)
#
# Or possibly:
#if (!require("remotes")) install.packages("remotes")
#library(remotes)
##remotes::install_github("LeonardV/restriktor", ref = "Branch_Rebec", force = TRUE)
#remotes::install_github("LeonardV/restriktor@Branch_Rebec", force = TRUE)
#library(restriktor) # for evSyn and goric function
# print docs in the help-tab to view arguments and explanations for the function
#?evSyn
Examples with R code
Example 1: Relationship previous experience and trust
This example uses data from four studies that investigate whether buyer’s trust is affected by previous experiences between a buyer and a seller. The studies investigated this relationship with different statistical models; namely, with linear, probit, and three-level logistic regressions models (which make the parameter estimates incomparable).
The central theory is that previous experience is positively related to trust. The (study-specific) hypothesis that reflect this central theory is \(H_{+}: \beta_{past} > 0\), in all four studies.
In each study, the GORICA weights denote the support for the hypothesis of interest and thus the study-specific support for the central theory. Using GORICA evidence aggregation, the combined/aggregated/synthesized support/evidence for the central theory over all four diverse studies is obtained. Next, the corresponding R code is given.
Data preparation
Load the data and inspect it.
data(Kuiper2012estimates)
dat_Ex1 <- Kuiper2012estimates
dat_Ex1 study year estimate se
1 Batenburg et al. 2003 0.090 0.029
2 Buskens and Raub 2002 0.140 0.054
3 Buskens and Weesie 2000 1.090 0.093
4 Buskens et al. 2010 1.781 0.179
The data consists of four rows and four columns. Each row represents a study. The columns are:
study: the authors of the study,
year: the year the study was published,
estimate: the estimate of \(\beta_{past}\),
se: the standard error of the estimate.
Only the estimates and their standard errors (or better, their variances) are needed to perform GORICA evidence aggregation.
Data for evSyn
In this case, the evSyn function requires some pre-processing of the data: it needs the estimates and their variances as a list of named vectors and as a list of (unnamed) covariance matrices, respectively. Each element in the list must represent a single study.
# set estimates as named vectors and store in list.
estimates <- lapply(dat_Ex1$estimate, setNames, "beta_past")
# store variances (i.e., the square of the standard errors)
# in list of matrices.
covmats <- lapply(dat_Ex1$se^2, as.matrix)
Hypotheses
One also needs to specify the (study-specific) theory-based hypothesis to be evaluated, using the name/label of the parameters. The expectation is that positive experiences with the seller in the past will have a positive effect on the buyer’s trust. In this example, the same theory-based hypothesis can be used for all studies:
Hpos <- 'beta_past > 0'This hypothesis is evaluated against its complement; which equals \('beta\_past < 0'\) in this case. Notably, when the hypothesis and its complement obtain equal support, then this would indicate support for the boundary, that is, the equality-constrained hypothesis \('beta\_past = 0'\).
GORICA Evidence Synthesis
Using the created lists and hypothesis, run evSyn and obtain the results for GORICA Evidence Synthesis:
# Evidence-synthesis (the added-evidence approach)
evSyn_trust <- evSyn(estimates, VCOV = covmats,
hypotheses = list(Hpos = Hpos)
#comparison = 'complement', # default
# type_ev = 'added' # default
)
# Show output
evSyn_trustrestriktor (0.7): added Evidence Synthesis results:
Input type 'est_vcov' detected: Parameter estimates and covariance matrix
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
Hpos 1.000 1.000
Complement 0.000 0.000
---
Ratio final GORICA weights:
vs. Hpos vs. Complement
Hpos 1.000 7.54e+54
Complement 0.000 1.000
# Final ratios of GORICA weights:
#round(evSyn_trust$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(evSyn_trust)
# Study-specific GORICA weights:
#evSyn_trust$GORICA_weight_m
# evSyn plot:
plot(evSyn_trust)
Here, one can see that the final/overall aggregated GORICA weights imply that \(H_{+}\) (Hpos) has full support.
Often a ratio of GORICA weights helps in interpreting the results. Such a ratio represents the relative aggregated support for one hypothesis (or better: central theory) over the other. It is presented in a \(M \times M\) matrix, where \(M\) is the number of hypotheses in the set, where the diagonals represent the aggregated support of a hypothesis with itself, which is always one.
To quantify the support for the central theory: The central theory \(H_{+}\) has 7.5^{54} (i.e., practically infinite) times more support than its complement, that is, all other possible theories.
The conclusion, thus, would be that positive past experiences with a seller have a positive effect on the buyer’s trust in that seller.
Sensitivity/Outlier analysis: Leave one study out
The function leave1studyout can be used to obtain insight into possible outlier or influential studies; or stated otherwise: to do a sensitivity analysis on the GORICA Evidence Synthesis. This function re-runs the evidence synthesis where each time omitting one study. It reports which hypothesis is preferred in each reduced set.
leave1out <- leave1studyout(evSyn_trust)
#leave1out
leave1out$OverallGoricaWeights Hpos Complement
Leave Study 1 out: 1 1.638089e-53
Leave Study 2 out: 1 3.823582e-54
Leave Study 3 out: 1 8.955590e-26
Leave Study 4 out: 1 4.166967e-34
In this example, the conclusion will not change when one of the studies is left out. In all configurations, ‘Hpos’ is the overall preferred hypothesis (receiving full support).
Example 2: Comparing surgical and non-surgical treatments for periodontal disease
Background Information & Data
In the study by Berkey and colleagues (1998), surgical and non-surgical treatments for medium-severity periodontal disease are compared in five trials (i.e., 5 studies). Two outcomes reflect severity: attachment level (AL) and probing depth (PD) one year after the treatment. Higher attachment levels and lower probing depth are indicators of less severity, and are thus preferred.
The effect sizes to be aggregated are the (raw) mean differences, where non-surgical treatment is the reference category. The outcomes are calculated such that a positive value indicates that surgery was more effective in reducing severity than non-surgical treatment. In summary, a positive estimate indicates effectiveness of surgery in either increasing the attachment level or decreasing the probing depth.
First, install and call the metafor library to load data from Berkey et al. (1998) and the restriktor library to load the evSyn function. If needed, it is possible to view the description of the data set and function with the ? operator or the help command.
Let us inspect the data.frame:
View(dat)Each trial is one study into the comparison of surgical and non-surgical treatments for severity of periodontal disease one year after treatment. Every study contains two rows in the dat data.frame, one for probing depth (PD) and one for attachment level (AL).
We can use the data.frame as input, but we could also use a list of vectors with (standardized) parameter estimates. For the latter, we need to prepare the data in such a way that it can be used as input for evSyn: store the estimates and covariance matrices in a list where each element of the list represents a single study.
# Store estimates in list of named vectors
estimates <- lapply(seq(1, nrow(dat), 2), function(i)
setNames(c(dat$yi[i:(i+1)]), c('PD', 'AL')))
# Note that these names will be used in specifying the hypotheses.
# Store (co-)variances in list of (unnamed) variance-covariance matrices.
covmats <- lapply(seq(1, nrow(dat), 2), function(i)
as.matrix(dat[i:(i+1), c('v1i', 'v2i')]))
# Note that it does not matter what the names/labels are;
# for the estimates it does matter.
Hypotheses
Below, you can find three possible (hypothetical) sets of central theories and the corresponding hypotheses that reflect those.
Set 1
One may hypothesize from theory that surgery has
- a negative effect on attachment level, but
- a positive effect on probing depth.
In each study, this can be reflected by: \(H_{-+}: \theta_{AL} < 0; \ \theta_{PD} > 0\), where \(\theta\) denotes the difference in means between surgical and non-surgical treatments.
There may also be reason to believe that surgery is too invasive, and thus non-surgery decreases severity on both outcomes compared to surgery: \(H_{--}: \theta_{AL} < 0; \ \theta_{PD} < 0\).
Set 2
Alternatively, it can be the case that there is theory regarding the magnitude of the effect size and one wants to compare it to some cut-off value for that specific effect size type (e.g., when using Cohen’s d or Hedges’ g). In this example, there might be theory regarding the size of the mean differences stating: \(H_{minAbsES}: |\theta_{AL}| > 0.2; \ |\theta_{PD}| > 0.2\). This states that the absolute difference between the treatments on both outcomes is larger than 0.2.
Set 3
As a final example, it might be expected from theory that the absolute size of the effect for \(AL\) is smaller than for \(PD\). In this example, the comparison of effect sizes can be represented by: \(H_{absComp}: |\theta_{AL}| < |\theta_{PD}|\). This states that the absolute effect of surgery on attachment level is smaller than its absolute effect on probing depth.
Next, you can specify the (study-specific) hypotheses, where you now need the variable names or assigned names/labels of the estimates instead of the (Greek) parameter names:
# Set 1
H1.1 <- "AL < 0; PD > 0"
H1.2 <- "AL < 0; PD < 0"
# Set 2
H2 <- "abs(AL) > 0.2; abs(PD) > 0.2"
# Set 3
H3 <- "abs(AL) < abs(PD)"
GORICA Evidence Synthesis
Set 1
In the first set, H1.1 and H1.2 are investigated together, as if these are the hypotheses of interest (and each study uses the same specification, that is, the same set of hypotheses is applied to each study).
Next, two evSyn input specifications are shown. Both specification of course lead to same results, which are discussed subsequently.
Input: list of vectors with parameter estimates
# Study names #
# Instead of using numbers for the studies, one can also attach names to them.
# Here, the author names will be used, listed in the variable author in the data.frame:
study_names <- dat[dat$outcome=="AL",]$author
# GORICA evidence synthesis (the added-evidence approach) #
results_Set1_est <- evSyn(object = estimates, VCOV = covmats,
hypotheses = list(H_neg_pos = H1.1, H_neg_neg = H1.2), # here, you can (re-)label hypotheses
#comparison = "unconstrained" # default (if multiple hypotheses)
#type_ev = "added" # default
study_names = study_names
)
# Show output
results_Set1_estrestriktor (0.7): added Evidence Synthesis results:
Input type 'est_vcov' detected: Parameter estimates and covariance matrix
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H_neg_pos 0.500 0.997
H_neg_neg 0.000 0.000
Unconstrained 0.500 0.003
---
Ratio final GORICA weights:
vs. H_neg_pos vs. H_neg_neg vs. Unconstrained
H_neg_pos 1.000 4.95e+34 285.368
H_neg_neg 0.000 1.000 0.000
Unconstrained 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1_est$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1_est)
# Study-specific GORICA weights:
#results_Set1_est$GORICA_weight_m
# evSyn plot:
plot(results_Set1_est)
Input: data.frame
If there would be only one (effect size) estimate, one can specify the data.frame as the input without an extra data-argument. When not specifying the data-argument ‘outcome_col’, the function assumes that the parameter of interest is called ‘theta’; as it will also mention. The hypotheses should then also use that labeling.
When not specifying this argument and having a variable/column called ‘outcome’, then it assumes you will use the names/labels/levels used there.
In this case, we have two parameters of interest. Since we have the variable ‘outcome’ in our data set (cf. ‘dat$outcome’), we do not need to use the data-argument ‘outcome_col’. Next, I will show code in which we do specify the data-argument ‘outcome_col’. This argument needs the name of the column that contains the outcome names, which then denotes the labels of our parameters of interest. The hypotheses should then be specified using those outcome names (cf. ‘unique(dat$outcome)’. Here, the column is called ‘outcome’, which contains the names/labels ‘AL’ and ‘PD’ (which should then be used in the hypothesis specification, as we did above).
# To see the parameter labels/names to be used in the hypotheses:
unique(dat$outcome)[1] "PD" "AL"
# Evidence-synthesis (the added-evidence approach)
results_Set1 <- evSyn(object = dat,
outcome_col = "outcome", # column with 'AL' & 'PD'; default
hypotheses = list(H_neg_pos = H1.1, H_neg_neg = H1.2),
#comparison = "unconstrained" # default (if multiple hypotheses)
#type_ev = "added" # default
study_names = study_names
)
# Show output
results_Set1restriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H_neg_pos 0.500 0.997
H_neg_neg 0.000 0.000
Unconstrained 0.500 0.003
---
Ratio final GORICA weights:
vs. H_neg_pos vs. H_neg_neg vs. Unconstrained
H_neg_pos 1.000 4.95e+34 285.368
H_neg_neg 0.000 1.000 0.000
Unconstrained 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1)
# Study-specific GORICA weights:
#results_Set1$GORICA_weight_m
# evSyn plot:
plot(results_Set1)
Intermezzo: Plot options
The evSyn plot is a ‘ggplot’ and can be changed as such.
As an example, one could change the x-axis colors based on the value(s) of another variable (in a way, looking at subgroups):
# Change x-axis color #
# Next, we set the colors based on two subgroups of studies,
# those published before 1983 (dark-gray) and those published that year or later (black):
evSynplot <- plot(results_Set1)
cols_subgroup <- ifelse(dat$year < 1983, "darkgray", "black")
library(ggplot2)
evSynplot_subgroup <- evSynplot + theme(axis.text.x = element_text(colour = cols_subgroup))
evSynplot_subgroup
As another example, one can overwrite the subtitle:
# Change subtitle #
evSynplot_subgroup_subtitle <- evSynplot_subgroup + labs(subtitle = 'For studies published < and >= 1983')
evSynplot_subgroup_subtitle
Result
When inspecting the (ratios of) final GORICA weights, one can see that \(H_{-+}\) (‘H_neg_pos’) is not weak, since its final GORICA weight is higher than that of the unconstrained (or: their ratio is larger than 1). Furthermore, \(H_{-+}\) is convincingly preferred over its alternative \(H_{--}\) (‘H_neg_neg’): \(H_{-+}\) is practically an infinite amount of times more likely than \(H_{--}\), given the data. Therefore, it can be concluded that surgical performance has a positive effect on probing depth, but a negative effect on attachment level.
Follow-up analysis
Now, you may also want to investigate \(H_{-+}\) (‘H_neg_pos’) against its complement, which may be helpful for future research:
# Evidence-synthesis (the added-evidence approach)
results_Set1_H1c <- evSyn(#estimates, VCOV = covmats,
object = dat,
outcome_col = "outcome", # default
hypotheses = list(H_neg_pos = H1.1),
#comparison = 'complement', # default
#type_ev = "added", # default
study_names = study_names
)
# Show output
results_Set1_H1crestriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H_neg_pos 1.000 1.000
Complement 0.000 0.000
---
Ratio final GORICA weights:
vs. H_neg_pos vs. Complement
H_neg_pos 1.000 2.8e+14
Complement 0.000 1.000
# Final ratios of GORICA weights:
#round(results_Set1_H1c$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1_H1c)
# Study-specific GORICA weights:
#results_Set1_H1c$GORICA_weight_m
# evSyn plot:
plot(results_Set1_H1c)
One can see that \(H_{-+}\) is also much more likely than its complement, that is, all other possible hypotheses / theories.
Set 2
In the second set, \(H_{minAbsES}\) is the supposed central theory / hypothesis of interest, which will be denoted as H1 because that would be what you probably use in practice when evaluating this set. Notably, when not specifying a hypothesis label, H1 will also be, by default, the name of this hypothesis.
H1 states that the mean difference between surgery and non-surgery is larger than 0.2 for both outcomes. Note that the same hypothesis specification can be used for all studies.
# Evidence-synthesis (the added-evidence approach)
results_Set2 <- evSyn(object = dat,
outcome_col = "outcome", # default
hypotheses = list(H1 = H2),
#comparison = 'complement', # default
study_names = study_names
)
# Show output
results_Set2restriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1 0.466 0.975
Complement 0.534 0.025
---
Ratio final GORICA weights:
vs. H1 vs. Complement
H1 1.000 39.305
Complement 0.025 1.000
# Final ratios of GORICA weights:
#round(results_Set2$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set2)
# Study-specific GORICA weights:
#results_Set2$GORICA_weight_m
# evSyn plot:
plot(results_Set2)
It can be concluded that H1 (i.e., \(H_{minAbsES}\)) is the best hypothesis (or better: central theory) as it is 39.3 (\(>\) 1) times more likely than its complement. Hence, it is very likely that the absolute difference between the treatments on both outcomes is larger than 0.2.
Note that this does not mean that the differences are large: The GORICA weights reflect how certain one can be that the absolute differences are larger than 0.2, not how much larger they are. The differences may very well be just above 0.2; the fixed-effect meta-analyzed estimates (see the last part of this example), for instance, are about \(-0.39\) for AL and \(0.31\) for PD. To learn more about the size, one could evaluate hypotheses that specify ranges of values (e.g., \(0.2 < |\theta| < 0.5\) versus \(|\theta| > 0.5\)).
From the Study-specific results (available via the summary function) and the plot, it can be seen that the studies show somewhat mixed results: most preferring H1, while Study 3 clearly prefers the complement of H1. When aggregating the evidence, this results (in this case) in support for H1. Especially when there are many studies, it can be helpful to order the studies based on study-specific support for the overall best hypothesis (order_studies = “ascending” or “descending”). This way, it is more clear which studies do not find support for the overall best hypothesis, and one can look at study characteristics to find a possible alternative explanation. This of course does not affect the overall evidence/support.
# Evidence-synthesis (the added-evidence approach)
# Ordering studies based on ascending support for the overall best central theory
results_Set2_asc <- evSyn(object = dat,
outcome_col = "outcome", # default
#hypotheses = list(H2), # default name will be H1
hypotheses = list(H1 = H2), # this way you can label yourself
order_studies = "ascending",
study_names = study_names)
# Show output
results_Set2_ascrestriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
The studies are re-ordered (argument 'order_studies'): the study-specific
and cumulative output follows this order. Position of these studies in the
input: 3, 2, 5, 4, 1 (see $order_studies).
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1 0.466 0.975
Complement 0.534 0.025
---
Ratio final GORICA weights:
vs. H1 vs. Complement
H1 1.000 39.305
Complement 0.025 1.000
# Final ratios of GORICA weights:
#round(results_Set2_asc$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set2_asc)
# Study-specific GORICA weights:
#results_Set2_asc$GORICA_weight_m
# evSyn plot:
plot(results_Set2_asc)
If of interest, one can also specify their own order perhaps based on one of the study characteristics:
# Evidence-synthesis (the added-evidence approach)
# Ordering studies based on (ascending) year of publication
order_ascYear <- order(dat[dat$outcome=="AL",]$year)
results_Set2_ascYear <- evSyn(object = dat,
outcome_col = "outcome", # default
hypotheses = list(H1 = H2),
study_names = study_names,
order_studies = order_ascYear)
# Show output
results_Set2_ascYearrestriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
The studies are re-ordered (argument 'order_studies'): the study-specific
and cumulative output follows this order. Position of these studies in the
input: 3, 2, 1, 4, 5 (see $order_studies).
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1 0.466 0.975
Complement 0.534 0.025
---
Ratio final GORICA weights:
vs. H1 vs. Complement
H1 1.000 39.305
Complement 0.025 1.000
# Final ratios of GORICA weights:
#round(results_Set2_ascYear$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set2_ascYear)
# Study-specific GORICA weights:
#results_Set2_ascYear$GORICA_weight_m
# evSyn plot:
plot(results_Set2_ascYear)
Intermezzo: Study weights
If you want to assign study weights to each of the studies, you can do that with the ‘study_weights’ argument:
results_Set2_ascYear_stw <- evSyn(object = dat,
outcome_col = "outcome", # column with 'AL' & 'PD'; default
hypotheses = list(H1 = H2),
#type = "added", # Default
#comparison = "complement", # default (if one hypothesis)
study_names = study_names,
order_studies = order_ascYear,
study_weights = c(1/10, 2/10, 3/10, 2/10, 2/10)
)
#
# Show output
results_Set2_ascYear_stwrestriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
The studies are re-ordered (argument 'order_studies'): the study-specific
and cumulative output follows this order. Position of these studies in the
input: 3, 2, 1, 4, 5 (see $order_studies).
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1 0.466 0.888
Complement 0.534 0.112
---
Ratio final GORICA weights:
vs. H1 vs. Complement
H1 1.000 7.890
Complement 0.127 1.000
# Final ratios of GORICA weights:
#round(results_Set2_ascYear_stw$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set2_ascYear_stw)
# evSyn plot:
plot(results_Set2_ascYear_stw)
This most probably changes the results, since studies are weighted differently (no longer equally).
Sensitivity/Outlier analysis: Leave one study out
The function leave1studyout can be used to obtain insight into possible outlier or influential studies; or stated otherwise: to do a sensitivity analysis on the GORICA Evidence Synthesis:
# Sensitivity / Outlier / Leave-one-study-out analysis
leave1out_Set2 <- leave1studyout(results_Set2)
# Show output
#leave1out_Set2
leave1out_Set2$OverallGoricaWeights H1 Complement
Leave study nr. 1 called 'Pihlstrom et al.' out: 0.8784605 0.121539475
Leave study nr. 2 called 'Lindhe et al.' out: 0.9475680 0.052431981
Leave study nr. 3 called 'Knowles et al.' out: 0.9944552 0.005544754
Leave study nr. 4 called 'Ramfjord et al.' out: 0.9060742 0.093925782
Leave study nr. 5 called 'Becker et al.' out: 0.9134987 0.086501271
In this example, the results are not sensitive to the choice of set of studies: For all configurations, H1 (i.e., \(H_{minAbsES}\)) is the best hypothesis (or better: central theory), and it receives full support.
Set 3
In the third set, the hypothesis (or better: central theory) of interest is \(H_{absComp}\), H1 in this set, which states that the negative effect of surgery on attachment level is smaller than the positive effect on probing depth. Also here, the same hypothesis specification can be used for all studies.
# Evidence-synthesis (the added-evidence approach)
results_Set3 <- evSyn(object = dat,
outcome_col = "outcome", # default
hypotheses = list(H1 = H3),
study_names = study_names)
# Show output
results_Set3restriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1 0.256 0.256
Complement 0.744 0.744
---
Ratio final GORICA weights:
vs. H1 vs. Complement
H1 1.000 0.344
Complement 2.907 1.000
# Final ratios of GORICA weights:
#round(results_Set3$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set3)
# Study-specific GORICA weights:
#results_Set3$GORICA_weight_m
# evSyn plot:
plot(results_Set3)
The output shows that H1 (i.e., \(H_{absComp}\)) is 0.34 times more likely than its complement. Hence, the complement of H1 is 2.91 times more likely than H1 (i.e., \(H_{absComp}\)) itself.
From the Study-specific results (available via the summary function) and the plot, it can be seen that the studies show mixed results. When aggregating the evidence, this results (in this case) in support for the complement of H1.
Sensitivity/Outlier analysis: Leave one study out
The function leave1studyout can be used to obtain insight into possible outlier or influential studies; or stated otherwise: to do a sensitivity analysis on the GORICA Evidence Synthesis:
leave1out_Set3 <- leave1studyout(results_Set3)
leave1out_Set3 restriktor (0.7): leave-one-study-out results (added evidence synthesis)
GORICA weights (based on the remaining studies):
H1 Complement
Leave study nr. 1 called 'Pihlstrom et al.' out: 0.168 0.832
Leave study nr. 2 called 'Lindhe et al.' out: 1.000 0.000
Leave study nr. 3 called 'Knowles et al.' out: 0.000 1.000
Leave study nr. 4 called 'Ramfjord et al.' out: 0.296 0.704
Leave study nr. 5 called 'Becker et al.' out: 0.213 0.787
Preferred hypothesis:
Leave study nr. 1 called 'Pihlstrom et al.' out: Complement
Leave study nr. 2 called 'Lindhe et al.' out: H1
Leave study nr. 3 called 'Knowles et al.' out: Complement
Leave study nr. 4 called 'Ramfjord et al.' out: Complement
Leave study nr. 5 called 'Becker et al.' out: Complement
GORICA values:
H1 Complement
Leave study nr. 1 called 'Pihlstrom et al.' out: 0.590 -2.606
Leave study nr. 2 called 'Lindhe et al.' out: -16.122 1.021
Leave study nr. 3 called 'Knowles et al.' out: 3.581 -14.554
Leave study nr. 4 called 'Ramfjord et al.' out: 2.809 1.078
Leave study nr. 5 called 'Becker et al.' out: -1.510 -4.129
Note: The GORICA values are aggregated over the remaining studies, so they
change when a study is left out, and the size of that change depends on,
among others, the sample size of that study. Hence, the GORICA values
cannot be compared across the rows; inspect the GORICA weights instead to
see the influence of each study.
#leave1out_Set3$OverallGoricaWeightsIn this example, the results are sensitive to the choice of set of studies. The conclusion even changes when study nr. 2 called ‘Lindhe et al.’ is left out. When one would leave that study out, H1 (i.e., \(H_{absComp}\)) is the overall best hypothesis (or better: central theory), receiving almost full support. When one of the other studies would be left out, then the overall GORICA weight for the complement varies between 0.704 and 1; where the overall support based on all studies was 0.744.
When ordering the studies based on study-specific support for the overall best hypothesis (central theory), it also becomes more clear that the second study is an influential study:
# Evidence-synthesis (the added-evidence approach)
results_Set3_asc <- evSyn(object = dat,
outcome_col = "outcome", # default
hypotheses = list(H1 = H3),
order_studies = "ascending",
study_names = study_names)
# Show output
results_Set3_ascrestriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
The studies are re-ordered (argument 'order_studies'): the study-specific
and cumulative output follows this order. Position of these studies in the
input: 3, 1, 5, 4, 2 (see $order_studies).
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1 0.256 0.256
Complement 0.744 0.744
---
Ratio final GORICA weights:
vs. H1 vs. Complement
H1 1.000 0.344
Complement 2.907 1.000
# Final ratios of GORICA weights:
#round(results_Set3_asc$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set3_asc)
# Study-specific GORICA weights:
#results_Set3_asc$GORICA_weight_m
# evSyn plot:
plot(results_Set3_asc)
When you would perform GORICA evidence synthesis for the set of studies leaving the second one out, then this results in:
dat_subset <- dat[dat$trial!=2,]
study_names_subset <- study_names[-2]
results_Set3_asc_subset <- evSyn(object = dat_subset,
outcome_col = "outcome", # default
hypotheses = list(H1 = H3),
order_studies = "ascending",
study_names = study_names_subset)
# Show output
results_Set3_asc_subsetrestriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
The studies are re-ordered (argument 'order_studies'): the study-specific
and cumulative output follows this order. Position of these studies in the
input: 3, 4, 1, 2 (see $order_studies).
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1 1.000 1.000
Complement 1.89e-04 1.89e-04
---
Ratio final GORICA weights:
vs. H1 vs. Complement
H1 1.000 5.28e+03
Complement 1.89e-04 1.000
# Final ratios of GORICA weights:
#round(results_Set3_asc_subset$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set3_asc_subset)
# Study-specific GORICA weights:
#results_Set3_asc_subset$GORICA_weight_m
# evSyn plot:
plot(results_Set3_asc_subset)
Alternative: GORICA on meta-analysis estimates
Above, GORICA evidence synthesis was applied to results of studies with homogeneous designs / comparable estimates. In such a case, one can also perform a meta-analysis and subsequently evaluate the central theories using the GORICA.
More information can be found in:
Kuiper, R. M. (2022). How to Evaluate Theory-Based Hypotheses in Meta-Analysis Using an AIC-Type Criterion. Entropy, 24(11), Article 1525. https://doi.org/10.3390/e24111525
When doing this, first conduct a meta-analysis (using ‘rma.mv’ from ‘metafor’). Then, evaluate the central theories using the goric function (from the restriktor package).
Notably, you can use the metafor object as input (but you could also extract the estimates of interest and their covariance matrix from the metafor object and use those, where you possibly want to re-label the estimate names).
Notably, the GORICA can be applied to fixed-effects, random-effects, and mixed-effects models. Next, the fixed-effects model is used:
# 1. Meta-analysis
# Install and load metafor package
#if (!require("metafor")) install.packages("metafor")
library(metafor)
#Construct the full (block-diagonal) variance-covariance for all studies:
V <- vcalc(vi=1, cluster=author, rvars=c(v1i, v2i), data=dat)
# Run a multivariate model to meta-analyze the two outcomes simultaneously:
res_metaan <- rma.mv(yi, V, mods = ~ 0 + outcome,
data = dat, method = "ML")
print(res_metaan, digits=3)
Multivariate Meta-Analysis Model (k = 10; method: ML)
Variance Components: none
Test for Residual Heterogeneity:
QE(df = 8) = 128.227, p-val < .001
Test of Moderators (coefficients 1:2):
QM(df = 2) = 871.319, p-val < .001
Model Results:
estimate se zval pval ci.lb ci.ub
outcomeAL -0.394 0.019 -21.147 <.001 -0.431 -0.358 ***
outcomePD 0.307 0.029 10.751 <.001 0.251 0.363 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Note
# When looking at the forest plot, you can also see the mixed results from these studies:
#forest(res_metaan)
# 2. Apply GORICA on meta-analysis estimates
# Check names of the overall estimates,
# these need to be used in the hypothesis specification:
names(coef(res_metaan))[1] "outcomeAL" "outcomePD"
# Hypotheses
H_neg_pos <- "outcomeAL < 0; outcomePD > 0"
H_neg_neg <- "outcomeAL < 0; outcomePD < 0"
# GORICA on meta-analyzed, overall estimates
results_metaan_GORICA <- goric(res_metaan,
hypotheses = list(H_neg_pos = H_neg_pos,
H_neg_neg = H_neg_neg)
#comparison = "unconstrained" # default (if multiple hypotheses)
#type = "gorica" # default
)
# Show output
results_metaan_GORICArestriktor (0.7): generalized order-restricted information criterion approximation:
Results:
Values:
model loglik penalty gorica
1 H_neg_pos 5.781 0.873 -9.817
2 H_neg_neg -52.013 1.127 106.281
3 unconstrained 5.781 2.000 -7.562
Weights:
model loglik.weights penalty.weights gorica.weights gorica.weights_without_unc
1 H_neg_pos 0.500 0.476 0.755 1.000
2 H_neg_neg 0.000 0.369 0.000 0.000
3 unconstrained 0.500 0.154 0.245
Conclusion:
- The order-restricted hypothesis 'H_neg_pos' is the best in the set, as it
has the highest GORICA weight.
- Since 'H_neg_pos' has a higher GORICA weight than the unconstrained
hypothesis, it is not considered weak. We can now inspect the relative
support for 'H_neg_pos' against the other order-restricted hypotheses:
* 'H_neg_pos' is 1.623e+25 times more supported than 'H_neg_neg'.
---
Additional information:
- It is advisable to compare the log-likelihood values (loglik) and/or
weights (loglik.weights) of the best hypothesis with that of the other
specified/informative hypotheses. More details can be found in the
vignette 'Guidelines_GORIC_output' (to open it, run
vignette("Guidelines_GORIC_output", package = "restriktor")) and in the
decision tree on https://github.com/rebeccakuiper/Tutorials (the file
'Decision tree - Interpretation.pdf').
- The benchmark() function can be used to label the height of the output,
for example, the height of the ratio(s) of weights (e.g., to say whether
that value denotes medium, high, or very large evidence). More details
can be found in the vignette 'Guidelines_GORIC-benchmarks'; to open it,
run vignette("Guidelines_GORIC-benchmarks", package = "restriktor").
- The results (including the conclusion) of the post-hoc analysis, in which
the best hypothesis ('H_neg_pos') is evaluated against its complement,
are stored in the goric object. To see them, use:
results_metaan_GORICA$posthoc
round(results_metaan_GORICA$ratio.gw, 2) vs. H_neg_pos vs. H_neg_neg vs. unconstrained
H_neg_pos (best) 1.00 1.623032e+25 3.09
H_neg_neg 0.00 1.000000e+00 0.00
unconstrained 0.32 5.258068e+24 1.00
#sprintf("%.2e", results_metaan_GORICA$ratio.gw)
#summary(results_metaan_GORICA)
Conclusion:
When inspecting the (ratios of) GORICA weights, one can see that \(H_{-+}\) (‘H_neg_pos’) is not weak, since its GORICA weight is higher than that of the unconstrained (or: their ratio is larger than 1). Furthermore, that it is convincingly preferred over its alternative \(H_{--}\) (‘H_neg_neg’).
More precise, based on the overall, meta-analyzed estimates, it is most likely that \(H_{-+}\) is correct.
Therefore, it can be concluded that surgical performance has a positive effect on probing depth, but a negative effect on attachment level.
Note: The results for the GORICA on the meta-analysis (cf. GORICA weights) closely resemble those of the equal-evidence synthesis. This is the case here, because all study-specific estimates are in agreement with \(H_{-+}\). It does not hold in general: When the study-specific estimates differ, for instance, when some studies are not in agreement with the preferred hypothesis (like Study 3 for \(H_{minAbsES}\) in Set 2), the equal-evidence approach can render (much) less support for the preferred hypothesis than the GORICA on the (fixed-effect) meta-analyzed estimates; since the misfit of a hypothesis adds up over the studies, while the complexity is averaged (Kuiper, in preparation).
Possible follow-up analysis:
Now, you may also want to investigate \(H_{-+}\) (‘H_neg_pos’) against its complement, which may be helpful for future research:
# GORICA on meta-analyzed, overall estimates
results_metaan_GORICA_H1c <- goric(res_metaan,
hypotheses = list(H_neg_pos = H_neg_pos)
#comparison = "complement" # default (if one hypothesis)
#type = "gorica" # default
)
# Show output
results_metaan_GORICA_H1crestriktor (0.7): generalized order-restricted information criterion approximation:
Results:
Values:
model loglik penalty gorica
1 H_neg_pos 5.781 0.873 -9.817
2 complement -52.013 1.627 107.281
Weights:
model loglik.weights penalty.weights gorica.weights
1 H_neg_pos 1.000 0.680 1.000
2 complement 0.000 0.320 0.000
Conclusion:
The order-restricted hypothesis 'H_neg_pos' has 2.68e+25 times more support
than its complement.
---
Additional information:
- It is advisable to compare the log-likelihood values (loglik) and/or
weights (loglik.weights) of the best hypothesis with that of the other
specified/informative hypotheses. More details can be found in the
vignette 'Guidelines_GORIC_output' (to open it, run
vignette("Guidelines_GORIC_output", package = "restriktor")) and in the
decision tree on https://github.com/rebeccakuiper/Tutorials (the file
'Decision tree - Interpretation.pdf').
- The benchmark() function can be used to label the height of the output,
for example, the height of the ratio(s) of weights (e.g., to say whether
that value denotes medium, high, or very large evidence). More details
can be found in the vignette 'Guidelines_GORIC-benchmarks'; to open it,
run vignette("Guidelines_GORIC-benchmarks", package = "restriktor").
# summary(results_metaan_GORICA_H1c)One can see that \(H_{-+}\) is also much more likely than its complement, that is, all other possible hypotheses / theories.
Specifying sets of hypotheses in evSyn
In the examples above, the set of hypotheses (reflecting the central theories) are the same for all studies. This does not need to be the case. Note: The number of hypotheses per study-specific set is always the same, but the specification of the (study-specific) hypotheses does not need to be the same for all studies.
If the specification of hypotheses differ per study, then one needs to specify the sets of hypotheses per study. Below, one can find examples of code to specify sets of hypotheses in the evSyn function in the case of having (for ease) 3 primary studies; for both the cases where there are two or 1 central theories (excluding the failsafe).
Below, you can find the following three blocks of examples:
- for having one set of 2 hypotheses for all 3 studies;
- for having 3 study-specific sets (containing 2 study-specific hypotheses);
including some incorrect specification;
- for having 3 study-specific sets of 1 hypothesis.
# If you have one set of hypotheses for all studies,
# then you should specify one list.
# You can use one of the following:
#
Hypo_studies <- list(H1, H2)
# names central theories: H1 and H2
#
Hypo_studies <- list(Hpos, Hneg)
# names central theories: H1 and H2
#
Hypo_studies <- list(Hpos = H1, Hneg = H2)
# names central theories: Hpos and Hneg
#
# Note that, in each study,
# the parameter estimate names should be the same.# If you have study-specific sets for your 3 studies,
# then you should specify 3 lists in one list.
#
# Note that the order of hypotheses in the set matters,
# as well as the labeling of the central theories.
# The labeling of the hypotheses sets does not matter.
#
# You can use one of the following:
#
Hypo_studies <- list(list(H1_St1, H2_St1),
list(H1_St2, H2_St2),
list(H1_St3, H2_St3))
# names central theories: H1 and H2
#
Hypo_studies <- list(SetStudy1 = list(H1_St1, H2_St1),
SetStudy2 = list(H1_St2, H2_St2),
SetStudy3 = list(H1_St3, H2_St3))
# names central theories: H1 and H2
# Note: the names 'SetStudy.' will not be used.
#
Hypo_studies <- list(list(Hpos = H1_St1, Hneg = H2_St1),
list(Hpos = H1_St2, Hneg = H2_St2),
list(Hpos = H1_St3, Hneg = H2_St3))
# names central theories: Hpos and Hneg
#
Hypo_studies <- list(SetStudy1 = list(Hpos = H1_St1, Hneg = H2_St1),
SetStudy2 = list(Hpos = H1_St2, Hneg = H2_St2),
SetStudy3 = list(Hpos = H1_St3, Hneg = H2_St3))
# names central theories: Hpos and Hneg
# Note: the names 'SetStudy.' will not be used.
# INcorrect ways of specifying:
Hypo_studies <- list(list(Hpos = H1_St1, Hneg = H2_St1),
list(H1 = H1_St2, H2 = H2_St2),
list(Ha = H1_St3, Hb = H2_St3))
# Note: Each central theory should have the same labeling.
#
Hypo_studies <- list(list(Hpos = H1_St1, Hneg = H2_St1),
list(Hpos = H1_St2, Hneg = H2_St2),
list(Hneg = H1_St3, Hpos = H2_St3))
# Note: The order of hypotheses in the sets should be the same.# Just to be sure,
# if there would be one central theory for all 3 studies:
#
Hypo_studies <- list(list(H1_St1),
list(H1_St2),
list(H1_St3))
# names central theories: H1
#
Hypo_studies <- list(list(Hpos = H1_St1),
list(Hpos = H1_St2) ,
list(Hpos = H1_St3))
# names central theories: Hpos
Types of input for evSyn
Estimates and their variance-covariance matrices are not necessary to perform evidence synthesis. The evSyn function also works with GORIC(A) values or GORIC(A) weights, as well as with log-likelihood and penalty values. This is shown, using Set 1 of Example 2, in the next subsections.
Notably, when using GORIC(A) values, GORIC(A) weights, or log-likelihood and penalty values as input, you do not need to specify the hypotheses in evSyn. That is because the hypotheses were provided previously when calculating the values/weights with goric. Nevertheless, to avoid confusion, hypo_names can be used for a better labeling in the output, as will be demonstrated below.
using Estimates and Covariance Matrix
As shown above, one can use estimates and their variance-covariance matrices as input for GORIC(A) evidence synthesis:
# Evidence-synthesis (the added-evidence approach)
results_Set1 <- evSyn(object = estimates, VCOV = covmats,
hypotheses = list(H1.1 = H1.1, H1.2 = H1.2)
#comparison = "unconstrained" # default (if multiple hypotheses)
#type_ev = "added" # default
)
# Show output
results_Set1restriktor (0.7): added Evidence Synthesis results:
Input type 'est_vcov' detected: Parameter estimates and covariance matrix
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1.1 0.500 0.997
H1.2 0.000 0.000
Unconstrained 0.500 0.003
---
Ratio final GORICA weights:
vs. H1.1 vs. H1.2 vs. Unconstrained
H1.1 1.000 4.95e+34 285.368
H1.2 0.000 1.000 0.000
Unconstrained 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1)
# Study-specific GORICA weights:
#results_Set1$GORICA_weight_m
# evSyn plot:
plot(results_Set1)
using Log-likelihood and Penalty Values
One can also perform evidence aggregation using log-likelihood and penalty values.
Here, these values (as vectors) are retrieved from goric functions. It is also possible to concatenate numerical values using c() and create two vectors: one containing the log-likelihood values of each study and one containing the penalties of each study. Then, you should make two lists of the study-specific vectors, which then should be fed into evSyn, in the object and PT arguments, respectively.
# goric objects needed to obtain the GORICA values from
gorica_Study1 <- goric(estimates[[1]], VCOV = covmats[[1]], hypotheses = list(H1.1 = H1.1,
H1.2 = H1.2))
gorica_Study2 <- goric(estimates[[2]], VCOV = covmats[[2]], hypotheses = list(H1.1 = H1.1,
H1.2 = H1.2))
gorica_Study3 <- goric(estimates[[3]], VCOV = covmats[[3]], hypotheses = list(H1.1 = H1.1,
H1.2 = H1.2))
gorica_Study4 <- goric(estimates[[4]], VCOV = covmats[[4]], hypotheses = list(H1.1 = H1.1,
H1.2 = H1.2))
gorica_Study5 <- goric(estimates[[5]], VCOV = covmats[[5]], hypotheses = list(H1.1 = H1.1,
H1.2 = H1.2))
# Log-likelihood (LL) values: list of LL values for each of the five studies
LL_Set1 <- list(gorica_Study1$result[,2], gorica_Study2$result[,2],
gorica_Study3$result[,2], gorica_Study4$result[,2],
gorica_Study5$result[,2])
#
# Penalty (PT) values: list of PT values for each of the five studies
PT_Set1 <- list(gorica_Study1$result[,3], gorica_Study2$result[,3],
gorica_Study3$result[,3], gorica_Study4$result[,3],
gorica_Study5$result[,3])
# GORICA evidence synthesis (the added-evidence approach)
results_Set1_LLandPT <- evSyn(LL_Set1, PT = PT_Set1
#type_ev = "added" # Default)
)
# Show output
results_Set1_LLandPTrestriktor (0.7): added Evidence Synthesis results:
Input type 'll_pt' detected: Log-likelihood and penalty values
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1 0.500 0.997
H2 0.000 0.000
H3 0.500 0.003
---
Ratio final GORICA weights:
vs. H1 vs. H2 vs. H3
H1 1.000 4.95e+34 285.368
H2 0.000 1.000 0.000
H3 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1_LLandPT$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1_LLandPT)
# Study-specific GORICA weights:
#results_Set1_LLandPT$GORICA_weight_m
# evSyn plot:
plot(results_Set1_LLandPT)
The results lead us to the same output as above of course.
In cases where hypotheses names may be confusing, as it is here, it is recommended to use the hypo_names function argument to make the results more accessible. In this example, the function would be:
# Evidence-synthesis (the added-evidence approach)
# Here, with specifying your own names/labeling for the central theories / hypotheses
results_Set1_LLandPT <- evSyn(LL_Set1, PT = PT_Set1,
hypo_names = c("H1.1", "H1.2", "Hu"))
# Show output
results_Set1_LLandPTrestriktor (0.7): added Evidence Synthesis results:
Input type 'll_pt' detected: Log-likelihood and penalty values
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1.1 0.500 0.997
H1.2 0.000 0.000
Hu 0.500 0.003
---
Ratio final GORICA weights:
vs. H1.1 vs. H1.2 vs. Hu
H1.1 1.000 4.95e+34 285.368
H1.2 0.000 1.000 0.000
Hu 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1_LLandPT$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1_LLandPT)
# Study-specific GORICA weights:
#results_Set1_LLandPT$GORICA_weight_m
# evSyn plot:
plot(results_Set1_LLandPT)
using GORIC(A) Values
The GORIC(A) values can be used as input by creating a vector with the c() command; e.g., c(gorica_H1, gorica_H2, gorica_Hu).
Below, the GORICA values are extracted from a goric object.
# goric objects needed to obtain the GORICA values from
gorica_Study1 <- goric(estimates[[1]], VCOV = covmats[[1]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study2 <- goric(estimates[[2]], VCOV = covmats[[2]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study3 <- goric(estimates[[3]], VCOV = covmats[[3]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study4 <- goric(estimates[[4]], VCOV = covmats[[4]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study5 <- goric(estimates[[5]], VCOV = covmats[[5]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
# list of GORICA values for each of the five studies
GORICA <- list(gorica_Study1$result[,4], gorica_Study2$result[,4],
gorica_Study3$result[,4], gorica_Study4$result[,4],
gorica_Study5$result[,4])
#GORICA
# GORICA evidence synthesis (the added-evidence approach)
results_Set1_gorica <- evSyn(GORICA,
#type_ev = "added", # default. Btw "equal" not possible here.
hypo_names = c("H1.1", "H1.2", "Hu"))
# Show output
results_Set1_goricarestriktor (0.7): added Evidence Synthesis results:
Input type 'icvalues' detected: Information criteria values
---
Final GORICA weights:
GORICA weights
H1.1 0.997
H1.2 0.000
Hu 0.003
---
Ratio final GORICA weights:
vs. H1.1 vs. H1.2 vs. Hu
H1.1 1.000 4.95e+34 285.368
H1.2 0.000 1.000 0.000
Hu 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1_gorica$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1_gorica)
# Study-specific GORICA weights:
#results_Set1_gorica$GORICA_weight_m
# evSyn plot:
plot(results_Set1_gorica)
The results lead us to the same output as above of course.
Bear in mind that equal-evidence approach is not possible; the added-evidence approach is then used instead.
using GORIC(A) Weights
Similarly, the GORIC(A) weights can be used (or posterior model probabilities, rendered from Bayesian model selection):
# list of GORICA weights for each of the five studies
GORICAweights <- list(gorica_Study1$result[,7], gorica_Study2$result[,7],
gorica_Study3$result[,7], gorica_Study4$result[,7],
gorica_Study5$result[,7])
#GORICAweights
# GORICA evidence synthesis (the added-evidence approach)
results_Set1_gw <- evSyn(GORICAweights,
#type_ev = "added", # default. Btw "equal" not possible here.
hypo_names = c("H1.1", "H1.2", "Hu"))
# Show output
results_Set1_gwrestriktor (0.7): added Evidence Synthesis results:
Input type 'icweights' detected: Information criteria weights (summing to 1)
---
Final GORICA weights:
GORICA weights
H1.1 0.997
H1.2 0.000
Hu 0.003
---
Ratio final GORICA weights:
vs. H1.1 vs. H1.2 vs. Hu
H1.1 1.000 4.95e+34 285.368
H1.2 0.000 1.000 0.000
Hu 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1_gw$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1_gw)
# Study-specific GORICA weights:
#results_Set1_gw$GORICA_weight_m
# evSyn plot:
#plot(results_Set1_gorica)Once more, one can see that the results do not change when the function arguments changed (as it denotes the same input). Any of these methods is suitable for aggregating evidence over multiple studies.
As in the previous sections, it is not necessary to specify the hypotheses in evSyn. However, to avoid confusion, hypo_names is used for a better labeling in the output.
Bear in mind that equal-evidence approach is not possible; the added-evidence approach is then used instead.
using ratio of GORIC(A) weights
The ratios of GORIC(A) weights (rgw) can be used as input (or Bayes factors, rendered from Bayesian model selection). One can use it by creating a vector with the c() command; e.g., c(rgw_H1_vs_H1, rgw_H2_vs_H1, rgw_Hu_vs_H1). You need to pick the ratios for all hypotheses versus one reference hypothesis. Below, the ratios of GORIC(A) weights are extracted from a goric object, where we pick ‘H1.1’ as the reference hypothesis.
Then, you should make a list of these vectors, which then should be fed into evSyn (in the object input argument):
# goric objects needed to obtain the GORICA values from
gorica_Study1 <- goric(estimates[[1]], VCOV = covmats[[1]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study2 <- goric(estimates[[2]], VCOV = covmats[[2]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study3 <- goric(estimates[[3]], VCOV = covmats[[3]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study4 <- goric(estimates[[4]], VCOV = covmats[[4]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study5 <- goric(estimates[[5]], VCOV = covmats[[5]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
# list of ratio of GORICA weights (RGW) for each of the five studies
# for all hypotheses versus H1.1;
# thus, use column 1 of the ratio of GORICA weights output ('ratio.gw'):
RGW <- list(gorica_Study1$ratio.gw[,1], gorica_Study2$ratio.gw[,1],
gorica_Study3$ratio.gw[,1], gorica_Study4$ratio.gw[,1],
gorica_Study5$ratio.gw[,1])
#RGW
# GORICA evidence synthesis (the added-evidence approach)
results_Set1_rgw <- evSyn(RGW, # or: object = RGW
#type_ev = "added", # default. Btw "equal" not possible here.
hypo_names = c("H1.1", "H1.2", "Hu"))
# Show output
results_Set1_rgwrestriktor (0.7): added Evidence Synthesis results:
Input type 'icratios' detected: Ratio of information criteria weights (each study has at least one 1)
---
Final GORICA weights:
GORICA weights
H1.1 0.997
H1.2 0.000
Hu 0.003
---
Ratio final GORICA weights:
vs. H1.1 vs. H1.2 vs. Hu
H1.1 1.000 4.95e+34 285.368
H1.2 0.000 1.000 0.000
Hu 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1_rgw$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1_rgw)
# Study-specific GORICA weights:
#results_Set1_rgw$GORICA_weight_m
# evSyn plot:
#plot(results_Set1_rgw) This leads to the same conclusions etcetera as for the other input types, but note that you obtain other and extra output as well:
- You additionally obtain ‘Ratio of GORICA weights’ (versus the reference hypothesis).
- You additionally obtain ‘Difference in GORICA values’ (versus the reference hypothesis).
- You do not obtain GORIC(A) values, since these are not available with this input.
Bear in mind that equal-evidence approach is not possible; the added-evidence approach is then used instead.
using goric objects
The goric objects can be used as input.
Then, you should make a list of these, which then should be fed into evSyn (in the object input argument).
# goric objects needed to obtain the GORICA values from
gorica_Study1 <- goric(estimates[[1]], VCOV = covmats[[1]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study2 <- goric(estimates[[2]], VCOV = covmats[[2]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study3 <- goric(estimates[[3]], VCOV = covmats[[3]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study4 <- goric(estimates[[4]], VCOV = covmats[[4]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
gorica_Study5 <- goric(estimates[[5]], VCOV = covmats[[5]],
hypotheses = list(H1.1=H1.1, H1.2=H1.2))
# list of goric objects for each of the five studies
goric_obj <- list(gorica_Study1, gorica_Study2,
gorica_Study3, gorica_Study4,
gorica_Study5)
#goric_obj
# GORICA evidence synthesis (the added-evidence approach)
results_Set1_goric_obj <- evSyn(goric_obj
#type_ev = "added" # default
)
# Show output
results_Set1_goric_objrestriktor (0.7): added Evidence Synthesis results:
Input type 'gorica' detected: Parameter estimates and covariance matrix inherited from gorica object
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H1.1 0.500 0.997
H1.2 0.000 0.000
unconstrained 0.500 0.003
---
Ratio final GORICA weights:
vs. H1.1 vs. H1.2 vs. unconstrained
H1.1 1.000 4.95e+34 285.368
H1.2 0.000 1.000 0.000
unconstrained 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_Set1_goric_obj$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_Set1_goric_obj)
# Study-specific GORICA weights:
#results_Set1_goric_obj$GORICA_weight_m
# evSyn plot:
#plot(results_Set1_goric_obj)
using a data.frame
One can also use a data.frame of class escalc from the metafor package or a regular data.frame using the same labeling.
This is used in Example 2 above and is also demonstrated below.
Notes:
- Like when the estimates and their covariance matrices are input, a list of hypotheses should be specified. Then, the evSyn function will run goric() on the input.
- In this case, we have two parameters of interest and, thus, we have to specify the data-argument ‘outcome_col’. This argument needs the name of the column that contains the outcome names. The hypotheses should then be specified using those outcome names. Here, the column is called ‘outcome’, which contains the names/labels ‘AL’ and ‘PD’ (which are also used in the hypothesis specification).
# data.frame
dat <- dat.berkey1998
#dat
# Hypotheses
H1.1 <- "AL < 0; PD > 0"
H1.2 <- "AL < 0; PD < 0"
# GORICA evidence synthesis (the added-evidence approach)
results_data.frame <- evSyn(dat, # the data.frame
outcome_col = "outcome", # column with labels used for the hypotheses; default
hypotheses = list(H_neg_pos = H1.1, H_neg_neg = H1.2), # set of hypotheses
#comparison = "unconstrained" # default (if multiple hypotheses)
#type_ev = "added" # default
study_names = study_names # Optional, will be used in the output
)
# Show output
results_data.framerestriktor (0.7): added Evidence Synthesis results:
Input type 'escalc' detected: Parameter estimates and covariance matrix inherited from escalc object
---
Final log-likelihood (LL) & GORICA weights:
LL weights GORICA weights
H_neg_pos 0.500 0.997
H_neg_neg 0.000 0.000
Unconstrained 0.500 0.003
---
Ratio final GORICA weights:
vs. H_neg_pos vs. H_neg_neg vs. Unconstrained
H_neg_pos 1.000 4.95e+34 285.368
H_neg_neg 0.000 1.000 0.000
Unconstrained 0.004 1.74e+32 1.000
# Final ratios of GORICA weights:
#round(results_data.frame$Final_ratio_GORICA_weights, 2)
# Study-specific and final/overall output:
#summary(results_data.frame)
# Study-specific GORICA weights:
#results_data.frame$GORICA_weight_m
# evSyn plot:
#plot(results_data.frame)