power.TOST.sds: Power calculation of the BE decision with models...

View source: R/power_TOST_sds.R

power.TOST.sdsR Documentation

Power calculation of the BE decision with models incorporating groups

Description

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

Usage

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)

Arguments

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.
Defaults to 0.95 if not given explicitly.

CV

Intra-subject coefficient(s) of variation as ratio (not percent).

  • If given as a scalar (length(CV)==1) the same CV of Test and Reference is assumed (homoscedasticity, CVwT==CVwR).

  • If given as a vector (length(CV)==2), i.e., assuming heteroscedasticity, the CV of the Test must be given in CV[1] and the one of the Reference in the CV[2].

n

Number of subjects under study.
May be given as vector. In that case it is assumed that n contains the number of subjects in the sequence groups.
If n is given as single number (total sample size) and this number is not divisible by the number of sequences of the design an unbalanced design is assumed. A corresponding message is thrown showing the numbers of subjects in sequence groups.
Attention! In case of the "2x2x3" (TRT|RTR) design the order of sample sizes is important if given as vector. n[1] is for sequence group 'TRT' and n[2] is for sequence group 'RTR'.

design

Design of the study to be planned.
"2x2" or "2x2x2" is the conventional cross-over design.
"2x3x3" is the partial replicate design (TRR|RTR|RRT).
"2x2x4" is the full replicate design with 2 sequences and 4 periods.
"2x2x3" is the 3-period design with sequences TRT|RTR.
Defaults to design="2x2".

design_dta

Alternatively to using the arguments design and n the design may be defined via a data.frame with columns subject, sequence, period and tmt. This feature is experimental in the sense that the data.frame is not checked for complying with the assumed structure.
If you use the argument design_dta you don't need to specify the arguments design and n.
The default design_dta = NULL means that design and n are used for the internal construction of the design data.frame.

grps

Number of (logistical) groups. Defaults to 2.

ngrp

Vector of number of subjects in groups.

gmodel

Number describing the model incorporating group effects

  • 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

Defaults to gmodel=2.

p.level

Significance level of the test of a group-by-treatment interaction. Defaults to p.level=0.1.

nsims

Number of simulations to be performed to obtain the empirical power. Defaults to 100,000 = 1e+05.
If simulations are aimed for empirical alpha nsims=1e+06 is recommended.

details

If set to TRUE the computational time is shown.

setseed

Simulations are dependent on the starting point of the (pseudo) random number generator. To avoid differences in power for different runs a set.seed(123456) is issued if setseed=TRUE, the default.

progress

Should a progressbar be shown? Defaults to TRUE if missing and nsims >5E5.

Details

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.

Value

Returns the value of the (empirical) power

Note

The run time of the function may be relatively long.
Take a cup of coffee and be patient.

Author(s)

D. Labes

References

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

Examples

# 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

PowerTOST documentation built on May 29, 2024, 4:40 a.m.