Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

Calculates the necessary sample size to have at least a given power.

1 2 3 |

`alpha` |
Significance level (one-sided). Commonly set to 0.05. |

`targetpower` |
Power to achieve at least. Must be >0 and <1. |

`logscale` |
Should the data used on log-transformed ( |

`theta0` |
‘True’ or assumed T/R ratio or difference. |

`theta1` |
Lower (bio-)equivalence limit. |

`theta2` |
Upper (bio-)equivalence limit. |

`CV` |
In case of In case of cross-over studies this is the within-subject CV, in case of a parallel-group design the CV of the total variability. |

`design` |
Character string describing the study design. |

`method` |
Method for calculation of the power. |

`robust` |
Defaults to |

`print` |
If |

`details` |
If |

`imax` |
Maximum number of steps in sample size search. |

The sample size is calculated via iterative evaluation of power of the TOST procedure.

Start value for the sample size search is taken from a large sample approximation
according to Zhang, modified.

The sample size is bound to 4 as minimum.

The estimated sample size gives always the *total* number of subjects (not subject/sequence in crossovers or subjects/group in parallel designs – like in some other software packages).

A data.frame with the input and results will be returned.

The `Sample size`

column contains the total sample size.

The function does not vectorize properly.

If you need sample sizes with varying CVs, use f.i. for-loops or the apply-family.

Of course it is highly recommended to use the default `method="exact"`

. :-)

There is no reason besides testing and for comparative purposes to use an
approximation if the exact method is available at no extra costs.

D. Labes

Phillips KF. *Power of the Two One-Sided Tests Procedure in Bioequivalence.* J Pharmacokin Biopharm. 1990;18:137–44. doi: 10.1007/BF01063556

Diletti D, Hauschke D, Steinijans VW. *Sample Size Determination for Bioequivalence Assessment by Means of Confidence Intervals.* Int J Clin Pharmacol Ther Toxicol. 1991;29(1):1–8.

Diletti D, Hauschke D, Steinijans VW. *Sample size determination: Extended tables for the multiplicative model and bioequivalence ranges of 0.9 to 1.11 and 0.7 to 1.43.* Int J Clin Pharmacol Ther Toxicol. 1992;30(Suppl 1):S59–62.

Zhang P. *A Simple Formula for Sample Size Calculation in Equivalence Studies.* J Biopharm Stat. 2003;13(3):529–538. doi: 10.1081/BIP-120022772

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
# Exact calculation for a classical 2x2 cross-over (TR/RT),
# BE limits 80 ... 125%, assumed true BE ratio 0.95, intra-subject CV=30%,
# using all the default values
# should give n=40 power=0.815845
sampleN.TOST(CV = 0.3)
# Exact calculation for a parallel group design
# evaluation on the original (untransformed) scale
# BE limits 80 ... 120% = -20% ... +20% of reference,
# assumed true BE ratio 0.95% = -5% to reference mean,
# total CV=20%
# should give n=48 (total) power=0.815435
sampleN.TOST(logscale = FALSE, theta1 = -0.2, theta0 = -0.05,
CV = 0.2, design = "parallel")
# A rather strange setting of theta0! Have a look at n.
# It would be better this is not the sample size but the running total
# of my bank account. But the first million is the hardest. ;-)
sampleN.TOST(CV = 0.2, theta0 = 0.8005, theta1 = 0.8)
``` |

```
+++++++++++ Equivalence test - TOST +++++++++++
Sample size estimation
-----------------------------------------------
Study design: 2x2 crossover
log-transformed data (multiplicative model)
alpha = 0.05, target power = 0.8
BE margins = 0.8 ... 1.25
True ratio = 0.95, CV = 0.3
Sample size (total)
n power
40 0.815845
+++++++++++ Equivalence test - TOST +++++++++++
Sample size estimation
-----------------------------------------------
Study design: 2 parallel groups
untransformed data (additive model)
alpha = 0.05, target power = 0.8
BE margins = -0.2 ... 0.2
True diff. = -0.05, CV = 0.2
Sample size (total)
n power
48 0.815435
+++++++++++ Equivalence test - TOST +++++++++++
Sample size estimation
-----------------------------------------------
Study design: 2x2 crossover
log-transformed data (multiplicative model)
alpha = 0.05, target power = 0.8
BE margins = 0.8 ... 1.25
True ratio = 0.8005, CV = 0.2
Sample size (total)
n power
1242296 0.800000
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.