Learn R Programming

Surrogate

In a clinical trial, it frequently occurs that the most credible outcome to evaluate the effectiveness of a new therapy (the true endpoint) is difficult to measure. In such a situation, it can be an effective strategy to replace the true endpoint by a (bio)marker that is easier to measure and that allows for a prediction of the treatment effect on the true endpoint (a surrogate endpoint). The package ‘Surrogate’ allows for an evaluation of the appropriateness of a candidate surrogate endpoint based on the meta-analytic, information-theoretic, and causal-inference frameworks. Part of this software has been developed using funding provided from the European Union’s Seventh Framework Programme for research, technological development and demonstration (Grant Agreement no 602552), the Special Research Fund (BOF) of Hasselt University (BOF-number: BOF2OCPO3), GlaxoSmithKline Biologicals, Baekeland Mandaat (HBC.2022.0145), and Johnson & Johnson Innovative Medicine.

Installation

You can install the development version of Surrogate from GitHub with:

# install.packages("devtools")
devtools::install_github("florianstijven/Surrogate-development")

Copy Link

Version

Install

install.packages('Surrogate')

Monthly Downloads

1,011

Version

3.4.4

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Wim der Elst

Last Published

November 16th, 2026

Functions in Surrogate (3.4.4)

Bootstrap.MEP.BinBin

Bootstrap 95% CI around the maximum-entropy ICA and SPF (surrogate predictive function)
ARMD.MultS

Data of the Age-Related Macular Degeneration Study with multiple candidate surrogates
Dvine_ICA_confint

Confidence interval for the ICA given the unidentifiable parameters
ARMD

Data of the Age-Related Macular Degeneration Study
BimixedCbCContCont

Fits a bivariate mixed-effects model using the cluster-by-cluster (CbC) estimator to assess surrogacy in the meta-analytic multiple-trial setting (Continuous-continuous case)
CausalDiagramContCont

Draws a causal diagram depicting the median correlations between the counterfactuals for a specified range of values of ICA or MICA in the continuous-continuous setting
BifixedContCont

Fits a bivariate fixed-effects model to assess surrogacy in the meta-analytic multiple-trial setting (Continuous-continuous case)
BimixedContCont

Fits a bivariate mixed-effects model to assess surrogacy in the meta-analytic multiple-trial setting (Continuous-continuous case)
AA.MultS

Compute the multiple-surrogate adjusted association
CausalDiagramBinBin

Draws a causal diagram depicting the median informational coefficients of correlation (or odds ratios) between the counterfactuals for a specified range of values of the ICA in the binary-binary setting.
FederatedApproachStage1

Fits the first stage model in the two-stage federated data analysis approach.
FederatedApproachStage2

Fits the second stage model in the two-stage federated data analysis approach.
ECT

Apply the Entropy Concentration Theorem
ICA.BinBin.Grid.Full

Assess surrogacy in the causal-inference single-trial setting in the binary-binary case when monotonicity for \(S\) and \(T\) is assumed using the full grid-based approach
FixedBinBinIT

Fits (univariate) fixed-effect models to assess surrogacy in the binary-binary case based on the Information-Theoretic framework
FixedContBinIT

Fits (univariate) fixed-effect models to assess surrogacy in the case where the true endpoint is continuous and the surrogate endpoint is binary (based on the Information-Theoretic framework)
FixedContContIT

Fits (univariate) fixed-effect models to assess surrogacy in the continuous-continuous case based on the Information-Theoretic framework
FixedDiscrDiscrIT

Investigates surrogacy for binary or ordinal outcomes using the Information Theoretic framework
FixedBinContIT

Fits (univariate) fixed-effect models to assess surrogacy in the case where the true endpoint is binary and the surrogate endpoint is continuous (based on the Information-Theoretic framework)
Fano.BinBin

Evaluate the possibility of finding a good surrogate in the setting where both \(S\) and \(T\) are binary endpoints
ICA.Sample.ControlTreat

Assess surrogacy in the causal-inference single-trial setting (Individual Causal Association, ICA) in the Continuous-continuous case using the grid-based sample approach when data is only avalable for the control treatment
ICA.ContCont.MultS.PC

Assess surrogacy in the causal-inference single-trial setting (Individual Causal Association, ICA) using a continuous univariate T and multiple continuous S, by simulating correlation matrices using an algorithm based on partial correlations
ICA.Sample.ContCont

Assess surrogacy in the causal-inference single-trial setting (Individual Causal Association, ICA) in the Continuous-continuous case using the grid-based sample approach
ICA.BinBin.Grid.Sample

Assess surrogacy in the causal-inference single-trial setting in the binary-binary case when monotonicity for \(S\) and \(T\) is assumed using the grid-based sample approach
ICA.BinBin.Grid.Sample.Uncert

Assess surrogacy in the causal-inference single-trial setting in the binary-binary case when monotonicity for \(S\) and \(T\) is assumed using the grid-based sample approach, accounting for sampling variability in the marginal \(\pi\).
ICA.ContCont.MultS.MPC

Assess surrogacy in the causal-inference single-trial setting (Individual Causal Association, ICA) using a continuous univariate T and multiple continuous S, by simulating correlation matrices using a modified algorithm based on partial correlations
ICA.ContCont.MultS_alt

Assess surrogacy in the causal-inference single-trial setting (Individual Causal Association, ICA) using a continuous univariate T and multiple continuous S, alternative approach
ICA.BinBin

Assess surrogacy in the causal-inference single-trial setting in the binary-binary case
ICA.BinCont.BS

Assess surrogacy in the causal-inference single-trial setting in the binary-continuous case with an additional bootstrap procedure before the assessment
ICA.ContCont.MultS

Assess surrogacy in the causal-inference single-trial setting (Individual Causal Association, ICA) using a continuous univariate T and multiple continuous S
ICA_contcont_long_ri

Assess surrogacy in the information-theoretic causal-inference framework (Individual Causal Association, ICA) for a continuous surrogate and true endpoint measured repeatedly over time in a single-trial setting
ICA_alpha_ContCont

Assess surrogacy using a Rényi divergence based family of metrics in the causal-inference single-trial setting in normal case
ICA_contcont_long_galecki

Assess surrogacy in the information-theoretic causal-inference framework (Individual Causal Association, ICA) for a continuous surrogate and true endpoint measured repeatedly over time in a single-trial setting
ICA_contcont_long

Fit a longitudinal model and calculate its ICA
ICA_contcont_long_ri_nested

Assess surrogacy in the information-theoretic causal-inference framework (Individual Causal Association, ICA) for a continuous surrogate and true endpoint measured repeatedly over time in a single-trial setting
ICA.BinCont

Assess surrogacy in the causal-inference single-trial setting in the binary-continuous case
ICA_contcont_long_cre

Assess surrogacy in the information-theoretic causal-inference framework (Individual Causal Association, ICA) for a continuous surrogate and true endpoint measured repeatedly over time in a single-trial setting
ICA_contcont_long_shared_ri

Assess surrogacy in the information-theoretic causal-inference framework (Individual Causal Association, ICA) for a continuous surrogate and true endpoint measured repeatedly over time in a single-trial setting
ICA.BinBin.CounterAssum

ICA (binary-binary setting) that is obtaied when the counterfactual correlations are assumed to fall within some prespecified ranges.
ICA.ContCont

Assess surrogacy in the causal-inference single-trial setting (Individual Causal Association, ICA) in the Continuous-continuous case
MaxEntICABinBin

Use the maximum-entropy approach to compute ICA in the binary-binary setting
MaxEntContCont

Use the maximum-entropy approach to compute ICA in the continuous-continuous sinlge-trial setting
ICA_t

ICA under the t-causal model
ICA_given_model_constructor_SurvSurv

Constructor for the function that returns that ICA as a function of the identifiable parameters for survival-survival
ICA_given_model_constructor

Constructor for the function that returns that ICA as a function of the identifiable parameters
LongToWide

Reshapes a dataset from the 'long' format (i.e., multiple lines per patient) into the 'wide' format (i.e., one line per patient)
MarginalProbs

Computes marginal probabilities for a dataset where the surrogate and true endpoints are binary
ISTE.ContCont

Individual-level surrogate threshold effect for continuous normally distributed surrogate and true endpoints.
MICA.Sample.ContCont

Assess surrogacy in the causal-inference multiple-trial setting (Meta-analytic Individual Causal Association; MICA) in the continuous-continuous case using the grid-based sample approach
MICA.ContCont

Assess surrogacy in the causal-inference multiple-trial setting (Meta-analytic Individual Causal Association; MICA) in the continuous-continuous case
MaxEntSPFBinBin

Use the maximum-entropy approach to compute SPF (surrogate predictive function) in the binary-binary setting
MetaAnalyticSurvCat

Compute surrogacy measures for a categorical (ordinal) surrogate and a time-to-event true endpoint in the meta-analytic multiple-trial setting.
Ovarian

The Ovarian dataset
MetaAnalyticSurvBin

Compute surrogacy measures for a binary surrogate and a time-to-event true endpoint in the meta-analytic multiple-trial setting.
MetaAnalyticSurvSurv

Compute surrogacy measures for a time-to-event surrogate and a time-to-event true endpoint in the meta-analytic multiple-trial setting.
MetaAnalyticSurvCont

Compute surrogacy measures for a continuous (normally-distributed) surrogate and a time-to-event true endpoint in the meta-analytic multiple-trial setting.
MufixedContCont.MultS

Fits a multivariate fixed-effects model to assess surrogacy in the meta-analytic multiple-trial setting (Continuous-continuous case with multiple surrogates)
MinSurrContCont

Examine the plausibility of finding a good surrogate endpoint in the Continuous-continuous case
MixedContContIT

Fits (univariate) mixed-effect models to assess surrogacy in the continuous-continuous case based on the Information-Theoretic framework
MumixedContCont.MultS

Fits a multivariate mixed-effects model to assess surrogacy in the meta-analytic multiple-trial setting (Continuous-continuous case with multiple surrogates)
PROC.BinBin

Evaluate the individual causal association (ICA) and reduction in probability of a prediction error (RPE) in the setting where both \(S\) and \(T\) are binary endpoints
Pos.Def.Matrices

Generate 4 by 4 correlation matrices and flag the positive definite ones
R2Lambda_from_covariance

Compute ICA from covariance blocks
PANSS

PANSS subscales and total score based on the data of five clinical trials in schizophrenia
Prentice

Evaluates surrogacy based on the Prentice criteria for continuous endpoints (single-trial setting)
RandVec

Generate random vectors with a fixed sum
plot PredTrialTContCont

Plots the expected treatment effect on the true endpoint in a new trial (when both S and T are normally distributed continuous endpoints)
Pred.TrialT.ContCont

Compute the expected treatment effect on the true endpoint in a new trial (when both S and T are normally distributed continuous endpoints)
PPE.BinBin

Evaluate a surrogate predictive value based on the minimum probability of a prediction error in the setting where both \(S\) and \(T\) are binary endpoints
plot FixedDiscrDiscrIT

Provides plots of trial-level surrogacy in the Information-Theoretic framework
Sim.Data.Counterfactuals

Simulate a dataset that contains counterfactuals
Schizo_Bin

Data of a clinical trial in Schizophrenia (with binary outcomes).
Schizo_PANSS_BPRS

Longitudinal PANSS and BPRS data from a schizophrenia clinical trial
Schizo_BinCont

Data of a clinical trial in schizophrenia, with binary and continuous endpoints
Schizo_PANSS

Longitudinal PANSS data of five clinical trials in schizophrenia
Schizo

Data of five clinical trials in schizophrenia
SPF.BinBin

Evaluate the surrogate predictive function (SPF) in the binary-binary setting (sensitivity-analysis based approach)
SPF.BinCont

Evaluate the surrogate predictive function (SPF) in the causal-inference single-trial setting in the binary-continuous case
Restrictions.BinBin

Examine restrictions in \(\bold{\pi}_{f}\) under different montonicity assumptions for binary \(S\) and \(T\)
Sim.Data.CounterfactualsBinBin

Simulate a dataset that contains counterfactuals for binary endpoints
SurvSurv

Assess surrogacy for two survival endpoints based on information theory and a two-stage approach
Sim.Data.MTS

Simulates a dataset that can be used to assess surrogacy in the multiple-trial setting
TrialLevelMA

Estimates trial-level surrogacy in the meta-analytic framework
Surrogate-package

Surrogate: Evaluation of Surrogate Endpoints in Clinical Trials
Single.Trial.RE.AA

Conducts a surrogacy analysis based on the single-trial meta-analytic framework
TrialLevelIT

Estimates trial-level surrogacy in the information-theoretic framework
Sim.Data.STS

Simulates a dataset that can be used to assess surrogacy in the single-trial setting
Test.Mono

Test whether the data are compatible with monotonicity for S and/or T (binary endpoints)
Single.Trial.ContCont

Conducts a surrogacy analysis in the single-trial setting for Continuous S and T
Sim.Data.STSBinBin

Simulates a dataset that can be used to assess surrogacy in the single trial setting when S and T are binary endpoints
cdf_fun

Function factory for distribution functions
colorectal

The Colorectal dataset with a binary surrogate.
association_gof_copula

Produce Associational GoF plot
binary_continuous_loglik

Loglikelihood function for binary-continuous copula model
clayton_loglik_copula_scale

Loglikelihood on the Copula Scale for the Clayton Copula
comb27.BinBin

Assesses the surrogate predictive value of each of the 27 prediction functions in the setting where both \(S\) and \(T\) are binary endpoints
UnimixedContCont

Fits univariate mixed-effect models to assess surrogacy in the meta-analytic multiple-trial setting (continuous-continuous case)
UnifixedContCont

Fits univariate fixed-effect models to assess surrogacy in the meta-analytic multiple-trial setting (continuous-continuous case)
colorectal4

The Colorectal dataset with an ordinal surrogate.
continuous_continuous_loglik

Loglikelihood function for continuous-continuous copula model
compute_ICA_SurvSurv

Compute Individual Causal Association for a given D-vine copula model in the Survival-Survival Setting
TwoStageSurvSurv

Assess trial-level surrogacy for two survival endpoints using a two-stage approach
delta_method_log_mutinfo

Variance of log-mutual information based on the delta method
compute_ICA_ContCont

Compute Individual Causal Association for a given D-vine copula model in the Continuous-Continuous Setting
compute_ICA_OrdCont

Compute Individual Causal Association for a given D-vine copula model in the Ordinal-Continuous Setting
compute_ICA_OrdOrd

Compute Individual Causal Association for a given D-vine copula model in the Ordinal-Ordinal Setting
compute_ICA

Compute Individual Causal Association for a given D-vine copula model in the setting of choice.
constructor_ICA_estimator

Function constructor to estimate the ICA given a set of sampled patient-level treatment effects
compute_ICA_BinCont

Compute Individual Causal Association for a given D-vine copula model in the Binary-Continuous Setting
construct_longitudinal_ica_covariance

Construct covariance blocks on an evaluation grid
estimate_mutual_information_SurvSurv

Estimate the Mutual Information in the Survival-Survival Setting
estimate_ICA_OrdOrd

Estimate ICA in Ordinal-Ordinal Setting
extract_longitudinal_parameters

Extract fitted covariance parameters
estimate_ICA_ContCont

Estimate ICA in Ordinal-Ordinal Setting
fit_copula_OrdCont

Fit ordinal-continuous vine copula model
fit_copula_ContCont

Fit continuous-continuous vine copula model
estimate_ICA_OrdCont

Estimate ICA in Ordinal-Continuous Setting
estimate_marginal

Estimate marginal distribution using ML
estimate_ICA_BinCont

Estimate ICA in Binary-Continuous Setting
fit_copula_OrdOrd

Fit ordinal-ordinal vine copula model
gaussian_loglik_copula_scale

Loglikelihood on the Copula Scale for the Gaussian Copula
fit_longitudinal_surrogate_model

Longitudinal observed-data model fitting
fit_copula_submodel_BinCont

Fit binary-continuous copula submodel
fit_model_SurvSurv

Fit Survival-Survival model
fit_longitudinal_surrogate

Fit a standard bivariate longitudinal surrogate model
fit_copula_submodel_ContCont

Fit ordinal-continuous copula submodel
fit_copula_submodel_OrdCont

Fit ordinal-continuous copula submodel
fit_copula_model_BinCont

Fit copula model for binary true endpoint and continuous surrogate endpoint
frank_loglik_copula_scale

Loglikelihood on the Copula Scale for the Frank Copula
fit_copula_submodel_OrdOrd

Fit ordinal-continuous copula submodel
longitudinal_model_spec

Construct a standard longitudinal surrogate-model specification
log_likelihood_copula_model

Computes loglikelihood for a given copula model
longitudinal_ica

Calculate the longitudinal ICA from a fitted model
gumbel_loglik_copula_scale

Loglikelihood on the Copula Scale for the Gumbel Copula
longitudinal_matrix_diagnostics

Matrix diagnostics for fitted covariance components
longitudinal_ica_evaluation_sets

Evaluate one fitted model on several evaluation grids
make_longitudinal_re_none

No random effects
loglik_copula_scale

Loglikelihood on the Copula Scale
make_longitudinal_re_endpoint_specific

Endpoint-specific random effects within treatment arm
longitudinal_fit_stats

Likelihood and AIC summary for a longitudinal fit
new_vine_copula_ss_fit

Constructor for vine copula model
marginal_gof_plots_scr

Marginal survival function goodness of fit
marginal_gof_copula

Produce marginal GoF plot
mean_S_before_T_plot_scr

Goodness of fit plot for the fitted copula
marginal_distribution

Fit marginal distribution
model_fit_measures

Goodness of fit information for survival-survival model
ordinal_continuous_loglik

Loglikelihood function for ordinal-continuous copula model
make_longitudinal_re_shared_by_arm

Random effects shared by the two endpoints within each treatment arm
new_vine_copula_fit

Constructor for vine copula model
marginal_gof_scr_S_plot

Goodness-of-fit plot for the marginal survival functions
plot.ICA.BinCont

Plot the individual causal association (ICA) in the causal-inference single-trial setting in the binary-continuous case.
ordinal_ordinal_loglik

Loglikelihood function for ordinal-ordinal copula model
ordinal_to_cutpoints

Convert Ordinal Observations to Latent Cutpoints
pdf_fun

Function factory for density functions
plot.Fano.BinBin

Plots the distribution of \(R^2_{HL}\) either as a density or as function of \(\pi_{10}\) in the setting where both \(S\) and \(T\) are binary endpoints
plot Causal-Inference BinBin

Plots the (Meta-Analytic) Individual Causal Association and related metrics when S and T are binary outcomes
plot Information-Theoretic

Provides plots of trial- and individual-level surrogacy in the Information-Theoretic framework
plot ICA.ContCont.MultS

Plots the Individual Causal Association in the setting where there are multiple continuous S and a continuous T
plot Causal-Inference ContCont

Plots the (Meta-Analytic) Individual Causal Association when S and T are continuous outcomes
plot ISTE.ContCont

Plots the individual-level surrogate threshold effect (STE) values and related metrics
plot MaxEntSPF BinBin

Plots the sensitivity-based and maximum entropy based surrogate predictive function (SPF) when S and T are binary outcomes.
plot.MetaAnalyticSurvBin

Generates a plot of the estimated treatment effects for the surrogate endpoint versus the estimated treatment effects for the true endpoint for an object fitted with the 'MetaAnalyticSurvBin()' function.
plot.MetaAnalyticSurvCat

Generates a plot of the estimated treatment effects for the surrogate endpoint versus the estimated treatment effects for the true endpoint for an object fitted with the 'MetaAnalyticSurvCat()' function.
plot.MetaAnalyticSurvSurv

Generates a plot of the estimated treatment effects for the surrogate endpoint versus the estimated treatment effects for the true endpoint for an object fitted with the 'MetaAnalyticSurvSurv()' function.
plot.MetaAnalyticSurvCont

Generates a plot of the estimated treatment effects for the surrogate endpoint versus the estimated treatment effects for the true endpoint for an object fitted with the 'MetaAnalyticSurvCont()' function.
plot.SurvSurv

Provides plots of trial- and individual-level surrogacy in the Information-Theoretic framework when both S and T are time-to-event endpoints
plot MaxEnt ContCont

Plots the sensitivity-based and maximum entropy based Individual Causal Association when S and T are continuous outcomes in the single-trial setting
plot MaxEntICA BinBin

Plots the sensitivity-based and maximum entropy based Individual Causal Association when S and T are binary outcomes
plot Meta-Analytic

Provides plots of trial- and individual-level surrogacy in the meta-analytic framework
plot Information-Theoretic BinCombn

Provides plots of trial- and individual-level surrogacy in the Information-Theoretic framework when both S and T are binary, or when S is binary and T is continuous (or vice versa)
plot TrialLevelMA

Provides a plots of trial-level surrogacy in the meta-analytic framework based on the output of the TrialLevelMA() function
plot.vine_copula_fit

Goodness-of-fit plots for the fitted copula models
prepare_longitudinal_surrogate_data

Prepare data for longitudinal surrogate modeling
plot MinSurrContCont

Graphically illustrates the theoretical plausibility of finding a good surrogate endpoint in the continuous-continuous case
plot TwoStageSurvSurv

Plots trial-level surrogacy in the meta-analytic framework when two survival endpoints are considered.
plot.comb27.BinBin

Plots the distribution of prediction error functions in decreasing order of appearance.
plot SPF BinBin

Plots the surrogate predictive function (SPF) in the binary-binary settinf.
plot.PPE.BinBin

Plots the distribution of either \(PPE\), \(RPE\) or \(R^2_{H}\) either as a density or as a histogram in the setting where both \(S\) and \(T\) are binary endpoints
plot.SPF.BinCont

Plot the surrogate predictive function (SPF) in the causal-inference single-trial setting in the binary-continuous case.
plot TrialLevelIT

Provides a plots of trial-level surrogacy in the information-theoretic framework based on the output of the TrialLevelIT() function
sample_dvine

Sample copula data from a given four-dimensional D-vine copula
prostate

The prostate dataset with a continuous surrogate.
print.MetaAnalyticSurvCont

Prints all the elements of an object fitted with the 'MetaAnalyticSurvCont()' function.
sensitivity_analysis_BinCont_copula

Perform Sensitivity Analysis for the Individual Causal Association with a Continuous Surrogate and Binary True Endpoint
print.vine_copula_fit

Print summary of fitted copula model
sample_deltas_BinCont

Sample individual casual treatment effects from given D-vine copula model in binary continuous setting
sample_copula_parameters

Sample Unidentifiable Copula Parameters
print.MetaAnalyticSurvCat

Prints all the elements of an object fitted with the 'MetaAnalyticSurvCat()' function.
print.MetaAnalyticSurvSurv

Prints all the elements of an object fitted with the 'MetaAnalyticSurvSurv()' function.
print.MetaAnalyticSurvBin

Prints all the elements of an object fitted with the 'MetaAnalyticSurvBin()' function.
sensitivity_analysis_copula

Perform Sensitivity Analysis for the Individual Causal Association based on a D-vine copula model
sensitivity_analysis_SurvSurv_copula

Sensitivity analysis for individual causal association
summary.FederatedApproachStage2

Provides a summary of the surrogacy measures for an object fitted with the 'FederatedApproachStage2()' function.
sensitivity_intervals_Dvine

Compute Sensitivity Intervals
summary.MetaAnalyticSurvCont

Provides a summary of the surrogacy measures for an object fitted with the 'MetaAnalyticSurvCont()' function.
summary.MetaAnalyticSurvSurv

Provides a summary of the surrogacy measures for an object fitted with the 'MetaAnalyticSurvSurv()' function.
summary.MetaAnalyticSurvBin

Provides a summary of the surrogacy measures for an object fitted with the 'MetaAnalyticSurvBin()' function.
summary_level_bootstrap_ICA

Bootstrap based on the multivariate normal sampling distribution
summary

Summary
summary.MetaAnalyticSurvCat

Provides a summary of the surrogacy measures for an object fitted with the 'MetaAnalyticSurvCat()' function.
twostep_SurvSurv

Fit survival-survival copula submodel with two-step estimator
summary_longitudinal_ica

Summary of a longitudinal ICA sensitivity result
validate_longitudinal_evaluation_times

Validate a longitudinal ICA evaluation grid
twostep_BinCont

Fit binary-continuous copula submodel with two-step estimator