Skip to content

Commit a38bafc

Browse files
Edited for English style and clarity
1 parent 71c7d72 commit a38bafc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

vignettes/sampleSize_parallel_2A1E.Rmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Drug B is a well-established biologic drug used to control blood pressure. Its e
3434
### Trial Design
3535
The study follows a parallel-group design with the following key assumptions:
3636

37-
* Reference Group (Drug B): The average blood pressure is 96 mmHg, with a within-group standard deviation of 18 mmHg.
37+
* Reference Group (Drug B): Average blood pressure is 96 mmHg, with a within-group standard deviation of 18 mmHg.
3838
* Mean Difference: As per FDA guidelines, the assumed difference between the two groups is set to $\delta = \sigma/8 = 2.25$ mmHg.
39-
* Biosimilarity Limits: These are defined as ±1.5σ = ±27 mmHg.
39+
* Biosimilarity Limits: Defined as ±1.5σ = ±27 mmHg.
4040
* Desired Type-I Error: 2.5%
4141
* Target Power: 90%
4242

@@ -58,12 +58,12 @@ lequi_upper <- setNames(27, "BP")
5858
```
5959

6060
### Objective
61-
To explore the power of the test across a range of group sample sizes, the researchers plan to calculate the power for group sizes varying from 6 to 20.
61+
To explore the power of the test across a range of group sample sizes, power for group sizes varying from 6 to 20 will be calculated.
6262

6363
### Implementation
64-
To estimate the power for different sample sizes, we use the [sampleSize()](../reference/sampleSize.html) function. The function is configured with a power target of 0.90, a type-I error rate of 0.025, and the specified mean and standard deviation values for the reference and treatment groups. The optimization method is set to `"step-by-step"` to display the achieved power for each sample size, providing detailed insights into the results.
64+
To estimate the power for different sample sizes, we use the [sampleSize()](../reference/sampleSize.html) function. The function is configured with a power target of 0.90, a type-I error rate of 0.025, and the specified mean and standard deviation values for the reference and treatment groups. The optimization method is set to `"step-by-step"` to display the achieved power for each sample size, providing insights into the results.
6565

66-
Below is an example of how the function can be implemented in R:
66+
Below illustrates how the function can be implemented in R:
6767

6868
```{r}
6969
library(SimTOST)
@@ -89,13 +89,13 @@ library(SimTOST)
8989
N_ss$table.iter
9090
```
9191

92-
We can visualize the power curve for different sample sizes using the following code snippet:
92+
We can visualize the power curve for a range of sample sizes using the following code snippet:
9393

9494
```{r}
9595
plot(N_ss)
9696
```
9797

98-
To account for an anticipated dropout rate of 20% in each group, we need to adjust the sample size. The following code demonstrates how to incorporate this adjustment using a custom optimization routine. This routine is designed to find the smallest integer sample size that meets or exceeds the target power. It employs a stepwise search strategy, starting with larger step sizes and progressively refining them as it approaches the solution.
98+
To account for an anticipated dropout rate of 20% in each group, we need to adjust the sample size. The following code demonstrates how to incorporate this adjustment using a custom optimization routine. This routine is designed to find the smallest integer sample size that meets or exceeds the target power. It employs a stepwise search strategy, starting with large step sizes that are progressively refined as the solution is approached.
9999

100100
```{r}
101101
# Adjusted sample size calculation with 20% dropout rate
@@ -118,6 +118,6 @@ To account for an anticipated dropout rate of 20% in each group, we need to adju
118118
))
119119
```
120120

121-
Previously, finding the required sample size took `r nrow(N_ss$table.iter)` iterations. With the fast optimizer, the number of iterations is reduced to `r nrow(N_ss_dropout$table.iter)`, significantly improving efficiency.
121+
Previously, finding the required sample size took `r nrow(N_ss$table.iter)` iterations. With the custom optimization routine, the number of iterations was reduced to `r nrow(N_ss_dropout$table.iter)`, significantly improving efficiency.
122122

123123

0 commit comments

Comments
 (0)