View source: R/power_TOST_sds.R
power.TOST.sds | R Documentation |
The power is obtained via subject data simulations.
Three models are implemented:
gmodel==1 is full FDA model for testing group-by-treatment interaction followed by gmodel==2 or gmodel==3 with data of the biggest group depending on the test of the treatment by group interaction
gmodel==2 is full FDA model but without group-by-treatment interaction
gmodel==3 is model with pooled groups, i.e. without any group term
power.TOST.sds(alpha = 0.05, theta1, theta2, theta0, CV, n,
design = c("2x2", "2x2x2", "2x3x3", "2x2x4", "2x2x3"),
design_dta = NULL, grps = 2, ngrp = NULL, gmodel = 2, p.level=0.1,
nsims = 1e+05, details = FALSE, setseed = TRUE, progress)
alpha |
Type I error probability, significance level. Conventionally mostly set to 0.05. |
theta1 |
Lower BE limit. Defaults to 0.8 if not given explicitely. |
theta2 |
Upper BE limit. Defaults to 1.25 if not given explicitely. |
theta0 |
‘True’ or assumed T/R ratio. |
CV |
Intra-subject coefficient(s) of variation as ratio (not percent).
|
n |
Number of subjects under study. |
design |
Design of the study to be planned. |
design_dta |
Alternatively to using the arguments |
grps |
Number of (logistical) groups. Defaults to 2. |
ngrp |
Vector of number of subjects in groups. |
gmodel |
Number describing the model incorporating group effects
Defaults to |
p.level |
Significance level of the test of a group-by-treatment interaction.
Defaults to |
nsims |
Number of simulations to be performed to obtain the empirical power.
Defaults to 100,000 = 1e+05. |
details |
If set to |
setseed |
Simulations are dependent on the starting point of the (pseudo) random number
generator. To avoid differences in power for different runs a |
progress |
Should a progressbar be shown? Defaults to |
The power is calculated via subject data sims.
The evaluation of BE is done via 1-2*alpha confidence interval using classical ANOVA
for the models with group effects.
The data.frame with columns subject, sequence, period
and tmt
necessary for evaluation of simulated subject data is constructed internally from
the arguments design
and n
or may be given user defined via the argument
design_dta
. The last option is usefull if missing data have to be considered
or if designs have to be evaluated which are not in the list of argument
design
.
This feature is experimental in the sense that the data.frame is not checked
for complying with the assumed structure.
The p.value of the test of the group-by-treatment interaction in case of gmodel=1
defaults to p.level = 0.1
, the value originally used by the FDA. Later on a value of
p.level = 0.05
was used.
If the group-by-treatment interaction is significant the subsequent BE decision is done with the data of the largest group. If there are more than one with the same size, one gets a warning that this feature – showing BE in all that groups – is not implemented yet. Only the first of the largest groups is tested for BE.
Returns the value of the (empirical) power
The run time of the function may be relatively long.
Take a cup of coffee and be patient.
D. Labes
Schütz H.
Multi-Group Studies in Bioequivalence. To pool or not to pool?
Presentation at BioBriges 2018, Prague. https://bebac.at/lectures/Prague2018.pdf
# power for gmodel=2, 2x2 crossover, grps=3 with even number of subjects
power.TOST.sds(CV=0.2, n=18, grps=3)
# gives [1] 0.78404
# without considering groups
power.TOST.sds(CV=0.2, n=18, gmodel=3)
# gives [1] 0.7887
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.