Skip to content

Commit 3064015

Browse files
author
NightlordTW
committed
Update vignette
1 parent 490e2c8 commit 3064015

File tree

1 file changed

+64
-1
lines changed

1 file changed

+64
-1
lines changed

vignettes/sampleSize_parallel_3A1E.Rmd

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,70 @@ AUCinf_1comp <- sampleSize(
101101
AUCinf_1comp
102102
```
103103

104-
Based on the table, 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.
104+
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.
105105

106106

107+
# Sample Size Calculation for AUCinf: Equivalence to US Remicade and EU Remicade
108+
109+
In this section, we calculate the sample size required to demonstrate equivalence with both the European reference product (RemEU) and the US reference product (RemUS). This scenario involves a more complex comparison, as we must simultaneously establish equivalence with two distinct reference arms.
110+
111+
## Hypotheses
112+
113+
Null Hypothesis (No Equivalence):
114+
115+
$$H_0: \frac{\mu_{SB2}}{\mu_{RemEU}} \le E_L ~~ or~~ \frac{\mu_{SB2}}{\mu_{RemEU}} \ge E_U~~ or~~ \frac{\mu_{SB2}}{\mu_{RemUSA}} \le E_L ~~ or~~ \frac{\mu_{SB2}}{\mu_{RemUSA}} \ge E_U$$
116+
117+
Alternative Hypothesis (Equivalence):
118+
119+
$$H_1: E_L<\frac{\mu_{SB2}}{\mu_{RemEU}} < E_U~~ and~~E_L<\frac{\mu_{SB2}}{\mu_{RemUSA}} < E_U$$
120+
Key Considerations:
121+
122+
* 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).
123+
* 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+
125+
## Implementation Details
126+
127+
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+
129+
130+
```{r}
131+
list_comparator <- list("EU" = c("SB2", "EU_Remicade"),
132+
"US" = c("SB2", "USA_Remicade"))
133+
list_lequi.tol <- list("EU" = 0.8, "US" = 0.8) # Lower equivalence boundary
134+
list_uequi.tol <- list("EU" = 1/0.8, "US" = 1/0.8) # Upper equivalence boundary
135+
```
136+
137+
## Computing Sample Size
138+
139+
We then pass these values into the [sampleSize()](../reference/sampleSize.html) function to calculate the required sample size for multiple comparisons.
140+
141+
```{r}
142+
AUCinf_2comp <- sampleSize(
143+
power = 0.9, # Target power
144+
alpha = 0.05, # Confidence level
145+
arm_names = data$arm, # Names of trial arms
146+
list_comparator = list_comparator, # Comparator configuration
147+
mu_list = mu_list, # Mean values
148+
sigma_list = sigma_list, # Standard deviation values
149+
list_lequi.tol = list_lequi.tol, # Lower equivalence boundary
150+
list_uequi.tol = list_uequi.tol, # Upper equivalence boundary
151+
ncores = 1, # Number of cores for computation
152+
nsim = 1000 # Number of stochastic simulations
153+
)
154+
155+
AUCinf_2comp
156+
```
157+
158+
## Results and Interpretation
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`).
161+
162+
This demonstrates the added complexity and sample size requirements when multiple comparators are involved in an equivalence trial.
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.
165+
166+
```{r, fig.height=4, fig.width = 10, out.width = "95%"}
167+
plot(AUCinf_2comp)
168+
```
169+
107170
# References

0 commit comments

Comments
 (0)