Skip to content

Commit 866d3f0

Browse files
committed
Update vignette explanations and references
1 parent 8045403 commit 866d3f0

7 files changed

Lines changed: 171 additions & 57 deletions

File tree

‎vignettes/continuous_crossover.Rmd‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ doc.cache <- T #for cran; change to F
1818
```
1919

2020

21-
In the example below, we illustrate the use of `SimTOST` for 2x2 cross-over trials. As a first step, we load the package.
21+
In the example below, we illustrate the use of `SimTOST` for 2x2 crossover
22+
trials. This randomized two-period, two-sequence design and its standard
23+
subject/period/treatment model are described by Chow and Liu
24+
[@chow_liu_bioequivalence_2008]. The design is also used in bioequivalence
25+
studies [@CHMP2010]. As a first step, we load the package.
2226

2327
```{r, echo = T, message=F}
2428
library(SimTOST)

‎vignettes/count.Rmd‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ approximately `2 + 0.50 * 2^2 = 4`. Larger dispersion means more variation
8585
between participants and usually less information per participant, which can
8686
increase the required sample size. The dispersion should be chosen from pilot
8787
data or prior knowledge and examined in a sensitivity analysis; it is not a
88-
replacement for the event rate or the exposure.
88+
replacement for the event rate or the exposure. Poisson and negative-binomial
89+
rate equivalence planning is described by Chang et al. and Zhu
90+
[@chang_sample_2017; @zhu_sample_2017].
8991

9092
The remaining planning inputs have the same meaning as for continuous
9193
outcomes: `power`, `alpha`, `nsim`, `seed`, and `dtype` specify the target
@@ -132,7 +134,8 @@ discrete event totals and reports a finite-sample Monte Carlo estimate.
132134
For this example, we utilize a two-endpoint, two-comparator count outcome
133135
study, which will serve as the foundation for the remainder of this vignette.
134136
The supplied endpoint correlation is a latent Gaussian-copula
135-
correlation, not the expected Pearson correlation of the observed counts.
137+
correlation, not the expected Pearson correlation of the observed counts
138+
[@nelsen2006].
136139

137140
```{r poisson-inputs}
138141
count_corr <- matrix(c(1, 0.5, 0.5, 1), nrow = 2,
@@ -182,7 +185,8 @@ The empirical rate distributions should be centered near the values in
182185
plot_distribution(poisson_diagnostic, estimand = "correlation",
183186
arms = c("TEST", "REF"))
184187
```
185-
The dashed line is the latent correlation supplied through `count_corr`. The
188+
The dashed line is the latent correlation supplied through `count_corr`
189+
[@nelsen2006]. The
186190
observed Pearson correlation can differ because the latent normal variables
187191
are transformed into discrete counts. The plot checks the direction and
188192
approximate magnitude of the generated dependence; `endpoint_corr` is the
@@ -315,4 +319,3 @@ settings but evaluates paired treatment-period data. The values above are
315319
illustrative; in an actual study, `sigmaB`, period effects, carry-over effects,
316320
and sequence-specific dropout should be justified from prior data or a
317321
sensitivity analysis.
318-

‎vignettes/count_parallel_3A3E.Rmd‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Mielke's strong k-out-of-m (`adjust = "t"`), or Šidák adjustment
3434
to the endpoint-wise one-sided significance level.
3535

3636
The joint count kernel can also simulate correlated endpoints through
37-
the `cor_mat` argument.
37+
the `cor_mat` argument. This dependence is generated with a Gaussian-copula
38+
construction [@nelsen2006].
3839

3940
## Study assumptions
4041

@@ -66,6 +67,8 @@ exposure <- 5
6667
The rate-ratio equivalence interval is 0.80 to 1.25. We use a Poisson model
6768
for the primary example and a one-sided significance level of 0.05 for each
6869
TOST component.
70+
The Poisson and negative-binomial planning framework follows published
71+
count-outcome equivalence methods [@chang_sample_2017; @zhu_sample_2017].
6972

7073
## Power for a fixed sample size
7174

@@ -246,8 +249,8 @@ joint_sample_size
246249
For a three-arm allocation, the reported total is three times the selected
247250
number per arm. Both comparison families share the simulated test-arm counts,
248251
and the endpoint correlation is generated through a Gaussian-copula count
249-
model. This is therefore a joint count simulation rather than a maximum of
250-
separate comparison-specific searches.
252+
model [@nelsen2006]. This is therefore a joint count simulation rather than a
253+
maximum of separate comparison-specific searches.
251254

252255
## Why joint planning is important
253256

‎vignettes/intropkg.Rmd‎

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ and
3838
$$H_{02}: \mu_T - \mu_R \geq U
3939
\qquad\text{versus}\qquad
4040
H_{12}: \mu_T - \mu_R < U.$$
41+
The TOST formulation follows the standard equivalence-testing framework
42+
[@sozu_sample_2015; @schuirmann_comparison_1987].
4143

4244
Equivalence is established if and only if both $H_{01}$ and $H_{02}$ are
4345
rejected at the chosen significance level $\alpha$. Equivalently, the
@@ -63,6 +65,10 @@ For pharmacokinetic (PK) outcomes, such as the area under the curve (AUC) and ma
6365
\text{Logarithmic Variance} = \log\left(1 + {\text{CV}^2}\right)
6466
\]
6567

68+
The use of the logarithmic scale for bioequivalence analysis is described in
69+
standard sample-size and regulatory guidance [@sozu_sample_2015; @CHMP2010].
70+
The equation itself follows from the definition of a log-normal distribution.
71+
6672
Equivalence limits must also be specified on the log scale to align with the transformed data.
6773

6874

@@ -79,6 +85,8 @@ and
7985
$$H_{02}: \frac{\mu_T}{\mu_R} \geq U
8086
\qquad\text{versus}\qquad
8187
H_{12}: \frac{\mu_T}{\mu_R} < U.$$
88+
The ratio formulation is the corresponding TOST on the ratio-of-means scale
89+
[@sozu_sample_2015; @schuirmann_comparison_1987].
8290

8391
Thus, equivalence requires rejection of both $H_{01}$ and $H_{02}$, or
8492
equivalently:
@@ -105,16 +113,16 @@ $$
105113
The logarithmic mean is then calculated as:
106114

107115
$$\text{Logarithmic Mean} = \log(\text{Arithmetic Mean}) - \frac{1}{2}(\text{Logarithmic Variance})$$
108-
116+
These transformations use the standard log-normal parameterization.
109117
## Count outcomes: event-rate ratio (RR)
110118

111119
For count outcomes, such as the number of events observed during a specified
112120
exposure period, SimTOST uses the event-rate ratio rather than the continuous
113121
outcome ratio of means. The event-rate ratio is
114122

115123
$$RR = \frac{\lambda_T}{\lambda_R},$$
116-
117-
where $\lambda_T$ and $\lambda_R$ are the event rates in the test and
124+
The event-rate ratio is the estimand used for count-outcome equivalence
125+
comparisons [@chang_sample_2017; @zhu_sample_2017], where $\lambda_T$ and $\lambda_R$ are the event rates in the test and
118126
reference groups. For lower and upper rate-ratio limits $L$ and $U$, the
119127
hypotheses are:
120128

@@ -158,7 +166,9 @@ counts. The resulting Pearson correlation between the observed discrete
158166
counts is generally different and depends on the marginal count
159167
distributions. For normally distributed continuous outcomes, the latent
160168
correlation and Pearson correlation coincide because the transformation is
161-
linear [@chang_sample_2017].
169+
linear. This follows directly from the definition of Pearson correlation: a
170+
common linear transformation preserves the correlation, apart from a possible
171+
change in sign if the transformation reverses orientation.
162172

163173
## Regulatory requirements
164174
When evaluating bioequivalence, certain statistical and methodological requirements must be adhered to, as outlined in the European Medicines Agency's bioequivalence guidelines [@CHMP2010]. These requirements ensure that the test and reference products meet predefined criteria for equivalence in terms of PK parameters. The key considerations are summarized below:
@@ -185,7 +195,7 @@ A decision must be made as to whether it is desirable to
185195

186196
## Testing multiple co-primary endpoints
187197

188-
When a trial defines multiple co-primary endpoints, equivalence must be demonstrated for all of them to claim overall treatment equivalence. In this setting, each endpoint is tested separately at the usual significance level ($\alpha$), and equivalence is established only if all individual tests are statistically significant. Because conclusions require rejecting all null hypotheses, a formal multiplicity adjustment is not needed to control the Type I error rate. [@cpmp_points_2002] However, as the number of co-primary endpoints ($K$) increases, the likelihood of failing to meet equivalence on at least one endpoint also rises, resulting in a higher Type II error rate (i.e., a greater risk of incorrectly concluding non-equivalence) [@mielke_sample_2018]
198+
When a trial defines multiple co-primary endpoints, equivalence must be demonstrated for all of them to claim overall treatment equivalence. In this setting, each endpoint is tested separately at the usual significance level ($\alpha$), and equivalence is established only if all individual tests are statistically significant. Because conclusions require rejecting all null hypotheses, the decision is an intersection--union test and a formal endpoint-wise multiplicity adjustment is not needed to control the Type I error rate [@berger1996; @hamasaki_coprimary_2018]. However, as the number of co-primary endpoints ($K$) increases, the likelihood of failing to meet equivalence on at least one endpoint also rises, resulting in a higher Type II error rate (i.e., a greater risk of incorrectly concluding non-equivalence) [@mielke_sample_2018]
189199

190200
This has several important implications:
191201

@@ -197,43 +207,51 @@ This has several important implications:
197207

198208
## Testing multiple primary endpoints {#multiple-primary}
199209

200-
When a trial aims to establish equivalence for at least $k$ primary endpoints, adjustments are necessary to account for the increased risk of Type I error due to multiple hypothesis testing [@sozu_continuous_2015]. Without such adjustments, the likelihood of incorrectly concluding equivalence for at least one endpoint increases as the number of endpoints grows.
210+
When a trial aims to establish equivalence for at least $k$ of $m$ primary
211+
endpoints, the decision is a partial-conjunction test. When $k < m$, an
212+
endpoint-wise adjustment is generally needed to control the Type I error across
213+
the possible successful endpoint subsets [@benjamini2008; @mielke_sample_2018].
214+
The appropriate adjustment depends on the prespecified $k$-out-of-$m$ rule.
201215

202216
For example, if a study includes $m = 3$ independent primary endpoints and uses a significance level of $\alpha = 5%$ for each test, the overall probability of falsely concluding equivalence for at least one endpoint is:
203217

204218
$$ 1 – (1-\alpha)^m = 1 - (1-0.05)^3 = 0.1426. $$
219+
This is the probability of at least one false rejection under independent
220+
tests [@dunn1961; @sidak1967].
205221
This means that the overall probability of making any false positive error, also known as the **family-wise error rate (FWER)**, increases to approximately 14%.
206222

207223
To address this issue, adjustments to the significance level are necessary for multiple endpoint comparisons for which various methods have been proposed. In SimTOST, the following approaches are included:
208224

209225
### Bonferroni correction
210-
The most common and easiest procedure for multiplicity adjustment to control the FWER is the Bonferroni method. Each hypothesis is tested at level
226+
The most common and easiest procedure for multiplicity adjustment to control the FWER is the Bonferroni method [@bonferroni1936]. Each hypothesis is tested at level
211227

212228
$$\alpha_{bon}= \alpha/m$$
213229

230+
214231
where $m$ is the total number of tests. Although simple, this method is highly conservative, particularly when tests are correlated, as it assumes all tests are independent. This conservativeness remains pronounced even for $k=1$, where only one of the $m$ hypotheses needs to be rejected. [@mielke_sample_2018]
215232

216233
In the [sampleSize()](../reference/sampleSize.html) function, the Bonferroni correction can be applied by setting `adjust = "bon"`.
217234

218235
### Sidak correction
219236

220-
The Sidak correction is an alternative method for controlling the FWER. Like the Bonferroni correction, it assumes that tests are independent. However, the Sidak correction accounts for the joint probability of all tests being non-significant, making it mathematically less conservative than the Bonferroni method. The adjusted significance level is calculated as:
237+
The Sidak correction [@sidak1967] is an alternative method for controlling the FWER. Like the Bonferroni correction, it assumes that tests are independent. However, the Sidak correction accounts for the joint probability of all tests being non-significant, making it mathematically less conservative than the Bonferroni method. The adjusted significance level is calculated as:
221238

222239
$$\alpha_{sid}= 1-(1-\alpha)^ {1/m}$$
223240

241+
224242
The Sidak correction can be implemented by specifying `adjust = "sid"` in the [sampleSize()](../reference/sampleSize.html) function.
225243

226-
### K adjustment
244+
### K adjustment: Mielke's weak k-out-of-m correction
227245

228-
This correction explicitly accounts for the scenario where equivalence is required for only $k$ out of $m$ endpoints. Unlike the Bonferroni and Sidak corrections, which assume that all $m$ tests contribute equally to the overall Type I error rate, the *k*-adjustment directly incorporates the number of endpoints ($k$) required for equivalence into the adjustment. The adjusted significance level is calculated as:
246+
The K adjustment [@mielke_sample_2018] explicitly accounts for the scenario where equivalence is required for only $k$ out of $m$ endpoints. Unlike the Bonferroni and Sidak corrections, which assume that all $m$ tests contribute equally to the overall Type I error rate, the *k*-adjustment directly incorporates the number of endpoints ($k$) required for equivalence into the adjustment. The adjusted significance level is calculated as:
229247

230248
$$\alpha_k= \frac{k*\alpha}{m}$$
231249

232250
where $k$ is the number of endpoints required for equivalence, and $m$ is the total number of endpoints evaluated.
233251

234252
### T adjustment: Mielke's strong k-out-of-m correction
235253

236-
The `t` adjustment described below is the strong k-out-of-m procedure for
254+
The `t` adjustment [@mielke_sample_2018] described below is the strong k-out-of-m procedure for
237255
partial-conjunction decisions and is distinct from the weak `k` adjustment.
238256

239257
When the decision rule requires equivalence for at least `k` of `m` endpoints,
@@ -245,8 +263,7 @@ $$\alpha_{t}= \frac{\alpha}{m-k+1}$$
245263

246264
where `m` is the number of selected endpoints and `k` is the minimum number
247265
that must demonstrate equivalence. This adjustment controls
248-
the Type I error rate for the partial-conjunction decision, including cases in
249-
which only some endpoints satisfy the null hypothesis [@mielke_sample_2018].
266+
the Type I error rate for the partial-conjunction decision, including cases in which only some endpoints satisfy the null hypothesis [@mielke_sample_2018].
250267

251268
## Hierarchical testing of multiple endpoints
252269
Hierarchical testing is an approach to multiple endpoint testing where endpoints are tested in a predefined order, typically based on their clinical or regulatory importance. A fallback testing strategy is applied, allowing sequential hypothesis testing. If a hypothesis earlier in the sequence fails to be rejected, testing stops, and subsequent hypotheses are not evaluated. [@chowdhry_finding_2024]

‎vignettes/methodological_assumptions.Rmd‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: "Methodological Assumptions in SimTOST"
33
output: rmarkdown::html_vignette
4+
bibliography: 'references.bib'
5+
link-citations: yes
46
vignette: >
57
%\VignetteIndexEntry{Methodological Assumptions in SimTOST}
68
%\VignetteEngine{knitr::rmarkdown}
@@ -203,13 +205,14 @@ latent correlation.
203205

204206
For endpoints \(j=1,\ldots,m\), the user-supplied matrix
205207
\(\boldsymbol{R}=\texttt{cor\_mat}\) is the correlation matrix of a latent
206-
standard-normal vector
208+
standard-normal vector using a Gaussian-copula construction [@nelsen2006]:
207209

208210
\[
209211
\boldsymbol{Z}_a \sim N_m(\boldsymbol{0},\boldsymbol{R})
210212
\]
211213

212-
for arm \(a\). Each component is transformed as
214+
for arm \(a\). Each component is then transformed using the probability
215+
integral transform and the inverse marginal distribution function:
213216

214217
\[
215218
U_{aj}=\Phi(Z_{aj}), \qquad
@@ -220,7 +223,8 @@ where \(F_{aj}\) is the specified Poisson or negative-binomial marginal
220223
distribution. Thus, `cor_mat[1, 2] = 0.8` means that endpoints 1 and 2 have
221224
latent Gaussian correlation 0.8 before they are transformed into counts. It
222225
does not mean that their observed event counts will have Pearson correlation
223-
0.8.
226+
0.8. This Gaussian-copula construction is a standard way to generate
227+
dependent non-normal outcomes.
224228

225229
The matrix has the following interpretation:
226230

@@ -266,7 +270,11 @@ For continuous outcomes, `dtype = "2x2"` represents a balanced two-sequence,
266270
two-period crossover. The two treatment sequences are reference--test (RT)
267271
and test--reference (TR), and `n` is interpreted as the number of subjects per
268272
sequence before dropout. On the analysis scale, the data-generating model can
269-
be written for subject i, period p, and endpoint j as
273+
be written for subject i, period p, and endpoint j as follows. The two-period,
274+
two-sequence design and log-scale bioequivalence analysis are consistent with
275+
regulatory bioequivalence guidance. The subject, period, treatment,
276+
sequence, and carry-over components follow the standard AB/BA formulation
277+
described by Chow and Liu [@chow_liu_bioequivalence_2008].
270278

271279
\[
272280
Y_{ipj} = \mu_{a(i,p),j} + E_p + C_{a(i,p),s(i)} + b_i +
@@ -332,7 +340,9 @@ where `cor_mat` is used as a latent Gaussian-copula correlation.
332340
For a 2x2 crossover design, the count extension uses a paired log-link rate
333341
analysis. Each complete participant contributes one count under the test
334342
treatment and one count under the reference treatment. The count-generating
335-
model is, conditionally on the subject effect,
343+
model is, conditionally on the subject effect. The rate-ratio estimand and
344+
Poisson/negative-binomial framework is supported by published count-outcome
345+
equivalence methods [@chang_sample_2017; @zhu_sample_2017].
336346

337347
\[
338348
Y_{isp} \sim \begin{cases}
@@ -354,7 +364,9 @@ period effects, `Eco = c(C_R,C_T)` contains reference- and treatment-
354364
carry-over effects, and `sigmaB` is the standard deviation of the subject
355365
random intercept on the log-rate scale. The negative-binomial dispersion is
356366
used in the subject-period count generation through the package's
357-
size-parameter convention \(\operatorname{size}=1/\phi\).
367+
size-parameter convention \(\operatorname{size}=1/\phi\). This is the
368+
standard mean--dispersion parameterization used for planning negative-binomial
369+
rate comparisons.
358370

359371
The analysis forms a log-rate contrast within each complete participant,
360372
averages the contrasts within each sequence, and then averages the two

0 commit comments

Comments
 (0)