You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/sampleSize_parallel_2A3E.Rmd
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -241,7 +241,6 @@ A more advanced testing approach involves Sequential Adjustment, where the signi
241
241
242
242
In this example, the sequential adjustment can be implemented by setting the function argument to `adjust = "seq"` and specifying the type of each endpoint through the `type_y` parameter. For instance, we define "AUCinf" as a primary endpoint, while "AUClast" and "Cmax" are designated as secondary endpoints.
k = 2, # Number of endpoints required to demonstrate equivalence
203
+
adjust = "bon", # Bonferroni adjustment for multiple comparisons
204
+
dtype = "parallel", # Trial design type (parallel group)
206
205
ctype = "ROM", # Test type: Ratio of Means
207
-
vareq = TRUE, # Assume equal variances
206
+
vareq = TRUE, # Assume equal variances across arms
208
207
lognorm = TRUE, # Log-normal distribution assumption
209
208
ncores = 1, # Number of cores for computation
210
209
nsim = 1000, # Number of stochastic simulations
211
210
seed = 1234)) # Random seed for reproducibility
212
211
```
213
212
213
+
## Unequal Allocation Rates Across Arms
214
+
In this example, we build upon the previous setting but introduce unequal allocation rates across the treatment arms. Specifically, we require that the number of patients in the new treatment arm is double the number in each of the reference arms.
215
+
216
+
This can be achieved by specifying the treatment allocation rate parameter (`TAR`). The rates are provided as a vector, for example: `TAR = c(2, 1, 1)`. This ensures that for every two patients assigned to the new treatment arm, one patient is assigned to each reference arm.
217
+
218
+
```{r}
219
+
(N_mp2 <- sampleSize(power = 0.9, # Target power
220
+
alpha = 0.05, # Type I error rate
221
+
mu_list = mu_list, # Means for each endpoint and arm
dtype = "parallel", # Trial design type (parallel group)
231
+
ctype = "ROM", # Test type: Ratio of Means
232
+
vareq = TRUE, # Assume equal variances across arms
233
+
lognorm = TRUE, # Log-normal distribution assumption
234
+
ncores = 1, # Number of cores for computation
235
+
nsim = 1000, # Number of stochastic simulations
236
+
seed = 1234)) # Random seed for reproducibility
237
+
```
238
+
239
+
Results from the simulation indicate that `r N_mp2$response$n_SB2` patients are required for SB2 the active treatment arm (SB2), and `r N_mp2$response$n_EUINF` patients are required for each reference arm. The total sample size required is `r N_mp2$response$n_total`. This is significantly larger compared to the previous example, where the total sample size was `r N_mp$response$n_total`.
0 commit comments