September 24???26, 2018

Outline

Correlates of risk power calculations

  1. Without replacement sampling for retrospective case-control or 2-phase designs
    • Trichotomous biomarker
      • Dichotomous biomarker
    • Continuous biomarker
  2. Bernoulli sampling for prospective case-cohort designs

Set-up and notation

Without replacement sampling

  • Assume a randomized vaccine vs. placebo/control vaccine efficacy trial
  • \(N=\) number of vaccine recipients observed to be at risk at \(\tau\)
  • \(n_{cases}\) (\(n_{controls}\)) \(=\) number of observed cases (controls) between \(\tau\) and \(\tau_{\mathrm{max}}\), where cases have \(\Delta Y = 1\) and controls have \(\Delta (1-Y) = 1\)
    • \(n_{cases} + n_{controls} \leq N\)
  • \(n^S_{cases}\) (\(n^S_{controls}\)) \(=\) number of observed cases (controls) between \(\tau\) and \(\tau_{\mathrm{max}}\) with measured \(S\) (or \(S^{\ast}\))


- If calculations done at design stage, then \(N\), \(n_{cases}\), \(n_{controls}\), \(n^S_{cases}\), and \(n^S_{controls}\) projected numbers

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

  1. Specify overall \(VE\) between \(\tau\) and \(\tau_{\mathrm{max}}\)
    • Protocol-specified design alternative or \(\widehat{VE}\)
  2. Specify \(risk_0\)
    • Protocol-specified placebo-group endpoint rate or \(\widehat{risk}_0\)
  3. Select a grid of \(VE^{lat}_0\) values
    • E.g., ranging from \(VE\) (\(H_0\)) to 0 (maximal \(H_1\) not allowing harm by vaccination)
  4. Select a grid of \(VE^{lat}_1 \geq VE^{lat}_0\) values
    • E.g., \(VE^{lat}_1 = VE\)

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

  1. Specify \(P^{lat}_0\) and \(P^{lat}_2\), then \(P^{lat}_1 = 1-P^{lat}_0-P^{lat}_2\)
    • Assuming \(risk^{lat}_0(x) = risk_0\), \[ VE = VE^{lat}_0 P^{lat}_0 + VE^{lat}_1 P^{lat}_1 + VE^{lat}_2 P^{lat}_2 \] yields \(VE^{lat}_2\)
    • If \(VE^{lat}_0\) varies from \(VE\) to 0, then \(VE^{lat}_2\) varies from VE to \(VE\, (P^{lat}_0 + P^{lat}_2)/P^{lat}_2\)
  2. Specify \(P_0\) and \(P_2\), then \(P_1 = 1-P_0-P_2\)
    • E.g., \(P_0 = P^{lat}_0\) and \(P_2 = P^{lat}_2\)

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

  1. Approach 1: Specify two of the three \((Sens, FP^0, FP^1)\) and two of the three \((Spec, FN^2, FN^1)\)
    • E.g., specify \(Sens\) and \(Spec\) and \(FP^0 = FN^2 = 0\)
    Approach 2: Specify \(\sigma^2_{obs}\) and \(\rho = \sigma^2_{tr} / \sigma^2_{obs}\) and determine \((Sens, Spec, FP^0, FP^1, FN^1, FN^2)\) (subsequent slides)
    • Typically, \(\sigma^2_{obs} = 1\)

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

Calculation of \((Sens, Spec, FP^0, FP^1, FN^1, FN^2)\) in Approach 2


  1. Assuming the classical measurement error model, where \(X^{\ast} \sim \mathsf{N}(0,\rho\sigma^2_{obs})\), solve \[ P^{lat}_0 = P(X^{\ast} \leq \theta_0) \quad \textrm{and} \quad P^{lat}_2 = P(X^{\ast} > \theta_2) \] for \(\theta_0\) and \(\theta_2\)

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

Calculation of \((Sens, Spec, FP^0, FP^1, FN^1, FN^2)\) in Approach 2


  1. Generate \(B\) realizations of \(X^{\ast}\) and \(S^{\ast} = X^{\ast} + e\), where \(e \sim \mathsf{N}(0,(1-\rho)\sigma^2_{obs})\), and \(X^{\ast}\) independent of \(e\)
    • \(B = 20,000\) by default

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

Calculation of \((Sens, Spec, FP^0, FP^1, FN^1, FN^2)\) in Approach 2


  1. Using \(\theta_0\) and \(\theta_2\) from Step i., define \[ \begin{align} Spec(\phi_0) &= P(S^{\ast} \leq \phi_0 \mid X^{\ast} \leq \theta_0)\\ FN^1(\phi_0) &= P(S^{\ast} \leq \phi_0 \mid X^{\ast} \in (\theta_0,\theta_2])\\ FN^2(\phi_0) &= P(S^{\ast} \leq \phi_0 \mid X^{\ast} > \theta_2)\\ Sens(\phi_2) &= P(S^{\ast} > \phi_2 \mid X^{\ast} > \theta_2)\\ FP^1(\phi_2) &= P(S^{\ast} > \phi_2 \mid X^{\ast} \in (\theta_0,\theta_2])\\ FP^0(\phi_2) &= P(S^{\ast} > \phi_2 \mid X^{\ast} \leq \theta_0) \end{align} \]

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

Calculation of \((Sens, Spec, FP^0, FP^1, FN^1, FN^2)\) in Approach 2


  1. Estimate \(Spec(\phi_0)\) by \[ \widehat{Spec}(\phi_0) = \frac{\#\{S^{\ast}_b \leq \phi_0, X^{\ast}_b \leq \theta_0\}}{\#\{X^{\ast}_b \leq \theta_0\}}\,, \] etc.

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

Calculation of \((Sens, Spec, FP^0, FP^1, FN^1, FN^2)\) in Approach 2


  1. Find \(\phi_0 = \phi^{\ast}_0\) and \(\phi_2 = \phi^{\ast}_2\) that numerically solve \[ \begin{align} P_0 &= \widehat{Spec}(\phi_0)P^{lat}_0 + \widehat{FN}^1(\phi_0)P^{lat}_1 + \widehat{FN}^2(\phi_0)P^{lat}_2\\ P_2 &= \widehat{Sens}(\phi_2)P^{lat}_2 + \widehat{FP}^1(\phi_2)P^{lat}_1 + \widehat{FP}^0(\phi_2)P^{lat}_0 \end{align} \] and compute \[ Spec = \widehat{Spec}(\phi^{\ast}_0),\; Sens = \widehat{Sens}(\phi^{\ast}_2),\; \textrm{etc.} \]

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

  • In Approach 2, plot \[ RR_t \quad \textrm{vs.} \quad RR^{lat}_2\big/ RR^{lat}_0, \] where \[ RR_t := \frac{risk_1(2)}{risk_1(0)} = \frac{\sum_{x=0}^2 RR^{lat}_x P(X=x|S=2)}{\sum_{x=0}^2 RR^{lat}_x P(X=x|S=0)} \]
  • For \(\rho < 1\), \(RR_t\) closer to 1 than \(RR^{lat}_2\big/ RR^{lat}_0\)

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

  1. Simulate \(M\) data sets under the true parameter values:
      Full data
    1. \(N_x = (n_{controls} + n_{cases}) P^{lat}_x\)
    2. \(\left(n_{cases}(0),n_{cases}(1),n_{cases}(2)\right) \sim \mathsf{Mult}(n_{cases},(p_0,p_1,p_2))\), where \(p_k=P(X=k|Y=1,Y^{\tau}=0,Z=1)\)
    3. For each of the \(N_x\) subjects, generate \(S_i\) by a draw from \(\mathsf{Mult}(1,(p_0,p_1,p_2))\), where \(p_k=P(S=k|X=x)\)
    4. Observed data
    5. Sample without replacement \(n^S_{cases}\) and \(n^S_{controls} = K n^S_{cases}\) controls with measured \(S\) \((R=1)\), i.e., the control:case ratio is not fixed within subgroup \(X=x\)

Algorithm for trichotomous biomarker \(\, S\)

Without replacement sampling

  1. For each observed data set, compute the 1-sided one-degree-of-freedom Wald test statistic for \(H_0 \Leftrightarrow \{\widetilde{H}_0: \beta_S \geq 0\}\) from IPW logistic regression model that accounts for biomarker sampling design (function tps in R package osDesign)
    • Alternatively, use the generalized two-degree-of-freedom Wald test
  2. Compute power as proportion of data sets with 1-sided Wald test \(p \leq \alpha/2\) for specified \(\alpha\)
  3. Repeat power calculation varying control:case ratio, \(n_{cases}\), \(n^S_{cases}\), \((P^{lat}_0, P^{lat}_2, P_0, P_2)\), \((Sens, Spec)\), \(\rho\)

Illustration: hypothetical randomized placebo-controlled VE trial

Trial design

  • \(N_{rand} = 4,100\) participants randomized to each of the vaccine and placebo group and followed for \(\tau_{\mathrm{max}}=\) 24 months
  • Samples for measurement of \(S\) at \(\tau=\) 3.5 months stored in all vaccine recipients
  • Cumulative endpoint rate between \(\tau\) and \(\tau_{\mathrm{max}}\) in placebo group \(=3.4\%\) \((=risk_0)\)
  • \(VE_{\tau-\tau_{\mathrm{max}}}=75\%\), \(\quad VE_{0-\tau}=VE_{\tau-\tau_{\mathrm{max}}}/2\)
  • Cumulative dropout rate between 0 and \(\tau_{\mathrm{max}}\) in both groups \(=10\%\)

Illustration: calculation of input parameters

Assumptions



  1. Failure time \(T\) and censoring time \(C\) are independent
  2. \(T\mid Z=0 \sim \mathsf{Exp}(\lambda_T)\) and \(C\mid Z=0 \sim \mathsf{Exp}(\lambda_C)\)
  3. \(RR_{\tau-\tau_{\mathrm{max}}} := \frac{P(T \leq \tau_{\mathrm{max}} \mid T>\tau, Z=1)}{P(T \leq \tau_{\mathrm{max}} \mid T>\tau, Z=0)} = \frac{P(T \leq t\mid T>\tau, Z=1)}{P(T \leq t\mid T>\tau, Z=0)}\) for all \(t \in (\tau,\tau_{\mathrm{max}}]\)

Illustration: calculation of input parameters

Number of vaccine recipients observed to be at risk at \(\tau\) \[ \begin{align} N &= N_{rand}\, P(T>\tau, C>\tau \mid Z=1)\\ &= N_{rand}\, P(T>\tau \mid Z=1)\, P(C>\tau \mid Z=1)\\ &= N_{rand}\, \{1 - RR_{0-\tau}\, P(T \leq \tau \mid Z=0)\}\, P(C>\tau \mid Z=1)\\ &\approx 4,023 \end{align} \] where \[ RR_{0-\tau} := \frac{P(T \leq \tau \mid Z=1)}{P(T \leq \tau \mid Z=0)} \]

Illustration: calculation of input parameters

Number of observed cases between \(\tau\) and \(\tau_{\mathrm{max}}\) \[ \begin{align} n_{cases} &= N\, P(T\leq \tau_{\mathrm{max}}, T\leq C \mid T>\tau, C>\tau, Z=1)\\ &= N\, P(T\leq \min(C,\tau_{\mathrm{max}}) \mid T>\tau, C>\tau, Z=1)\\ &= N\, \frac{\int_{\tau}^{\infty}P(\tau < T \leq \min(c,\tau_{\mathrm{max}})\mid Z=1)f_C(c)\mathop{\mathrm{d}}\!c}{P(T>\tau, C>\tau \mid Z=1)}\\ &= N\, \bigg\{\int_{\tau}^{\tau_{\mathrm{max}}}P(\tau < T \leq c\mid Z=1)f_C(c)\mathop{\mathrm{d}}\!c +\\ &\quad+ P(\tau < T \leq \tau_{\mathrm{max}}\mid Z=1)\, P(C>\tau_{\mathrm{max}})\bigg\}\Big/ \\ &\quad\Big/ P(T>\tau, C>\tau \mid Z=1)\\ &\approx 32 \end{align} \]

Illustration: calculation of input parameters

Number of observed controls between \(\tau\) and \(\tau_{\mathrm{max}}\) \[ \begin{align} n_{controls} &= N \, P(T > \tau_{\mathrm{max}}, C > \tau_{\mathrm{max}} \mid T>\tau, C>\tau, Z=1)\\ &\approx 3,654 \end{align} \] Number of observed cases (controls) between \(\tau\) and \(\tau_{\mathrm{max}}\) with measured \(S\) \[ \begin{align} n^S_{cases} &= n_{cases}\\ n^S_{controls} &= K n^S_{cases} \end{align} \]

Illustration: calculation of input parameters

library(CoRpower)
computeN(Nrand = 4100,          # participants randomized to vaccine arm
         tau = 3.5,             # biomarker sampling timepoint
         taumax = 24,           # end of follow-up
         VEtauToTaumax = 0.75,  # VE between 'tau' and 'taumax'
         VE0toTau = 0.75/2,     # VE between 0 and 'tau'
         risk0 = 0.034,         # placebo-group endpoint risk between 'tau' and 'taumax'
         dropoutRisk = 0.1,     # dropout risk between 0 and 'taumax'
         propCasesWithS = 1)    # proportion of observed cases with measured S
## $N
## [1] 4023
## 
## $nCases
## [1] 32
## 
## $nControls
## [1] 3654
## 
## $nCasesWithS
## [1] 32

Illustration: CoRpower for trichotomous \(\, S\)

Without replacement sampling

Approach 1 \((Sens, Spec, FP^0, FN^2\) specified\()\)

  • Scenario 1: vary control:case ratio
  • Scenario 2: vary \(Sens\), \(Spec\)
  • Scenario 3: vary \(P_0^{lat}\), \(P_2^{lat}\), \(P_0\), \(P_2\)

Approach 2 \((\sigma^2_{obs}\) and \(\rho\) specified\()\)

  • Scenario 4: vary \(\rho\)
  • Scenario 5: vary \(P_0^{lat}\), \(P_2^{lat}\), \(P_0\), \(P_2\)
  • Scenario 6: vary \(n_{cases}\)

Scenario 1: vary control:case ratio (Approach 1)

Trichotomous \(\, S\), without replacement sampling

pwr <- computePower(nCases = 32,                 
                    nControls = 3654,            
                    nCasesWithS = 32,           
                    controlCaseRatio = 5,                # scalar, i.e., separate calls for 5, 3, 1
                    VEoverall = 0.75,                    # overall VE
                    risk0 = 0.034,                       # placebo-group endpoint risk between tau-tau_max
                    VElat0 = seq(0, VEoverall, len=100), # grid of VE (V/P) among lower protected
                    VElat1 = rep(VEoverall, 100),        # grid of VE (V/P) among medium protected
                    Plat0 = 0.2,                         # prevalence of lower protected
                    Plat2 = 0.6,                         # prevalence of higher protected
                    P0 = 0.2,                            # probability of low biomarker response
                    P2 = 0.6,                            # probability of high biomarker response
                    sens = 0.8, spec = 0.8, FP0 = 0, FN2 = 0,
                    M = 1000,                            # number of simulated clinical trials
                    alpha = 0.05,                        # two-sided Wald test Type 1 error rate
                    biomType = "trichotomous")           # "continuous" by default

Scenario 1: vary control:case ratio (Approach 1)

Trichotomous \(\, S\), without replacement sampling

Output list for controlCaseRatio = 5:

pwr$power[1, c(1, 25, 50, 75, 100)]
## [1] 0.995 0.933 0.597 0.197 0.022
pwr$RRt[1, c(1, 25, 50, 75, 100)]
## [1] 0.05882353 0.13978495 0.26940639 0.49685535 1.00000000
pwr$VElat2[c(1, 25, 50, 75, 100)]
## [1] 1.0000000 0.9393939 0.8762626 0.8131313 0.7500000

Other components: risk1_2, risk1_0, VElat0, Plat2, Plat0, P2, P0, alphaLat, betaLat, sens, spec, FP0, FN2, rho, N, nCases, nCasesPhase2, controlCaseRatio, VEoverall, risk0, alpha,

Scenario 1: vary control:case ratio (Approach 1)

Scenario 1: vary control:case ratio (Approach 1)

Trichotomous \(\, S\), without replacement sampling

Plotting of power curves

plotPowerTri(outComputePower = list(pwr5to1, pwr3to1, pwr1to1),    # output lists from 'computePower'
             legendText = paste0("Control:Case = ", c("5:1", "3:1", "1:1")))

Alternatively,

computePower(..., saveDir = "myDir", saveFile = "myFile.RData")
plotPowerTri(outComputePower = c("myFile1", "myFile2", "myFile3"), # files with 'computePower' output
             outDir = rep("~/myDir", 3),                           # path to each myFilex.RData
             legendText = paste0("Control:Case = ", c("5:1", "3:1", "1:1")))

Scenario 2: vary \(\, Sens\) and \(\, Spec\) (Approach 1)

Trichotomous \(\, S\), without replacement sampling

pwr <- computePower(nCases = 32,                 
                    nControls = 3654,            
                    nCasesWithS = 32,           
                    controlCaseRatio = 5,                # n^S_controls : n^S_cases ratio
                    VEoverall = 0.75,                    # overall VE
                    risk0 = 0.034,                       # placebo-group endpoint risk between tau-tau_max
                    VElat0 = seq(0, VEoverall, len=100), # grid of VE (V/P) among lower protected
                    VElat1 = rep(VEoverall, 100),        # grid of VE (V/P) among medium protected
                    Plat0 = 0.2,                         # prevalence of lower protected
                    Plat2 = 0.6,                         # prevalence of higher protected
                    P0 = 0.2,                            # probability of low biomarker response
                    P2 = 0.6,                            # probability of high biomarker response
                    sens = c(1, 0.9, 0.8, 0.7), spec = c(1, 0.9, 0.8, 0.7), 
                    FP0 = 0, FN2 = 0,
                    M = 1000,                            # number of simulated clinical trials
                    alpha = 0.05,                        # two-sided Wald test Type 1 error rate
                    biomType = "trichotomous")           # "continuous" by default

Scenario 2: vary \(\, Sens\) and \(\, Spec\) (Approach 1)

Scenario 3: vary \(\, P^{lat}_0, P^{lat}_2, P_0, P_2\) (Approach 1)

Trichotomous \(\, S\), without replacement sampling

pwr <- computePower(nCases = 32,                 
                    nControls = 3654,            
                    nCasesWithS = 32,           
                    controlCaseRatio = 5,                # n^S_controls : n^S_cases ratio
                    VEoverall = 0.75,                    # overall VE
                    risk0 = 0.034,                       # placebo-group endpoint risk between tau-tau_max
                    VElat0 = seq(0, VEoverall, len=100), # grid of VE (V/P) among lower protected
                    VElat1 = rep(VEoverall, 100),        # grid of VE (V/P) among medium protected
                    Plat0 = 0.05,                        # scalar, ie separate calls for 0.05, 0.1, 0.15, 0.2
                    Plat2 = 0.15,                        # scalar, ie separate calls for 0.15, 0.3, 0.45, 0.6
                    P0 = 0.05,                           # scalar, ie separate calls for 0.05, 0.1, 0.15, 0.2
                    P2 = 0.15,                           # scalar, ie separate calls for 0.15, 0.3, 0.45, 0.6
                    sens = 0.8, spec = 0.8, FP0 = 0, FN2 = 0,
                    M = 1000,                            # number of simulated clinical trials
                    alpha = 0.05,                        # two-sided Wald test Type 1 error rate
                    biomType = "trichotomous")           # "continuous" by default

Scenario 3: vary \(\, P^{lat}_0, P^{lat}_2, P_0, P_2\) (Approach 1)

Scenario 4: vary \(\, \rho \) (Approach 2)

Trichotomous \(\, S\), without replacement sampling

pwr <- computePower(nCases = 32,                 
                    nControls = 3654,            
                    nCasesWithS = 32,           
                    controlCaseRatio = 5,                # n^S_controls : n^S_cases ratio
                    VEoverall = 0.75,                    # overall VE
                    risk0 = 0.034,                       # placebo-group endpoint risk between tau-tau_max 
                    VElat0 = seq(0, VEoverall, len=100), # grid of VE (V/P) among lower protected
                    VElat1 = rep(VEoverall, 100),        # grid of VE (V/P) among medium protected
                    Plat0 = 0.2,                         # prevalence of lower protected
                    Plat2 = 0.6,                         # prevalence of higher protected
                    P0 = 0.2,                            # probability of low biomarker response
                    P2 = 0.6,                            # probability of high biomarker response
                    sigma2obs = 1,                       # variance of observed biomarker S
                    rho = c(1, 0.9, 0.7, 0.5),           # protection-relevant fraction of the variance of S
                    M = 1000,                            # number of simulated clinical trials
                    alpha = 0.05,                        # two-sided Wald test Type 1 error rate
                    biomType = "trichotomous")           # "continuous" by default

Scenario 4: vary \(\, \rho \) (Approach 2)

Trichotomous \(\, S\), without replacement sampling

Scenario 4: vary \(\, \rho \) (Approach 2)

Scenario 4: vary \(\, \rho \) (Approach 2)

Scenario 4: vary \(\, \rho \) (Approach 2)

Plotting of \(RR_t\) vs. \(RR_2^{lat}/RR_0^{lat}\)

plotRRgradVE(outComputePower = pwr,         # output list from 'computePower'
             legendText = paste0("rho = ", c(1, 0.9, 0.7, 0.5)))

Alternatively,

computePower(..., saveDir = "myDir", saveFile = "myFile.RData")
plotRRgradVE(outComputePower = "myFile",    # file with 'computePower' output
             outDir = "~/myDir",            # path to myFile.RData
             legendText = paste0("rho = ", c(1, 0.9, 0.7, 0.5)))

Scenario 5: vary \(\, P^{lat}_0, P_0, P^{lat}_2, P_2 \) (Approach 2)

Trichotomous \(\, S\), without replacement sampling

pwr <- computePower(nCases = 32,                 
                    nControls = 3654,            
                    nCasesWithS = 32,           
                    controlCaseRatio = 5,                # n^S_controls : n^S_cases ratio
                    VEoverall = 0.75,                    # overall VE
                    risk0 = 0.034,                       # placebo-group endpoint risk between tau-tau_max 
                    VElat0 = seq(0, VEoverall, len=100), # grid of VE (V/P) among lower protected
                    VElat1 = rep(VEoverall, 100),        # grid of VE (V/P) among medium protected
                    Plat0 = 0.05,                        # scalar, ie separate calls for 0.05, 0.1, 0.15, 0.2
                    Plat2 = 0.15,                        # scalar, ie separate calls for 0.15, 0.3, 0.45, 0.6
                    P0 = 0.05,                           # scalar, ie separate calls for 0.05, 0.1, 0.15, 0.2
                    P2 = 0.15,                           # scalar, ie separate calls for 0.15, 0.3, 0.45, 0.6
                    sigma2obs = 1,                       # variance of observed biomarker S
                    rho = 0.9,                           # protection-relevant fraction of the variance of S
                    M = 1000,                            # number of simulated clinical trials
                    alpha = 0.05,                        # two-sided Wald test Type 1 error rate
                    biomType = "trichotomous")           # "continuous" by default

Scenario 5: vary \(\, P^{lat}_0, P_0, P^{lat}_2, P_2 \) (Approach 2)

Trichotomous \(\, S\), without replacement sampling

Scenario 5: vary \(\, P^{lat}_0, P_0, P^{lat}_2, P_2 \) (Approach 2)

Scenario 6: vary \(\, n_{cases}\) (Approach 2)

Trichotomous \(\, S\), without replacement sampling

pwr <- computePower(nCases = c(25, 32, 35, 40),             
                    nControls = c(3661, 3654, 3651, 3646),  
                    nCasesWithS = c(25, 32, 35, 40),       
                    controlCaseRatio = 5,                # n^S_controls : n^S_cases ratio
                    VEoverall = 0.75,                    # overall VE
                    risk0 = 0.034,                       # placebo-group endpoint risk between tau-tau_max
                    VElat0 = seq(0, VEoverall, len=100), # grid of VE (V/P) among lower protected
                    VElat1 = rep(VEoverall, 100),        # grid of VE (V/P) among medium protected
                    Plat0 = 0.2,                         # prevalence of lower protected
                    Plat2 = 0.6,                         # prevalence of higher protected
                    P0 = 0.2,                            # probability of low biomarker response
                    P2 = 0.6,                            # probability of high biomarker response
                    sigma2obs = 1,                       # variance of observed biomarker S
                    rho = 0.9,                           # protection-relevant fraction of the variance of S
                    M = 1000,                            # number of simulated clinical trials
                    alpha = 0.05,                        # two-sided Wald test Type 1 error rate
                    biomType = "trichotomous")           # "continuous" by default

Scenario 6: vary \(\, n_{cases}\) (Approach 2)

Trichotomous \(\, S\), without replacement sampling

Scenario 6: vary \(\, n_{cases}\) (Approach 2)

Illustration: CoRpower for binary \(\, S\)

Without replacement sampling

Achieved by selecting \(P_0^{lat}\), \(P_2^{lat}\), \(P_0\), \(P_2\) such that \[ \begin{align} P_0^{lat} + P_2^{lat} &= 1\\ P_0 + P_2 &= 1 \end{align} \]


Approach 2 \((\sigma^2_{obs}\) and \(\rho\) specified\()\)

  • Scenario 7: vary \(n_{cases}\)

Scenario 7: vary \(\, n_{cases}\) (Approach 2)

Binary \(\, S\), without replacement sampling

pwr <- computePower(nCases = c(25, 32, 35, 40),             
                    nControls = c(3661, 3654, 3651, 3646),  
                    nCasesWithS = c(25, 32, 35, 40),       
                    controlCaseRatio = 5,                # n^S_controls : n^S_cases ratio
                    VEoverall = 0.75,                    # overall VE
                    risk0 = 0.034,                       # placebo-group endpoint risk between tau-tau_max
                    VElat0 = seq(0, VEoverall, len=100), # grid of VE (V/P) among lower protected
                    VElat1 = rep(VEoverall, 100),        # grid of VE (V/P) among medium protected
                    Plat0 = 0.2,                         # prevalence of lower protected
                    Plat2 = 0.8,                         # prevalence of higher protected
                    P0 = 0.2,                            # probability of low biomarker response
                    P2 = 0.8,                            # probability of high biomarker response
                    sigma2obs = 1,                       # variance of observed biomarker S
                    rho = 0.9,                           # protection-relevant fraction of the variance of S
                    M = 1000,                            # number of simulated clinical trials
                    alpha = 0.05,                        # two-sided Wald test Type 1 error rate
                    biomType = "binary")                 # "continuous" by default

Scenario 7: vary \(\, n_{cases}\) (Approach 2)

Binary \(\, S\), without replacement sampling

Scenario 7: vary \(\, n_{cases}\) (Approach 2)

Algorithm for continuous biomarker \(\, S^{\ast}\)

Without replacement sampling

  1. Specify overall \(VE\) between \(\tau\) and \(\tau_{\mathrm{max}}\)
    • Protocol-specified design alternative or \(\widehat{VE}\)
  2. Specify \(risk_0\)
    • Protocol-specified placebo-group endpoint rate or \(\widehat{risk}_0\)

Algorithm for continuous biomarker \(\, S^{\ast}\)

Without replacement sampling

  1. Specify \(P^{lat}_{lowestVE}\), \(\rho\), and a grid of \(VE_{lowest}\) values (e.g., ranging from \(VE\) to 0)
    • Fixed \((VE, risk_0, P^{lat}_{lowestVE}, VE_{lowest}, \rho)\) and \[ \begin{align} risk^{lat}_1(x^{\ast}) &= (1 - VE_{lowest}) risk_0,\quad x^{\ast} \leq \nu\\ \mathop{\mathrm{logit}}\{risk^{lat}_1(x^{\ast})\} &= \alpha^{lat}+\beta^{lat}x^{\ast},\quad x^{\ast} \geq \nu\\ VE &= 1 - \frac{\int risk^{lat}_1(x^{\ast})\phi(x^{\ast}/\sqrt{\rho} \sigma_{obs})\mathop{\mathrm{d}}\!x^{\ast}}{risk_0} \end{align} \] yield \(\alpha^{lat}\) and \(\beta^{lat}\)
    • Plot \(VE^{lat}_{x^{\ast}}\) vs. \(x^{\ast}\) and calculate the pertaining CoR effect size \(\exp(\beta^{lat})\) for each level of \(VE_{lowest}\)

Algorithm for continuous biomarker \(\, S^{\ast}\)

Without replacement sampling

  1. Simulate \(M\) data sets under the true parameter values:
      Full data
    1. Sample \(X^{\ast}\) for \(n_{cases}\) cases from \(f_{X^{\ast}}(x^{\ast}|Y=1,Y^{\tau}=0,Z=1)\) using Bayes rule
    2. Sample \(X^{\ast}\) for \(n_{controls}\) controls from \(f_{X^{\ast}}(x^{\ast}|Y=0,Y^{\tau}=0,Z=1)\) using Bayes rule
      - How? Use a fine grid of \(\widetilde{x}^{\ast}\) values and then
      \(\;\;\)sample(\(\widetilde{x}^{\ast}\), prob=\(f_{X^{\ast}}(\widetilde{x}^{\ast}|Y=\cdot,Y^{\tau}=0,Z=1)\), replace=TRUE)
    3. Sample \(S^{\ast}\) following \(S^{\ast} = X^{\ast} + e\)
    4. Observed data
    5. Sample without replacement \(n^S_{cases}\) and \(n^S_{controls} = K n^S_{cases}\) controls with measured \(S^{\ast}\) \((R=1)\)

Algorithm for continuous biomarker \(\, S^{\ast}\)

Without replacement sampling

  1. For each observed data set, compute the 1-sided one-degree-of-freedom Wald test statistic for \(H_0 \Leftrightarrow \{\widetilde{H}_0: \beta_{S^{\ast}} \geq 0\}\) from IPW logistic regression model that accounts for biomarker sampling design (function tps in R package osDesign)
  2. Compute power as proportion of data sets with 1-sided Wald test \(p \leq \alpha/2\) for specified \(\alpha\)
  3. Repeat power calculation varying control:case ratio, \(n_{cases}\), \(n^S_{cases}\), \(P^{lat}_{lowestVE}\), \(\rho\)

Illustration: CoRpower for continuous \(\, S^{\ast}\)

Without replacement sampling

  • Scenario 8: vary \(\rho\)
  • Scenario 9: vary \(P_{lowestVE}^{lat}\)

Scenario 8: vary \(\, \rho \)

Continuous \(\, S^{\ast}\), without replacement sampling

pwr <- computePower(nCases = 32,             
                    nControls = 3654,         
                    nCasesWithS = 32,         
                    controlCaseRatio = 5,               # n^S_controls : n^S_cases ratio
                    VEoverall = 0.75,                   # overall VE
                    risk0 = 0.034,                      # placebo-group endpoint risk between tau-tau_max
                    PlatVElowest = 0.2,                 # prevalence of VE_lowest
                    VElowest = seq(0, VEoverall, len=100), # lowest VE level for true biomarker X* <= nu
                    sigma2obs = 1,                      # variance of observed biomarker S
                    rho = c(1, 0.9, 0.7, 0.5)           # protection-relevant fraction of the variance of S
                    M = 1000,                           # number of simulated clinical trials
                    alpha = 0.05,                       # two-sided Wald test Type 1 error rate
                    biomType = "continuous")            # "continuous" by default

Scenario 8: vary \(\, \rho\)

Continuous \(\, S^{\ast}\), without replacement sampling

pwr$power[1, c(1, 25, 50, 75, 100)]
## [1] 1.000 1.000 0.983 0.620 0.023
pwr$RRc[c(1, 25, 50, 75, 100)]
## [1] 0.001707853 0.040854962 0.178181573 0.455111981 0.999997688
pwr$VElowest[c(1, 25, 50, 75, 100)]
## [1] 0.0000000 0.1818182 0.3712121 0.5606061 0.7500000

Other components: betaLat, alphaLat, PlatVElowest, N, nCases, nCasesPhase2, controlCaseRatio, VEoverall, risk0, alpha, rho,

Scenario 8: vary \(\, \rho \)

Continuous \(\, S^{\ast}\), without replacement sampling

Scenario 8: vary \(\, \rho \)

Continuous \(\, S^{\ast}\), without replacement sampling

Plotting of \(VE^{lat}_{x^{\ast}}\) curves

plotVElatCont(outComputePower = pwr)  # output list from 'computePower'

Alternatively,

computePower(..., saveDir = "myDir", saveFile = "myFile.RData")
plotVElatCont(outComputePower = "myFile",   # file with 'computePower' output
              outDir = "~/myDir")           # path to myFile.RData

Scenario 8: vary \(\, \rho \)

Scenario 8: vary \(\, \rho \)

Plotting of power curves

plotPowerCont(outComputePower = pwr,          # output list from 'computePower'
              legendText = paste0("rho = ", c(1, 0.9, 0.7, 0.5)))

Alternatively,

computePower(..., saveDir = "myDir", saveFile = "myFile.RData")
plotPowerCont(outComputePower = "myFile",     # file with 'computePower' output
              outDir = "~/myDir",             # path to myFile.RData
              legendText = paste0("rho = ", c(1, 0.9, 0.7, 0.5)))

Scenario 9: vary \(\, P_{lowestVE}^{lat} \)

Continuous \(\, S^{\ast}\), without replacement sampling

pwr <- computePower(nCases = 32,               
                    nControls = 3654,         
                    nCasesWithS = 32,         
                    controlCaseRatio = 5,               # n^S_controls : n^S_cases ratio
                    VEoverall = 0.75,                   # overall VE
                    risk0 = 0.034,                      # placebo-group endpoint risk between tau-tau_max
                    PlatVElowest = 0.05,                # scalar, ie separate calls for 0.05, 0.1, 0.15, 0.2
                    VElowest = seq(0, VEoverall, len=100), # lowest VE level for true biomarker X* <= nu
                    sigma2obs = 1,                      # variance of observed biomarker S
                    rho = 0.9                           # protection-relevant fraction of the variance of S
                    M = 1000,                           # number of simulated clinical trials
                    alpha = 0.05,                       # two-sided Wald test Type 1 error rate
                    biomType = "continuous")            # "continuous" by default

Scenario 9: vary \(\, P_{lowestVE}^{lat} \)

Scenario 9: vary \(\, P_{lowestVE}^{lat} \)

Bernoulli / case-cohort sampling of \(\, S\) (or \(\, S^{\ast}\))

  • Bernoulli sample at baseline with sampling probability \(p\)
  • \(S\) (or \(S^{\ast}\)) measured at \(\tau\) in
    • a subset of the sample with \(Y^{\tau}=0\), and
    • all cases with \(Y^{\tau}=0\)
  • Implications:
    • \(n_{cases} = n^S_{cases}\)
    • design parameter \(n^S_{controls}\) replaced by probability \(p\) because \(n^S_{controls}\) is a random variable in case-cohort designs

Illustration: CoRpower for trichotomous \(\, S\) and continuous \(\, S^{\ast}\)

Bernoulli sampling

Trichotomous \(S\) (Approach 1)

  • Scenario 10: vary \(p\)

Continuous \(S^{\ast}\)

  • Scenario 11: vary \(p\)

Scenario 10: vary \(\, p \) (Approach 1)

Trichotomous \(\, S \), Bernoulli sampling

pwr <- computePower(nCases = 32,             
                    nControls = 3654,       
                    nCasesWithS = 32,       
                    cohort = TRUE,                    # FALSE by default
                    p = 0.01,                         # scalar, ie separate calls for 0.01, 0.02, 0.03, 0.05
                    VEoverall = 0.75,                 # overall VE
                    risk0 = 0.034,                    # placebo-group endpoint risk between tau-tau_max
                    VElat0 = seq(0, VEoverall, len=100), # grid of VE (V/P) among lower protected
                    VElat1 = rep(VEoverall, 100),     # grid of VE (V/P) among medium protected
                    Plat0 = 0.2,                      # prevalence of lower protected
                    Plat2 = 0.6,                      # prevalence of higher protected
                    P0 = 0.2,                         # probability of low biomarker response
                    P2 = 0.6,                         # probability of high biomarker response
                    sens = 0.8, spec = 0.8, FP0 = 0, FN2 = 0,
                    M = 1000,                         # number of simulated clinical trials
                    alpha = 0.05,                     # two-sided Wald test Type 1 error rate
                    biomType = "trichotomous")        # "continuous" by default

Scenario 10: vary \(\, p \) (Approach 1)

Scenario 11: vary \(\, p \)

Continuous \(\, S^{\ast}\), Bernoulli sampling

pwr <- computePower(nCases = 32,             
                    nControls = 3654,        
                    nCasesWithS = 32,       
                    cohort = TRUE,                    # FALSE by default
                    p = 0.01,                         # scalar, ie separate calls for 0.01, 0.02, 0.03, 0.05
                    VEoverall = 0.75,                 # overall VE
                    risk0 = 0.034,                    # placebo-group endpoint risk between tau and tau_max
                    PlatVElowest = 0.2,               # prevalence of VE_lowest
                    VElowest = seq(0, VEoverall, len=100), # lowest VE level for true biomarker X* <= nu
                    sigma2obs = 1,                    # variance of observed biomarker S
                    rho = 0.9                         # protection-relevant fraction of the variance of S
                    M = 1000,                         # number of simulated clinical trials
                    alpha = 0.05,                     # two-sided Wald test Type 1 error rate
                    biomType = "continuous")          # "continuous" by default

Scenario 11: vary \(\, p \)

Key R functions to design and conduct a CoR power analysis, and display analysis results




  • computeN
  • computePower
  • plotPowerTri
  • plotRRgradVE
  • plotPowerCont
  • plotVElatCont



R package CoRpower to be submitted to CRAN this week

Currently downloadable at:

https://github.com/smwu/CoRpower

Implementation of Gilbert, Janes, Huang (2016, Stat Med)

Code and slide contributions:

Stephanie Wu