Learn R Programming

EvidenceSynthesis

EvidenceSynthesis is part of HADES.

Introduction

This R package contains routines for combining causal effect estimates and study diagnostics across multiple data sites in a distributed study. This includes functions for performing meta-analysis and forest plots.

Features

  • Perform a traditional fixed-effects or random-effects meta-analysis, and create a forest plot.
  • Use non-normal approximations of the per-data-site likelihood function to avoid bias when facing small and zero counts.

Example

# Simulate some data for this example:
populations <- simulatePopulations()

# Fit a Cox regression at each data site, and approximate likelihood function:
fitModelInDatabase <- function(population) {
  cyclopsData <- Cyclops::createCyclopsData(Surv(time, y) ~ x + strata(stratumId),
                                            data = population,
                                            modelType = "cox")
  cyclopsFit <- Cyclops::fitCyclopsModel(cyclopsData)
  approximation <- approximateLikelihood(cyclopsFit, 
                                         parameter = "x", 
                                         approximation = "grid with gradients")
  return(approximation)
}
approximations <- lapply(populations, fitModelInDatabase)
approximations <- do.call("rbind", approximations)

# At study coordinating center, perform meta-analysis using per-site approximations:
estimate <- computeBayesianMetaAnalysis(approximations)
estimate
#          mu     mu95Lb   mu95Ub      muSe       tau     tau95Lb   tau95Ub     logRr   seLogRr
# 1 0.5770562 -0.2451619 1.382396 0.4154986 0.2733942 0.004919128 0.7913512 0.5770562 0.4152011

Technology

This an R package with some parts implemented in Java.

System requirements

Requires R and Java.

Getting Started

  1. Make sure your R environment is properly configured. This means that Java must be installed. See these instructions for how to configure your R environment.

  2. In R, use the following commands to download and install EvidenceSynthesis:

    install.packages("EvidenceSynthesis")

User Documentation

Documentation can be found on the package website.

PDF versions of the documentation are also available:

Support

  • Developer questions/comments/feedback: OHDSI Forum
  • We use the GitHub issue tracker for all bugs/issues/enhancements

Contributing

Read here how you can contribute to this package.

License

EvidenceSynthesis is licensed under Apache License 2.0

Development

This package is being developed in RStudio.

Development status

Beta

Copy Link

Version

Install

install.packages('EvidenceSynthesis')

Monthly Downloads

18,374

Version

1.1.0

License

Apache License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Martijn Schuemie

Last Published

October 15th, 2025

Functions in EvidenceSynthesis (1.1.0)

fitBiasDistribution

Fit Bias Distribution
createApproximations

Create likelihood approximations from individual-trajectory data
hmaLikelihoodList

Example profile likelihoods for hierarchical meta analysis with bias correction
hermiteInterpolation

Cubic Hermite interpolation using both values and gradients to approximate a log likelihood function
loadCyclopsLibraryForJava

Load the Cyclops dynamic C++ library for use in Java
detectApproximationType

Detect the type of likelihood approximation based on the data format
extractSourceSpecificEffects

Compute source-specific biases and bias-corrected estimates from hierarchical meta analysis results
customFunction

A custom function to approximate a log likelihood function
plotEmpiricalNulls

Plot empirical null distributions
generateBayesianHMAsettings

Generate settings for the Bayesian random-effects hierarchical meta-analysis model
likelihoodProfileLists

A bigger example of profile likelihoods for hierarchical meta analysis with bias correction
sequentialFitBiasDistribution

Fit Bias Distribution Sequentially or in Groups
plotLikelihoodFit

Plot the likelihood approximation
plotBiasDistribution

Plot bias distributions
plotPreparedPs

Plot the propensity score distribution
plotMcmcTrace

Plot MCMC trace
plotCovariateBalances

Plot covariate balances
plotPosterior

Plot posterior density
plotBiasCorrectionInference

Plot bias correction inference
plotPerDbMcmcTrace

Plot MCMC trace for individual databases
ooiLikelihoods

Example profile likelihoods for a synthetic outcome of interest
plotPerDbPosterior

Plot posterior density per database
plotMetaAnalysisForest

Create a forest plot
preparePsPlot

Prepare to plot the propensity score distribution
supportsJava8

Determine if Java virtual machine supports Java
prepareSccsIntervalData

Prepare SCCS interval data for pooled analysis
summarizeChain

Utility function to summarize MCMC samples (posterior mean, median, HDI, std, etc.)
ncLikelihoods

Example profile likelihoods for negative control outcomes
skewNormal

The skew normal function to approximate a log likelihood function
simulatePopulations

Simulate survival data for multiple databases
simulateMetaAnalysisWithNegativeControls

Simulate survival data across a federated data network, with negative control outcomes as well.
EvidenceSynthesis-package

EvidenceSynthesis: Synthesizing Causal Evidence in a Distributed Research Network
computeFixedEffectMetaAnalysis

Compute a fixed-effect meta-analysis
computeHierarchicalMetaAnalysis

Compute a Bayesian random-effects hierarchical meta-analysis
approximateSimplePosterior

Approximate simple Bayesian posterior
biasCorrectionInference

Bias Correction with Inference
computeConfidenceInterval

Compute the point estimate and confidence interval given a likelihood function approximation
buildLabelReferences

Build a list of references that map likelihood names to integer labels for later use
approximateHierarchicalNormalPosterior

Approximate Bayesian posterior for hierarchical Normal model
approximateLikelihood

Approximate a likelihood function
computeBayesianMetaAnalysis

Compute a Bayesian random-effects meta-analysis
createSimulationSettings

Create simulation settings
createSccsSimulationSettings

Create SCCS simulation settings
constructDataModel

Construct DataModel objects from approximate likelihood or profile likelihood data