simData: Generate survival times for two endpoints in a meta-analysis...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/simData.R

Description

Data are generated from a mixed proportional hazard model, a Clayton copula model (Burzykowski and Cortinas Abrahantes, 2005), a Gumbel-Hougaard copula model, or a mixture of half-normal and exponential random variables (Shi et al., 2011).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
simData.re(R2 = 0.6, N = 30, ni = 200,
           nifix = TRUE, gammaWei = c(1, 1), censorT, censorA, 
           kTau= 0.6, baseCorr = 0.5, baseVars = c(0.2, 0.2),
           alpha = 0, beta = 0,
           alphaVar = 0.1, betaVar = 0.1,
           mstS = 4 * 365.25, mstT = 8 * 365.25)
           
simData.cc(R2 = 0.6, N = 30, ni = 200,
           nifix = TRUE, gammaWei = c(1, 1), censorT, censorA,
           kTau= 0.6, baseCorr = 0.5, baseVars = c(0.2, 0.2),
           alpha = 0, beta = 0,
           alphaVar = 0.1, betaVar = 0.1,
           mstS = 4 * 365.25, mstT = 8 * 365.25)
           
simData.gh(R2 = 0.6, N = 30, ni = 200,
           nifix = TRUE, gammaWei = c(1, 1), censorT, censorA,
           kTau= 0.6, baseCorr = 0.5, baseVars = c(0.2, 0.2),
           alpha = 0, beta = 0,
           alphaVar = 0.1, betaVar = 0.1,
           mstS = 4 * 365.25, mstT = 8 * 365.25)
           
simData.mx(R2 = 0.6, N = 30, ni = 200,
           nifix = TRUE, gammaWei = c(1, 1), censorT, censorA,
           indCorr = TRUE, baseCorr = 0.5, baseVars = c(0.2, 0.2),
           alpha = 0, beta = 0,
           alphaVar = 0.1, betaVar = 0.1,
           mstS = 4 * 365.25, mstT = 8 * 365.25)

Arguments

R2

The desired trial-level surrogacy R^2

N

The number of trials

ni

The (fixed or average) number of patients per trial

nifix

Should all trials have the same size (if nifix = TRUE) of should the N * ni patients be randomly assigned to trials with random probabilities (if nifix = FALSE)?

gammaWei

The shape parameter(s) of the Weibull distributions. Either one or two values. If one value is provided, it is used for both endpoints

censorT

censoring rate for the true endpoint T (before adding administrative censoring)

censorA

administrative censoring at time censorA

kTau

The desired individual-level dependence between S and T (Kendall's tau)

indCorr

Should S and T be correlated or not? (for .mx method)

baseCorr

correlation between baseline hazards (rho_basehaz)

baseVars

variances of baseline random effects (S and T)

alpha

average treatment effect on S

beta

average treatment effect on T

alphaVar

variance of a_i (theta_a^2)

betaVar

variance of b_i (theta_b^2)

mstS

median survival time for S in the control arm

mstT

median survival time for T in the control arm

Details

The function simData.re generates data from a proportional hazard model with random effects at individual level and random effects and random treatment effects at trial level. Individual dependence can be tuned in terms of Kendall's tau (kTau).

The function simData.cc generates data from a Copula function as shown by Burzykowski and Cortinas Abrahantes (2005). Individual dependence can be tuned in terms of Kendall's tau (kTau).

The function simData.mx implements the simulation method by Shi et al. (2011). This model is based on a mixture of half-normal and exponential random variables. Under this model, individual dependence can be induced by using the same half-normal random variable for S and T. This is obtained by setting indCorr = TRUE, but the amount of correlation is not dependent on a single parameter.

Value

A data.frame with columns

trialref

the trial reference

trt

the treatment arm (-0.5 or 0.5)

id

the patient id

timeT

the value of the true endpoint T

statusT

the censoring/event (0/1) indicator of the true endpoint T

timeS

the value of the surrogate endpoint S

statusS

the censoring/event (0/1) indicator of the surrogate endpoint S

Author(s)

Federico Rotolo [aut], Xavier Paoletti [ctr], Marc Buyse [ctr], Tomasz Burzykowski [ctr], Stefan Michiels [ctr, cre]

References

Burzykowski T, Cortinas Abrahantes J (2005). Validation in the case of two failure-time endpoints. In The Evaluation of Surrogate Endpoints (pp. 163-194). Springer, New York.

Rotolo F, Paoletti X, Burzykowski T, Buyse M, Michiels S. A Poisson approach for the validation of failure time surrogate endpoints in individual patient data meta-analyses. Statistical Methhods in Medical Research 2019; 28(1). doi: 10.1177/0962280217718582

Shi Q, Renfro LA, Bot BM, Burzykowski T, Buyse M, Sargent DJ. Comparative assessment of trial-level surrogacy measures for candidate time-to-event surrogate endpoints in clinical trials. Computational Statistics & Data Analysis 2011; 55: 2748–2757.

Examples

1
2
3
4
  set.seed(1)
  simData.re(N = 2, ni = 5)
  simData.cc(N = 2, ni = 5)
  simData.mx(N = 2, ni = 5)

surrosurv documentation built on May 2, 2019, 9:57 a.m.