Package 'BE'

Title: Bioequivalence Study Data Analysis
Description: Analyze bioequivalence study data with industrial strength. Sample size could be determined for various crossover designs, such as 2x2 design, 2x4 design, 4x4 design, Balaam design, Two-sequence dual design, and William design. Reference: Chow SC, Liu JP. Design and Analysis of Bioavailability and Bioequivalence Studies. 3rd ed. (2009, ISBN:978-1-58488-668-6).
Authors: Kyun-Seop Bae [aut]
Maintainer: Kyun-Seop Bae <[email protected]>
License: GPL-3
Version: 0.2.4
Built: 2024-12-18 06:27:40 UTC
Source: CRAN

Help Index


Bioequivalence Study Data Analysis

Description

Analyze bioequivalence study data with industrial strength. Sample size could be determined for various crossover designs, such as 2x2 design, 2x4 design, 4x4 design, Balaam design, Two-sequence dual design, and William design. Basic assumption is that the variable is distributed as a log-normal distribution. This is SAS PROC GLM style. If you want PROC MIXED style, use nlme::lme.

Details

It performs bioequivalency tests for several variables of a 2x2 study in a data file.

Author(s)

Kyun-Seop Bae <[email protected]>

References

  1. Chow SC, Liu JP. Design and Analysis of Bioavailability and Bioequivalence Studies. 3rd ed. (2009, ISBN:978-1-58488-668-6)

  2. Hauschke D, Steinijans V, Pigeot I. Bioequivalence Studies in Drug Development. (2007, ISBN:978-0-470-09475-4)

  3. Diletti E, Hauschke D, Steinijans VW. Sample size determination for bioequivalence assessment by means of confidence intervals. Int J Clinical Pharmacol Ther Tox. 1991;29(1):1-8

Examples

# write.csv(NCAResult4BE, "temp.csv", quote=FALSE, row.names=FALSE)
# be2x2("temp.csv", c("AUClast", "Cmax", "Tmax"))

Bioequivalence test of a 2x2 study

Description

It performs conventional bioequivalence test for 2x2 study. Input is a file. Basic assumption is that the variable is distributed as a log-normal distribution. This is SAS PROC GLM style. If you want PROC MIXED style, use nlme::lme.

Usage

be2x2(Data, Columns = c("AUClast", "Cmax", "Tmax"), rtfName="")

Arguments

Data

A data.frame or a csv file name. This should have at least the following columns and variable column(s) to be tested. AUC and Cmax should be all positive values.

  
 GRP : Group or Sequence, 'RT' or 'TR'
 PRD : Period, 1 or 2
 SUBJ : Subject ID
 TRT : Treatment or Drug, 'R' or 'T'
Columns

Column names of variables to be tested. This is usaully c("AUClast", "Cmax", "Tmax") or c("AUClast", "AUCinf", "Cmax", "Tmax")

rtfName

Output filename of rich text format(rtf)

Details

It performs bioequivalency tests for several variables of a 2x2 study in a data file. If you specify output filename in rtfName, the output will be saved in the file.

Value

Returns text output of equivalence test result.

Author(s)

Kyun-Seop Bae <[email protected]>

See Also

test2x2, plot2x2

Examples

be2x2(NCAResult4BE, c("AUClast", "Cmax", "Tmax"))

Coefficient of variation (CV) from a confidence interval of previous 2x2 study

Description

It calculates coefficient of variation (CV) from a confidence interval of previous 2x2 study.

Usage

ci2cv(n1, n2, LL, UL, Alpha = 0.1)

Arguments

n1

Subject count of group 1

n2

Subject count of group 2

LL

Lower limit of the confidence interval of geometric mean ratio (Test/Reference)

UL

Upper limit of the confidence interval of geometric mean ratio (Test/Reference)

Alpha

Alpha level. This means (1 - alpha/2)*100 % confidence interval is given

Details

It calculates coefficient of variation (CV) from a confidence interval of 2x2 bioequivalence study.

Value

Returns coefficient of variation (CV) in percent (%).

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

ci2cv(12, 13, 0.85, 1.11)

Mean squared error (MSE) from a confidence interval of previous 2x2 study

Description

It calculates mean squared error (MSE) from a confidence interval of previous 2x2 study.

Usage

ci2mse(n1, n2, LL, UL, Alpha = 0.1)

Arguments

n1

Subject count of group 1

n2

Subject count of group 2

LL

Lower limit of the confidence interval of geometric mean ratio (Test/Reference)

UL

Upper limit of the confidence interval of geometric mean ratio (Test/Reference)

Alpha

Alpha level. This means (1 - alpha/2)*100 % confidence interval is given

Details

It calculates coefficient of variation (CV) from a confidence interval of 2x2 bioequivalence study.

Value

Returns mean squared error (MSE).

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

ci2mse(12, 13, 0.85, 1.11)

Mean squared error (MSE) from coefficient of variation (CV)

Description

It calculates mean squared error (MSE) from coefficient of variation (CV).

Usage

cv2mse(cv)

Arguments

cv

Coefficient of variation (%) in the original scale

Details

Coefficient of variation (CV) is percent in original scale and mean squared error (MSE) is log scale.

Value

Returns mean squared error (MSE) in log scale).

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

cv2mse(25)

Hodges-Lehmann estimation for a variable of a 2x2 study

Description

It performs Hodges-Lehmann estimation for 2x2 study. This is usually for Tmax variable.

Usage

hodges(bedata, Var)

Arguments

bedata

Data table name. This should have at least the following columns and a variable column to be tested.

  
 GRP : Group or Sequence, 'RT' or 'TR'
 PRD : Period, 1 or 2
 SUBJ : Subject ID
 TRT : Treatment or Drug, 'R' or 'T'
Var

Variable to be estimated. This should be one of the column names in bedata table. Usually 'Tmax'

Details

It nonparametrically tests Var variable equivalency from a 2x2 study. This is done for a variable which we cannot assume log-normal distribution.

Value

Wilcoxon Signed-Rank Test

A kind of nonparametric test

Hodges-Lehmann Estimate

90% confidence interval in the original scale and the percent scale

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

hodges(NCAResult4BE, "Tmax")

Coefficient of variation (CV) from mean squared error (MSE)

Description

It calculates coefficient of variation (CV) from mean squared error (MSE).

Usage

mse2cv(mse)

Arguments

mse

Mean square error (MSE) in log scale

Details

Coefficient of variation (CV) is percent in the original scale and mean squared error (MSE) is the log scale.

Value

Returns coefficient of variation (CV) in percent (%).

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

mse2cv(0.06062462)

An Example of Noncompartmental Analysis Result for Bioequivalence Test

Description

Contains a noncompartmental analysis result table from a concentration simulated bioequivalence study.

Usage

NCAResult4BE

Format

A data frame with 66 observations on the following 7variables.

SUBJ

Subject ID

GRP

Group or Sequence character code: 'RT' or 'TR"

PRD

Period numeric value: 1 or 2

TRT

Treatment or Drug code: 'R' or 'T'

AUClast

AUClast positive numeric value

Cmax

Cmax positive numeric value

Tmax

Tmax positive numeric value

Details

This contains a simulated data for 2x2 bioequivalence study data analysis. Noncompartmental analysis results are from the NonCompart package.


Plot bioequivalence variable of a 2x2 study

Description

It plots two 2x2 plots for a variable.

Usage

plot2x2(bedata, Var)

Arguments

bedata

Data table name. This should have at least the following columns and a variable column to be plotted.

  
 GRP : Group or Sequence, 'RT' or 'TR'
 PRD : Period, 1 or 2
 SUBJ : Subject ID
 TRT : Treatment or Drug, 'R' or 'T'
Var

Variable to be plotted. This should be one of the column names in bedata table.

Details

It plots Var column values according to GRP, PRD, TRT.

Value

It just draws two 2x2 plots for equivalence exploration.

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

plot2x2(NCAResult4BE, "AUClast")
plot2x2(NCAResult4BE, "Cmax")
plot2x2(NCAResult4BE, "Tmax")

Power using a confidence interval of previous 2x2 study

Description

It calculates power for the bioequivalence test on ratio using a confidence interval of previous 2x2 study.

Usage

pow2x2ci(n1, n2, LL, UL, Alpha = 0.1)

Arguments

n1

Subject count of group 1

n2

Subject count of group 2

LL

Lower limit of the confidence interval of geometric mean ratio (Test/Reference)

UL

Upper limit of the confidence interval of geometric mean ratio (Test/Reference)

Alpha

Alpha level. This means (1 - alpha/2)*100 % confidence interval is given

Details

It calculates power of sample size (n per group) with CV.

Value

Returns power [0, 1)

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

pow2x2ci(12, 13, 0.85, 1.11)

Power using mean squared error (MSE) of previous 2x2 study

Description

It calculates power for the bioequivalence test on ratio using mean squared error (MSE of previous 2x2 study.

Usage

pow2x2mse(n1, n2, mse, True.R = 1, Alpha = 0.1, ThetaL = 0.8, ThetaU = 1.25)

Arguments

n1

Subject count of group 1

n2

Subject count of group 2

mse

Mean squared error

True.R

True ratio of test/reference

Alpha

Alpha level. This means (1 - alpha/2)*100 % confidence interval is given

ThetaL

Lower limit of equivalence criteria

ThetaU

Upper limit of equivalence criteria

Details

It calculates power of sample size (n per group) with CV.

Value

Returns power [0, 1)

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

pow2x2mse(12, 13, 0.0756530)

Power using coefficient of variation (CV)

Description

It calculates power for the bioequivalence test on ratio using coefficient of variation (CV).

Usage

powcv(n, CV, DesignNo = 1, True.R = 1, Alpha = 0.1, ThetaL = 0.8, ThetaU = 1.25)

Arguments

n

Sample size, n per group

CV

Coefficient of Variation (%)

DesignNo

Crossover design number.

  
 Design Number (treatment x sequence x period)
 1 2x2x2 : RT TR
 2 2x4x2 (Balaam Design) : TT RR RT TR 
 3 2x2x3 (Two-sequence Dual Design): TRR RTT 
 4 2x2x4 : TRRT RTTR
 5 2x4x4 : TTRR RRTT TRRT RTTR
 6 3x6x3 (William Design for 3 treatments) + carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 7 3x6x3 (William Design for 3 treatments) - carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 8 4x4x4 (William Design for 4 treatments) + carry-over effect 
         : RCAB ARBC BACR CBRA
 9 4x4x4 (William Design for 4 treatments) - carry-over effect 
         : RCAB ARBC BACR CBRA 
True.R

True ratio of test/reference

Alpha

Alpha error level

ThetaL

Lower limit of equivalence criteria

ThetaU

Upper limit of equivalence criteria

Details

It calculates power of sample size (n per group) with CV.

Value

Returns power [0, 1)

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

powcv(12, 25)

Power using mean squared error (MSE)

Description

It calculates power for the bioequivalence test on ratio using mean squared error (MSE).

Usage

powmse(n, mse, DesignNo = 1, True.R = 1, Alpha = 0.1, ThetaL = 0.8, ThetaU = 1.25)

Arguments

n

Sample size, n per group

mse

Mean squared error

DesignNo

Crossover design number.

  
 Design Number (treatment x sequence x period)
 1 2x2x2 : RT TR
 2 2x4x2 (Balaam Design) : TT RR RT TR 
 3 2x2x3 (Two-sequence Dual Design): TRR RTT 
 4 2x2x4 : TRRT RTTR
 5 2x4x4 : TTRR RRTT TRRT RTTR
 6 3x6x3 (William Design for 3 treatments) + carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 7 3x6x3 (William Design for 3 treatments) - carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 8 4x4x4 (William Design for 4 treatments) + carry-over effect 
         : RCAB ARBC BACR CBRA
 9 4x4x4 (William Design for 4 treatments) - carry-over effect 
         : RCAB ARBC BACR CBRA 
True.R

True ratio of test/reference

Alpha

Alpha error level

ThetaL

Lower limit of equivalence criteria

ThetaU

Upper limit of equivalence criteria

Details

It calculates power of sample size (n per group) with mse.

Value

Returns power [0, 1))

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

powmse(12, 0.06)

Widened Bound for Scaled Average Bioequivalence

Description

It calculates widened bound for scaled average bioequivalence.

Usage

scaledBound(CV = 40, k = 0.76, digits = 4)

Arguments

CV

coefficient of variation in percent

k

0.76 is for EMA and Korea MFDS. US FDA uses 0.893. When CV is 30%, bound becomes (0.8, 1.25). Most regulartory body does not use a more accurate value.

digits

Korea MFDS use 4 digits only, while other regulatory bodies use more decimal values.

Details

CV must be larger than 30%. If CV is larger than 50

Value

widened bound for scaled average bioequivalence

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

scaledBound(30)
scaledBound(35)
scaledBound(40)
scaledBound(45)
scaledBound(50)

Sample size using a confidence interval of previous 2x2 study

Description

It calculates sample size for the bioequivalence test on ratio using a confidence interval of previous 2x2 study.

Usage

ss2x2ci(n1, n2, LL, UL, Alpha = 0.1)

Arguments

n1

Subject count of group 1

n2

Subject count of group 2

LL

Lower limit of the confidence interval of geometric mean ratio (Test/Reference)

UL

Upper limit of the confidence interval of geometric mean ratio (Test/Reference)

Alpha

Alpha level. This means (1 - alpha/2)*100 % confidence interval is given

Details

It calculates sample size (n per group) with CV, Alpha, and Beta for bioequivalence test.

Value

Returns sample size (n per group) for bioequivalence test with ratio criteria.

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

ss2x2ci(12, 13, 0.85, 1.11)

Sample size using coefficient of variation (CV)

Description

It calculates sample size for the bioequivalence test on ratio using coefficient of variation (CV).

Usage

sscv(CV, DesignNo = 1, True.R = 1, Alpha = 0.1, Beta = 0.2, 
     ThetaL = 0.8, ThetaU = 1.25, nMax = 999999)

Arguments

CV

Coefficient of Variation (%)

DesignNo

Crossover design number.

  
 Design Number (treatment x sequence x period)
 1 2x2x2 : RT TR
 2 2x4x2 (Balaam Design) : TT RR RT TR 
 3 2x2x3 (Two-sequence Dual Design): TRR RTT 
 4 2x2x4 : TRRT RTTR
 5 2x4x4 : TTRR RRTT TRRT RTTR
 6 3x6x3 (William Design for 3 treatments) + carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 7 3x6x3 (William Design for 3 treatments) - carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 8 4x4x4 (William Design for 4 treatments) + carry-over effect 
         : RCAB ARBC BACR CBRA
 9 4x4x4 (William Design for 4 treatments) - carry-over effect 
         : RCAB ARBC BACR CBRA 
True.R

True ratio of test/reference

Alpha

Alpha error level

Beta

Beta error level

ThetaL

Lower limit of equivalence criteria

ThetaU

Upper limit of equivalence criteria

nMax

Maximum subject number (sample size) per group

Details

It calculates sample size (n per group) with CV, Alpha, and Beta for bioequivalence test.

Value

Returns sample size (n per group) for bioequivalence test with ratio criteria.

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

sscv(25)

Sample size using mean squared error (MSE)

Description

It calculates sample size for the bioequivalence test on ratio using mean squared error (MSE).

Usage

ssmse(mse, DesignNo = 1, True.R = 1, Alpha = 0.1, Beta = 0.2, 
      ThetaL = 0.8, ThetaU = 1.25, nMax = 999999)

Arguments

mse

Mean squared error

DesignNo

Crossover design number.

  
 Design Number (treatment x sequence x period)
 1 2x2x2 : RT TR
 2 2x4x2 (Balaam Design) : TT RR RT TR 
 3 2x2x3 (Two-sequence Dual Design): TRR RTT 
 4 2x2x4 : TRRT RTTR
 5 2x4x4 : TTRR RRTT TRRT RTTR
 6 3x6x3 (William Design for 3 treatments) + carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 7 3x6x3 (William Design for 3 treatments) - carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 8 4x4x4 (William Design for 4 treatments) + carry-over effect 
         : RCAB ARBC BACR CBRA
 9 4x4x4 (William Design for 4 treatments) - carry-over effect 
         : RCAB ARBC BACR CBRA 
True.R

True ratio of test/reference

Alpha

Alpha error level

Beta

Beta error level

ThetaL

Lower limit of equivalence criteria

ThetaU

Upper limit of equivalence criteria

nMax

Maximum subject number (sample size) per group

Details

It calculates sample size (n per group) with mse, Alpha, and Beta for bioequivalence test.

Value

Returns sample size (n per group) for bioequivalence test with ratio criteria.

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

ssmse(0.06)

Sample Size for Scaled Average BE using coefficient of variation (CV)

Description

It calculates sample size for the scaled average bioequivalence test on ratio using coefficient of variation (CV).

Usage

ssscv(CV, DesignNo = 1, True.R = 1, Alpha = 0.1, Beta = 0.2, Region = "EU", nMax = 999999)

Arguments

CV

Coefficient of Variation (%)

DesignNo

Crossover design number.

  
 Design Number (treatment x sequence x period)
 1 2x2x2 : RT TR
 2 2x4x2 (Balaam Design) : TT RR RT TR 
 3 2x2x3 (Two-sequence Dual Design): TRR RTT 
 4 2x2x4 : TRRT RTTR
 5 2x4x4 : TTRR RRTT TRRT RTTR
 6 3x6x3 (William Design for 3 treatments) + carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 7 3x6x3 (William Design for 3 treatments) - carry-over effect 
         : RBA ARB BAR ABR BRA RAB
 8 4x4x4 (William Design for 4 treatments) + carry-over effect 
         : RCAB ARBC BACR CBRA
 9 4x4x4 (William Design for 4 treatments) - carry-over effect 
         : RCAB ARBC BACR CBRA 
True.R

True ratio of test/reference

Alpha

Alpha error level

Beta

Beta error level

Region

US or FDA for US FDA, KR or MFDS for Korea MFDS, EU or EMA for other regions or countries

nMax

Maximum subject number (sample size) per group

Details

It calculates sample size (n per group) with CV, Alpha, and Beta for scaled average bioequivalence test. US FDA uses this widened bound for both AUClast and Cmax, while EU EMA and Korea MFDA use this for Cmax only.

Value

Returns sample size (n per group) for scaled average bioequivalence test with ratio criteria.

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

ssscv(42.2, DesignNo=4, True.R=0.9) # 14 per group, EU EMA. This applies only for Cmax
ssscv(42.2, DesignNo=4, True.R=0.9, Region="US") # 9 per group, US FDA
ssscv(42.2, DesignNo=4, True.R=0.9, Region="KR") # 14 per group, Korea MFDS. Only for Cmax

Bioequivalence test for a variable of a 2x2 study

Description

It performs conventional bioequivalence test for 2x2 study. Basic assumption is that the variable is distributed as a log-normal distribution. This is SAS PROC GLM style. If you want PROC MIXED style use nlme::lme.

Usage

test2x2(bedata, Var)

Arguments

bedata

Data table name. This should have at least the following columns and a variable column to be tested. Var column values should be all positive values.

 GRP : Group or Sequence, 'RT' or 'TR'
 PRD : Period, 1 or 2
 SUBJ : Subject ID
 TRT : Treatment or Drug, 'R' or 'T'
Var

Variable to be tested. This should be one of the column names in bedata table. Usually 'AUClast' or 'Cmax'

Details

It tests Var variable equivalency from a 2x2 study. Current regulatory requirement is that the 90% confidence interval of geometric mean ratio (Test/Reference) should be within [0.8, 1.25].

Value

Analysis of Variance (log scale)

Analysis of Variance in log scale

Between and Within Subject Variability

Variance in log scale and coefficient of variance in original scale

Least Square Means

Geometric means

90% Confidence Interval

90% confidence interval of geometric mean ratio (T/R)

Sample Size

Sample size for the replication of this study

Author(s)

Kyun-Seop Bae <[email protected]>

Examples

test2x2(NCAResult4BE, "AUClast")
test2x2(NCAResult4BE, "Cmax")