Skip to content

Commit 543c7ed

Browse files
author
NightlordTW
committed
Expand example
1 parent c787155 commit 543c7ed

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

vignettes/sampleSize_parallel_2A3E.Rmd

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,66 @@ If we were to test each PK measure independently, we would find a total sample s
107107
# Simultaneous Testing of PK Measures with Independent Endpoints
108108
This approach focuses on simultaneous testing of pharmacokinetic (PK) measures while assuming independence between endpoints. Unlike the previous approach, which evaluated each PK measure independently, this method integrates comparisons across multiple endpoints, accounting for correlations (or lack thereof) between them. By doing so, it enables simultaneous testing for equivalence without inflating the overall Type I error rate.
109109

110+
## Key Assumptions
111+
In the calculations below, the following assumptions are made:
110112

113+
* Parameter Tested: The Ratio of Means (ROM) is used as the equivalence parameter.
114+
* Design: A parallel trial design is assumed.
115+
* Distribution: PK measures follow a log-normal distribution.
116+
* Standard Deviation: A common standard deviation is assumed for each biosimilar.
117+
* Multiplicity: No multiplicity adjustments are applied.
118+
* Equivalence Criterion: Equivalence is required for only one of the endpoints.
119+
*Independence: All endpoints are assumed to be uncorrelated. This is specified using the default value of the correlation parameter, $\rho=0$.
120+
121+
## Input Data
122+
123+
The arithmetic means and standard deviations for each endpoint and treatment arm are defined as follows:
124+
```{r}
125+
mu_list <- list(
126+
SB2 = c(AUCinf = 38703, AUClast = 36862, Cmax = 127.0),
127+
EUREF = c(AUCinf = 39360, AUClast = 37022, Cmax = 126.2)
128+
)
129+
130+
sigma_list <- list(
131+
SB2 = c(AUCinf = 11114, AUClast = 9133, Cmax = 16.9),
132+
EUREF = c(AUCinf = 12332, AUClast = 9398, Cmax = 17.9)
133+
)
134+
```
135+
136+
## Equivalence Boundaries
137+
Since we are comparing multiple co-primary endpoints, it is essential to define the lower and upper equivalence boundaries for each endpoint. These boundaries determine the acceptable range for the Ratio of Means (ROM) within which equivalence is established.
138+
139+
For simplicity, the same equivalence boundaries are applied to all endpoints:
140+
141+
```{r}
142+
# Equivalent boundaries
143+
list_comparator <- list("Comparison" = c("SB2","EUREF"))
144+
list_lequi.tol <- list("Comparison" = c(AUCinf = 0.8, AUClast = 0.8, Cmax = 0.8))
145+
list_uequi.tol <- list("Comparison" = c(AUCinf = 1.25, AUClast = 1.25, Cmax = 1.25))
146+
```
147+
148+
By default, it is required that all $k=m$ co-primary endpoints have to be equivalent:
149+
150+
```{r}
151+
library(simsamplesize)
152+
153+
(N_ss <- sampleSize(power = 0.9, # target power
154+
alpha = 0.05,
155+
mu_list = mu_list,
156+
sigma_list = sigma_list,
157+
list_comparator = list_comparator,
158+
list_lequi.tol = list_lequi.tol,
159+
list_uequi.tol = list_uequi.tol,
160+
dtype = "parallel",
161+
ctype = "ROM",
162+
vareq = TRUE,
163+
lognorm = TRUE,
164+
ncores = 1,
165+
nsim = 50,
166+
seed = 1234))
167+
```
168+
169+
If we increase `nsim` to 10,000 we find a total sample size of 80 patients.
111170

112171

113172
In this setting, equivalence is required for at least one endpoint rather than all endpoints, reducing the overall sample size compared to independent testing. Furthermore, this approach allows for greater flexibility by enabling users to specify correlation structures or work with uncorrelated endpoints as a default assumption.

0 commit comments

Comments
 (0)