CoRpower’s Algorithms for Simulating Placebo Group and Baseline Immunogenicity Predictor Data

Introduction

The CoRpower package assumes that P(Yτ(1) = Yτ(0)) = 1 for the biomarker sampling timepoint τ, which renders the CoR parameter P(Y = 1 ∣ S = s1, Z = 1, Yτ = 0) equal to P(Y = 1 ∣ S = s1, Z = 1, Yτ(1) = Yτ(0) = 0), which links the CoR and biomarker-specific treatment efficacy (TE) parameters. Estimation of the latter requires outcome data in placebo recipients, and some estimation methods additionally require availability of a baseline immunogenicity predictor (BIP) of S(1), the biomarker response at τ under assignment to treatment. In order to link power calculations for detecting a correlate of risk (CoR) and a correlate of TE (coTE), CoRpower allows to export simulated data sets that are used in CoRpower’s calculations and that are extended to include placebo-group and BIP data for harmonized use by methods assessing biomarker-specific TE. This vignette aims to describe CoRpower’s algorithms, and the underlying assumptions, for simulating placebo-group and BIP data. The exported data sets include full rectangular data to allow the user to consider various biomarker sub-sampling designs, e.g., different biomarker case:control sampling ratios, or case-control vs. case-cohort designs.


Algorithms for Simulating Placebo Group Data

Trichotomous X and S(1) Using Approach 1

  1. Specify P0lat, P2lat, P0, P2, risk0, ncases, 0, ncontrols, 0, K
    • Ncomplete, 0 = ncases, 0 + ncontrols, 0
  2. Specify Sens, Spec, FP0, and FN2
  3. Number of observations in each latent subgroup: Nx = Ncomplete, 0Pxlat
  4. Simulate X under the assumption of homogeneous risk in the placebo group:
    • Cases: (ncases, 0(0), ncases, 0(1), ncases, 0(2)) ∼ Mult(ncases, 0, (p0, p1, p2)), where
    • Controls: (ncontrols, 0(0), ncontrols, 0(1), ncontrols, 0(2)) ∼ Mult(ncontrols, 0, (p0, p1, p2)), where
    • ncontrols, 0(x) = Nx − ncases, 0(x)
  5. Simulate Y: Vector with ncases, 0(0) 1’s, followed by ncontrols, 0(0) 0’s, followed by ncases, 0(1) 1’s, etc.
  6. Simulate S(1): For each of the Nx subjects, generate S(1) by a draw from Mult(1, (p0, p1, p2)), where pk = P(S(1) = k|X = x) is given by Sens, Spec, etc.

Trichotomous X and S(1) Using Approach 2

  1. Specify P0lat, P2lat, P0, P2, risk0, Ncomplete, 0, ncases, 0, ncasesS, K
  2. Specify ρ and σobs2
  3. Calculation of (Sens, Spec, FP0, FP1, FN1, FN2):
    1. Assuming the classical measurement error model, where X* ∼ N(0, σtr2), solve P0lat = P(X* ≤ θ0)  and  P2lat = P(X* > θ2) for θ0 and θ2
    2. Generate B realizations of X* and S* = X* + e, where e ∼ N(0, σe2), and X* independent of e + B = 20, 000 by default
    3. Using θ0 and θ2 from Step i., define

      Estimate Spec(ϕ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.
    4. Find ϕ0 = ϕ0* and ϕ2 = ϕ2* that numerically solve and compute $$ Spec = \widehat{Spec}(\phi^{\ast}_0),\; Sens = \widehat{Sens}(\phi^{\ast}_2),\; \textrm{etc.} $$
  4. Follow Steps 3–6 under Approach 1

Continuous X* and S*(1)

  1. Specify PlowestVElat, ρ, σobs2, VElowest, risk0, ncases, 0, ncontrols, 0, ncasesS, K
    • Ncomplete, 0 = ncases, 0 + ncontrols, 0
  2. Simulate Y by creating a vector with ncases, 0 1’s followed by ncontrols, 0 0’s.
  3. Simulate X* under the assumption of homogeneous risk in the placebo group:
    • Cases: from a grid of values ranging from -3 to 3, sample ncases, 0 with replacement from:
    • Controls: from a grid of values ranging from -3 to 3, sample ncontrols, 0 with replacement from:
    • fX*(x*) is fully specified because X* ∼ N(0, σtr2)
  4. Simulate S*(1): S*(1) = X* + ϵ, where ϵ ∼ N(0, σe2) and σe2 = (1 − ρ)σobs2. ϵ is independent of X* and is simulated by rnorm(Ncomplete, mean=0, sd=sqrt(sigma2e))

Algorithms for Simulating a Baseline Immunogenicity Predictor (BIP)

Trichotomous X, S(1), and BIP Using Approach 1

  1. The user specifies a classification rule defined by P(BIP = i ∣ S(1) = j), i, j = 0, 1, 2.
  2. For a subject with biomarker measurement Sk(1), generate BIPk by a draw from Mult(1, (q0, q1, q2)), where qi = P(BIPk = i ∣ S(1) = Sk(1)), i = 0, 1, 2.

Trichotomous X, S(1), and BIP Using Approach 2

Note: All variables with * are continuous.

  1. The user specifies corr (BIP*, S*(1)).
  2. Assuming that BIP* follows an additive measurement error model, i.e., BIP* := S*(1) + δ, where δ ∼ N(0, σδ2) with an unknown σδ2, and δ, ϵ, and X* are independent, solve the following equation for var δ = σδ2: $$ \mathop{\mathrm{corr}}(BIP^*, S^*(1)) = \sqrt\frac{\mathop{\mathrm{var}}X^* + \mathop{\mathrm{var}}\epsilon}{\mathop{\mathrm{var}}X^* + \mathop{\mathrm{var}}\epsilon + \mathop{\mathrm{var}}\delta} $$
  3. For the fixed ϕ0* and ϕ2* derived above, define
  4. Using the same technique as in the derivation of ϕ0* and ϕ2* above, find ξ0 = ξ0* and ξ2 = ξ2* that numerically solve and compute $$ Spec_{BIP} = \widehat{Spec}_{BIP}(\xi^{\ast}_0),\; Sens_{BIP} = \widehat{Sens}_{BIP}(\xi^{\ast}_2),\; \textrm{etc.} $$
  5. For a subject with biomarker measurement Sk(1), generate BIPk by a draw from Mult(1, (q0, q1, q2)), where qi, i = 0, 1, 2, are determined by SensBIP, SpecBIP, etc. obtained in Step 4.

Continuous X*, S*(1), and BIP*

  1. The user specifies corr (BIP*, S*(1)).
  2. Assuming that BIP* follows an additive measurement error model, i.e., BIP* := S*(1) + δ, where δ ∼ N(0, σδ2) with an unknown σδ2, and δ, ϵ, and X* are independent, solve the following equation for var δ = σδ2: $$ \mathop{\mathrm{corr}}(BIP^*, S^*(1)) = \sqrt\frac{\mathop{\mathrm{var}}X^* + \mathop{\mathrm{var}}\epsilon}{\mathop{\mathrm{var}}X^* + \mathop{\mathrm{var}}\epsilon + \mathop{\mathrm{var}}\delta} $$
  3. For a subject with biomarker measurement Sk*(1), generate BIPk* as BIPk* = Sk*(1) + δ using σδ2 = var δ obtained in Step 2.