Skip to content

Commit ae76632

Browse files
committed
Fix example in vignette Multiple Correlated Co-Primary Endpoints
1 parent d81f502 commit ae76632

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

vignettes/sampleSize_crossover.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Bioequivalence Tests in a 2x2 Cross-Over Design"
2+
title: "Bioequivalence Tests for 2x2 Cross-Over Trial Designs with Log-Normal Data"
33
author: "Thomas Debray"
44
date: "`r format(Sys.time(), '%B %d, %Y')`"
55
output:
@@ -8,7 +8,7 @@ output:
88
fig_width: 9
99
fig_height: 6
1010
vignette: >
11-
%\VignetteIndexEntry{Bioequivalence Tests in a 2x2 Cross-Over Design}
11+
%\VignetteIndexEntry{Bioequivalence Tests for 2x2 Cross-Over Trial Designs with Log-Normal Data}
1212
%\VignetteEngine{knitr::rmarkdown}
1313
%\VignetteEncoding{UTF-8}
1414
bibliography: 'references.bib'
@@ -29,7 +29,7 @@ In the examples below, we illustrate the use of `SimTOST` for 2x2 cross-over tri
2929
library(SimTOST)
3030
```
3131

32-
# Bioequivalence Tests for AUC and Cmax (Log-Normal Data)
32+
# Bioequivalence Tests for AUC and Cmax
3333
In the first example, we consider Example 1 from the PASS Sample Size Software [Chapter 351](https://www.ncss.com/wp-content/themes/ncss/pdf/Procedures/PASS/Bioequivalence_Tests_for_AUC_and_Cmax_in_a_2x2_Cross-Over_Design-Log-Normal_Data.pdf). We aim to estimate the sample size required to demonstrate bioequivalence between a test and reference product for two pharmacokinetic parameters: the area under the curve (AUC) and the maximum concentration (Cmax). We assume a 2x2 cross-over design. The true ratio of the test to the reference product is assumed to be 1.02 for AUC and 1.03 for Cmax. Based on previous experiments, it is assumed that the standard deviation for $\log(AUC)$ = 0.25 and the standard deviation for $\log(Cmax = 0.3)$. The equivalence limits for the means ratio are set at 0.80 and 1.25.
3434

3535
The significance level is set to 5\%, and the sample size is calculated to achieve 80\% power. Additionally, the correlation between AUC and Cmax is assumed to be 0.25. A difference-of-means test on the log scale is employed to determine bioequivalence. In the PASS software, this scenario yielded a total sample size of $n=37$ patients. In **SimTOST**, we can estimate the sample size using the [sampleSize()](../reference/sampleSize.html) function.

vignettes/sampleSize_parallel.Rmd

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Bioequivalence Tests in a Parallel Trial Design"
2+
title: "Bioequivalence Tests for Parallel Trial Designs with Log-Normal Data"
33
author: "Thomas Debray"
44
date: "`r format(Sys.time(), '%B %d, %Y')`"
55
output:
@@ -8,7 +8,7 @@ output:
88
fig_width: 9
99
fig_height: 6
1010
vignette: >
11-
%\VignetteIndexEntry{Bioequivalence Tests in a Parallel Trial Design}
11+
%\VignetteIndexEntry{Bioequivalence Tests for Parallel Trial Designs with Log-Normal Data}
1212
%\VignetteEngine{knitr::rmarkdown}
1313
%\VignetteEncoding{UTF-8}
1414
bibliography: 'references.bib'
@@ -22,8 +22,7 @@ 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-
26-
In the examples below, we demonstrate the use of **SimTOST** for parallel trial designs. To begin, we first load the package.
25+
In the following examples, we demonstrate the use of **SimTOST** for parallel trial designs with data assumed to follow a normal distribution on the log scale. We start by loading the package.
2726

2827
```{r, echo = T, message=F}
2928
library(SimTOST)
@@ -78,7 +77,7 @@ In the first approach, we calculate the required sample size for 80% power using
7877

7978
```{r, eval = TRUE}
8079
ssMielke <- sampleSize_Mielke(power = 0.8, Nmax = 1000, m = 5, k = 5, rho = 0.8,
81-
sigma = 0.3, true.diff = log(1.05),
80+
sigma = 0.3, true.diff = log(1.05),
8281
equi.tol = log(1.25), design = "parallel",
8382
alpha = 0.05, adjust = "no", seed = 1234,
8483
nsim = 10000)
@@ -90,11 +89,11 @@ For 80\% power, `r ssMielke["SS"]` subjects per sequence (`r ssMielke["SS"] * 2`
9089
Alternatively, the sample size calculation can be performed using the [sampleSize()](../reference/sampleSize.html) function. This method assumes that effect sizes are normally distributed on the log scale and uses a difference-of-means test (`ctype = "DOM"`) with user-specified values for `mu_list`, `sigma_list`, and the correlation `rho`.
9190

9291
```{r}
93-
mu_r <- c(AUC = log(1.00), Cmax = log(1.00))
94-
mu_t <- c(AUC = log(1.02), Cmax = log(1.03))
95-
sigma <- c(AUC = 0.25, Cmax = 0.3)
96-
lequi_lower <- c(AUC = log(0.80), Cmax = log(0.80))
97-
lequi_upper <- c(AUC = log(1.25), Cmax = log(1.25))
92+
mu_r <- setNames(rep(log(1.00), 5), paste0("y", 1:5))
93+
mu_t <- setNames(rep(log(1.05), 5), paste0("y", 1:5))
94+
sigma <- setNames(rep(0.3, 5), paste0("y", 1:5))
95+
lequi_lower <- setNames(rep(log(0.8), 5), paste0("y", 1:5))
96+
lequi_upper <- setNames(rep(log(1.25), 5), paste0("y", 1:5))
9897
9998
ss <- sampleSize(power = 0.8, alpha = 0.05,
10099
mu_list = list("R" = mu_r, "T" = mu_t),

0 commit comments

Comments
 (0)