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_3A1E.Rmd
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -22,13 +22,13 @@ options(rmarkdown.html_vignette.check_title = FALSE) #title of doc does not matc
22
22
doc.cache <- T #for cran; change to F
23
23
```
24
24
25
-
This vignette demonstrates advanced sample size calculation techniques for parallel trial designs involving three arms and one endpoint. Specifically, we calculate the required sample size to test bioequivalence between a new treatment (SB2) and a reference drug (Remicade) administered in two different locations ("EU_Remicade" and "USA_Remicade"). The endpoint of interest is the Area Under the Curve (AUCinf), a commonly used pharmacokinetic measure.
25
+
This vignette demonstrates advanced sample size calculation techniques for parallel trial designs involving three arms and one endpoint. Specifically, we calculate the required sample size to test bioequivalence between a new treatment (SB2) and a reference product (Remicade) administered in two different locations ("EU_Remicade" and "USA_Remicade"). The endpoint of interest is the Area Under the Curve (AUCinf), a commonly used pharmacokinetic measure.
26
26
27
27
In this example, we assume the endpoint follows a log-normal distribution with equal variances across arms. The goal is to determine the sample size needed to achieve 90\% power while controlling the type I error rate at 5\%. The equivalence margin is defined as $E_L = 80\%$ and $E_U = 125\%$ of the reference mean on the original scale.
28
28
29
29
The methods presented in this vignette build on fundamental bioequivalence testing concepts and extend them to multi-arm scenarios. These examples provide practical insights for designing robust parallel trials with complex equivalence testing requirements.
30
30
31
-
For the primary outcome, AUCinf, we assume the data is available on the original scale, including the mean and standard deviation for each arm. This information is organized into a structured data table for further analysis:
31
+
We assume that the primary endpoint, AUCinf, is on the original scale, with the mean and standard deviation for each arm available. This information is organized into a structured data table for further analysis:
32
32
33
33
34
34
```{r}
@@ -42,7 +42,7 @@ data <- data.table::data.table(arm = c("SB2","EU_Remicade","USA_Remicade"),
42
42
43
43
# Sample Size Calculation for AUCinf: Equivalence to EU Remicade
44
44
45
-
This example demonstrates how to calculate the sample size required when testing the equivalence of SB2 to a reference drug, Remicade, as administered in Europe. The goal is to determine the minimum number of participants needed to ensure adequate power for the equivalence test.
45
+
This example demonstrates how to calculate the required sample size when testing the equivalence of SB2 to a reference drug, Remicade, as administered in the EU. The goal is to determine the minimum number of participants needed to ensure adequate power for the equivalence test.
46
46
47
47
## Hypotheses
48
48
@@ -58,7 +58,7 @@ Here, $E_L$ and $E_U$ represent the lower and upper equivalence margins, respect
58
58
59
59
## Preparing the function arguments
60
60
61
-
To proceed with the sample size calculation, we first need to organize the mean and standard deviation values of each arm (SB2, EU Remicade, USA Remicade) into appropriate lists.
61
+
To proceed with the sample size calculation, we first need to organize the mean and standard deviation values of each arm (SB2, EU Remicade, USA Remicade) as list objects.
62
62
63
63
Since this example focuses on a single endpoint, the mean list (`mu_list`) contains three scalar elements corresponding to each arm, and the standard deviation list (`sigma_list`) contains three 1x1 matrix elements.
Finally, we use the [sampleSize()](../reference/sampleSize.html) function to calculate the required sample size based on stochastic simulations of the trial. The function accepts several parameters, such as the desired power, confidence level, and design specifications. By default, it assumes:
81
81
82
82
* A parallel design,
83
-
* A test based on the rate of means (ROM),
83
+
* A test based on the ratio of means (ROM),
84
84
* Equal variances across arms,
85
85
* A lognormal distribution for the endpoint.
86
86
@@ -102,7 +102,7 @@ AUCinf_1comp <- sampleSize(
102
102
AUCinf_1comp
103
103
```
104
104
105
-
Results from the simulations indicate that the required sample size for this trial setting is `r AUCinf_1comp$response$n_total` or `r AUCinf_1comp$response$n_SB2` for each arm.
105
+
The required sample size for this scenario is `r AUCinf_1comp$response$n_total`, or `r AUCinf_1comp$response$n_SB2` for each arm.
106
106
107
107
108
108
# Sample Size Calculation for AUCinf: Equivalence to US Remicade and EU Remicade
* The function [sampleSize()](../reference/sampleSize.html) adjusts the alpha level for multiple comparisons within a single comparator (e.g., comparisons involving only RemEU or RemUSA).
124
-
*Current Limitation: The function does not yet account for alpha adjustments between comparators when simultaneously comparing SB2 with both reference products (RemEU and RemUSA). Thus, the null hypothesis is rejected if any ratio of means (ROM) falls outside the equivalence boundaries. Future program updates aim to address this limitation and include proper alpha adjustments for comparisons between comparators.
124
+
* The function does not yet account for alpha adjustments between comparators when simultaneously comparing SB2 with both reference products (RemEU and RemUSA). Thus, the null hypothesis is rejected if any ROM falls outside the equivalence boundaries. Future package updates will address this limitation and include proper alpha adjustments for comparisons between comparators.
125
125
126
126
## Implementation Details
127
127
128
-
We proceed similarly to the initial example, modifying the `list_comparator` to include multiple comparators. In this case, the list contains two elements specifying the simultaneous comparison between SB2 vs. RemEU and SB2 vs. RemUSA. This approach ensures that the equivalence assessment accounts for both reference products.
128
+
Implementation of this scenario is similar to the initial example, in which the `list_comparator`is modified to include multiple comparators. The list contains two elements specifying the simultaneous comparison between SB2 vs. RemEU and SB2 vs. RemUSA. This approach ensures that the equivalence assessment accounts for both reference products.
129
129
130
130
Additionally, we must specify equivalence boundaries for each comparison individually. These boundaries define the acceptable range for equivalence and are provided separately for each comparator.
131
131
@@ -157,11 +157,11 @@ We then pass these values into the [sampleSize()](../reference/sampleSize.html)
157
157
158
158
## Results and Interpretation
159
159
160
-
Based on the output table, the required total sample size for this trial setting is `r AUCinf_2comp$response$n_total`. Notably, an additional `r AUCinf_2comp$response$n_SB2 - AUCinf_1comp$response$n_SB2` patients per arm are required to achieve equivalence with both reference products (RemEU and RemUSA), compared to the scenario where equivalence is required with only one reference arm (`r AUCinf_1comp$response$n_SB2`).
160
+
The required total sample size for this scenario is `r AUCinf_2comp$response$n_total`. Notably, an additional `r AUCinf_2comp$response$n_SB2 - AUCinf_1comp$response$n_SB2` patients per arm are required to achieve equivalence with both reference products (RemEU and RemUSA), compared to the scenario where equivalence is required with only one reference arm (`r AUCinf_1comp$response$n_SB2`).
161
161
162
-
This demonstrates the added complexity and sample size requirements when multiple comparators are involved in an equivalence trial.
162
+
This example demonstrates the added complexity and sample size requirements when multiple comparators are involved in an equivalence trial.
163
163
164
-
The package includes the [plot()](../reference/plot.simss.html) function, which is designed to visualize the relationship between sample size (x-axis) and achieved power (y-axis) for all combinations of outcomes and comparators. In this example, we will use the [plot()](../reference/plot.simss.html) function to generate a plot for the `AUCinf_2comp` object.
164
+
The SimTOST package includes the [plot()](../reference/plot.simss.html) function, which is designed to permit visualization of the relationship between sample size (x-axis) and achieved power (y-axis) for all combinations of endpoints and comparators. In this example, we use the [plot()](../reference/plot.simss.html) function to generate a plot for the `AUCinf_2comp` object.
0 commit comments