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_3A3E.Rmd
+27-2Lines changed: 27 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ library(SimTOST)
151
151
seed = 1234)) # Random seed for reproducibility
152
152
```
153
153
154
-
We find a total sample size of N_ss$response$n_total patients (or `r N_ss$response$n_total/3` per arm) are required to demonstrate equivalence.
154
+
We find a total sample size of `r N_ss$response$n_total` patients (or `r N_ss$response$n_total/3` per arm) are required to demonstrate equivalence.
155
155
156
156
# Simultaneous Testing of Independent Primary Endpoints
157
157
@@ -236,8 +236,33 @@ This can be achieved by specifying the treatment allocation rate parameter (`TAR
236
236
seed = 1234)) # Random seed for reproducibility
237
237
```
238
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`.
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`, which is larger compared to the trial with an equal allocation ratio, where the total sample size was `r N_mp$response$n_total`.
240
240
241
+
## Accounting for Dropouts
242
+
In the examples above, the sample size calculations assumed that all patients enrolled in the trial would complete it. However, in practice, a certain percentage of participants typically drop out, which can impact the required sample size. To account for this, we consider a 20% dropout rate across all treatment arms in this example.
241
243
244
+
```{r}
245
+
(N_mp3 <- sampleSize(power = 0.9, # Target power
246
+
alpha = 0.05, # Type I error rate
247
+
mu_list = mu_list, # Means for each endpoint and arm
0 commit comments