Skip to content

Commit a5279e7

Browse files
Edited for English style and clarity
1 parent b0b2e7b commit a5279e7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

vignettes/sampleSize_parallel_3A1E.Rmd

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ options(rmarkdown.html_vignette.check_title = FALSE) #title of doc does not matc
2222
doc.cache <- T #for cran; change to F
2323
```
2424

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.
2626

2727
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.
2828

2929
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.
3030

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:
3232

3333

3434
```{r}
@@ -42,7 +42,7 @@ data <- data.table::data.table(arm = c("SB2","EU_Remicade","USA_Remicade"),
4242

4343
# Sample Size Calculation for AUCinf: Equivalence to EU Remicade
4444

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.
4646

4747
## Hypotheses
4848

@@ -58,7 +58,7 @@ Here, $E_L$ and $E_U$ represent the lower and upper equivalence margins, respect
5858

5959
## Preparing the function arguments
6060

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.
6262

6363
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.
6464

@@ -80,7 +80,7 @@ list_uequi.tol <- list("Comparison" = 1/0.8)
8080
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:
8181

8282
* A parallel design,
83-
* A test based on the rate of means (ROM),
83+
* A test based on the ratio of means (ROM),
8484
* Equal variances across arms,
8585
* A lognormal distribution for the endpoint.
8686

@@ -102,7 +102,7 @@ AUCinf_1comp <- sampleSize(
102102
AUCinf_1comp
103103
```
104104

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.
106106

107107

108108
# Sample Size Calculation for AUCinf: Equivalence to US Remicade and EU Remicade
@@ -121,11 +121,11 @@ $$H_1: E_L<\frac{\mu_{SB2}}{\mu_{RemEU}} < E_U~~ and~~E_L<\frac{\mu_{SB2}}{\mu_{
121121
Key Considerations:
122122

123123
* 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.
125125

126126
## Implementation Details
127127

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.
129129

130130
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.
131131

@@ -157,11 +157,11 @@ We then pass these values into the [sampleSize()](../reference/sampleSize.html)
157157

158158
## Results and Interpretation
159159

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`).
161161

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.
163163

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.
165165

166166
```{r, fig.height=4, fig.width = 10, out.width = "95%"}
167167
plot(AUCinf_2comp)

0 commit comments

Comments
 (0)