Package 'BElikelihood'

Title: Likelihood Method for Evaluating Bioequivalence
Description: A likelihood method is implemented to present evidence for evaluating bioequivalence (BE). The functions use bioequivalence data [area under the blood concentration-time curve (AUC) and peak concentration (Cmax)] from various crossover designs commonly used in BE studies including a fully replicated, a partially replicated design, and a conventional 2x2 crossover design. They will calculate the profile likelihoods for the mean difference, total standard deviation ratio, and within subject standard deviation ratio for a test and a reference drug. A plot of a standardized profile likelihood can be generated along with the maximum likelihood estimate and likelihood intervals, which present evidence for bioequivalence. See Liping Du and Leena Choi (2015) <doi:10.1002/pst.1661>.
Authors: Liping Du [aut, cre] , Leena Choi [aut] , Cole Beck [aut]
Maintainer: Liping Du <[email protected]>
License: GPL (>= 3)
Version: 1.1
Built: 2024-11-01 06:33:46 UTC
Source: CRAN

Help Index


Likelihood method for analyzing bioequivalence (BE) trial data

Description

This package will calculate and plot the profile likelihoods for the mean difference and standard deviation ratios of a test drug to a reference drug for AUC or Cmax from various crossover designs commonly used in BE studies, such as a fully replicated crossover design (e.g., 2x4 two-sequence, four-period, RTRT/TRTR), a partially replicated crossover design (e.g., 2x3, two-sequence, three-period, RTR/TRT), and a two-sequence, two-period, crossover design design (2x2, RT/TR), where "R" stands for a reference drug and "T" stands for a test drug.

Author(s)

Maintainer: Liping Du [email protected] (ORCID)

Authors:


Data example for bioequivalence (BE) study

Description

The dataset is a bioequivalence dataset from a fully repicated 2x4 crossover design with RTRT and TRTR as sequences. It is a subset of Example 4.4 in Chapter 4 of Patterson and Jones's book.

Usage

data(dat, package = 'BElikelihood')

Format

A data frame with 176 observations (from 44 subjects) on 6 variables:

subject

subject ID

sequence

RTRT or TRTR, where T and R stand for test and reference drugs, respectively

period

1 to 4 for crossover period

formula

T or R stand for test and reference drugs, respectively

AUC

a pharmacokinetic parameter - the area under the blood/plasma concentration-time curve

CMAX

a pharmacokinetic parameter - the peak concentration

Source

Patterson S and Jones B (2023). Bioequivalence and Statistics in Clinical Pharmacology. Chapman Hall/CRC Press.

Examples

data(dat)

Plot method for proLikelihood object

Description

This function generates a plot of a standardized profile likelihood after running the proLikelihood() function.

Usage

## S3 method for class 'proLikelihood'
plot(x, textx, texty = 0.9, textsize = 3, ...)

Arguments

x

proLikelihood object

textx

numeric value, position (x-axis) of label for the maximum likelihood estimate and the 1/8 and 1/32 likelihood intervals.

texty

numeric value, position (y-axis) of label the maximum likelihood estimate and the 1/8 and 1/32 likelihood intervals.

textsize

numeric value text size of the label.

...

unused

Details

The function generates a plot of the standardized profile likelihood (the profile likelihood relative to the maximum) with the maximum likelihood estimate and 1/8 and 1/32 likelihood intervals for the parameter of interest (mean difference, total standard deviation ratio or within-subject standard deviation ratio depending on the ‘method’) printed inside the plot.

Value

ggplot2 object, a plot of the standardized profile likelihood with the maximum likelihood estimate and 1/8 and 1/32 likelihood intervals printed inside the plot.

Examples

data(dat)
cols <- list(subject = 'subject', formula = 'formula', y = 'AUC')
p4a <- averageBE(dat, colSpec = cols, xlength = 50)
p4t <- totalVarianceBE(dat, colSpec = cols, xlength = 50)
p4w <- withinVarianceBE(dat, colSpec = cols, xlength = 50)
plot(p4a)
plot(p4t)
plot(p4w)
# three period case
dd3 <- dat[dat$period < 4,]
p3a <- averageBE(dd3, colSpec = cols, xlength = 50)
plot(p3a)
# two period case
dd2 <- dat[dat$period < 3,]
p2a <- averageBE(dd2, colSpec = cols, xlength = 50)
plot(p2a)

Print method for proLikelihood object

Description

Print ‘poi’ (mean difference, total standard deviation ratio or within-subject standard deviation ratio) and ‘maxLik’ (corresponding profile likelihood) elements from a proLikelihood object.

Usage

## S3 method for class 'proLikelihood'
print(x, ...)

Arguments

x

proLikelihood object

...

unused

Value

Output the mean difference, total standard deviation ratio or within-subject standard deviation ratio values (depending on the ‘method’) with the calculated corresponding profile likelihood values.

Examples

data(dat)
cols <- list(subject = 'subject', formula = 'formula', y = 'AUC')
l <- averageBE(dat, colSpec = cols, xlength = 300)
l

Calculate profile likelihood for bioequivalence data

Description

This is a general function to calculate the profile likelihoods for the mean difference, total standard deviation ratio, and within-subject standard deviation ratio of the test drug to the reference drug from bioequivalence (BE) study data. Standardized profile likelihood plots with the 1/8 and 1/32 likelihood intervals can be generated using the plot method. The within-subject standard deviation ratio can be obtained only for a fully replicated 2x4 or a partially replicated 2x3 design.

Usage

proLikelihood(
  dat,
  colSpec = list(),
  theta = NULL,
  xlow,
  xup,
  xlength = 100,
  method
)

averageBE(dat, colSpec = list(), theta = NULL, xlow, xup, xlength)

totalVarianceBE(dat, colSpec = list(), theta = NULL, xlow, xup, xlength)

withinVarianceBE(dat, colSpec = list(), theta = NULL, xlow, xup, xlength)

Arguments

dat

data frame contains BE data (AUC and Cmax) with missing data allowed.

colSpec

a named list that should specify columns in ‘dat’; ‘subject’ (subject ID), ‘formula’ (must be coded as T or R, where T for test drug and R for reference drug), and ‘y’ (either AUC or Cmax) are required. ‘period’ and ‘seq’ may also be provided. The ‘formula’ column should identify a test or a reference drug with R and T.

theta

An optional numeric vector contains initial values of the parameters for use in optimization. For example, in a 2x4 fully replicated design, the vector is [mu, p2, p3, p4, S, phi,log(sbt2), log(sbr2), log(swt2), log(sbr2), rho], where ‘mu’ is the population mean for the reference drug when there are no period or sequence effects; ‘p2’ to ‘p4’ are fixed period effects with period 1 as the reference period; ‘S’ the fixed sequence effect with seq 1 as the reference sequence; ‘phi’ is the mean difference between the two drugs; ‘sbt2’ and ‘sbr2’ are between-subject variances for the test and reference drugs, respectively; ‘swt2’ and ‘swr2’ are within-subject variances for the test and reference drugs, respectively; ‘rho’ is the correlation coefficient within a subject. When ‘theta’ (default is null) is not provided, the function will choose the starting values automatically based on a linear mixed-effects model. If users want to provide these values, for method ‘average’ (mean difference), user may put any value for ‘phi’. Similarly, for method ‘total’, user can put any value for ‘log(sbt2)’, and for method ‘within’, user can put any value for ‘log(swt2)’.

xlow

numeric value, the lower limit of x-axis for the profile likelihood plot, at which the profile likelihood is calculated. It is optional and can be automatically generated using the maximum likelihood estimate (MLE) depending on the ‘method’. We strongly recommend users trying a better value that would better fit for purpose.

xup

numeric value, the upper limit of x-axis for the profile likelihood plot, at which the profile likelihood is calculated. It is optional and can be automatically generated using the MLE depending on the ‘method’. We strongly recommend users trying a better value that would better fit for purpose.

xlength

numeric value. Defaults to 100. It is the number of grids between the lower and upper limits, which controls smoothness of the curve. It will take longer time to run for larger number of grids, but we strongly recommend users using a larger number than the default value.

method

character value. Should be one of ‘average’, ‘total’, or ‘within’. ‘average’ will provide the profile likelihood for the mean difference between test and reference drugs. ‘total’ will provide the profile likelihood for the total standard deviation ratio of test to reference drug. ‘within’ will provide the profile likelihood for the within-subject standard deviation ratio of test to reference drug when appropriate.

Details

This function implements a likelihood method for evaluating BE for pharmacokinetic parameters (AUC and Cmax) (see reference below). It accepts a dataframe collected with various crossover designs commonly used in BE studies such as a fully replicated crossover design (e.g., 2x4 two-sequence, four-period, RTRT/TRTR), a partially replicated crossover design (e.g., 2x3, two-sequence, three-period, RTR/TRT), and a two-sequence, two-period, crossover design design (2x2, RT/TR), where "R" stands for a reference drug and "T" stands for a test drug. It allows missing data (for example, a subject may miss the period 2 data) and utilizes all available data. It will calculate the profile likelihoods for the mean difference, total standard deviation ratio, and within-subject standard deviation ratio. Plots of standardized profile likelihood can be generated and provide evidence for various quantities of interest for evaluating BE in a unified framework.

Value

A ‘proLikelihood’ object, with elements ‘poi’, ‘maxLik’, ‘MAX’, ‘LI’, and ‘method’. ‘poi’ and ‘maxLik’ are the interested parameter (mean difference, total standard deviation ratio or within-subject standard deviation ratio) values and the corresponding profile likelihood values, respectively. ‘MAX’ is the MLE estimate for that parameter. ‘LI’ is the likelihood intervals with the 1/4.5, 1/8 and 1/32 intervals. ‘method’ is one of ‘average’,‘total’, and ‘within’.

References

Liping Du and Leena Choi, Likelihood approach for evaluating bioequivalence of highly variable drugs, Pharmaceutical Statistics, 14(2): 82-94, 2015

Examples

data(dat)
cols <- list(subject = 'subject', formula = 'formula', y = 'AUC')
p4a <- proLikelihood(dat, colSpec = cols, xlength = 300, method = 'average')
p4t <- proLikelihood(dat, colSpec = cols, xlength = 300, method = 'total')
p4w <- proLikelihood(dat, colSpec = cols, xlength = 300, method = 'within')
# three period case
dd3 <- dat[dat$period < 4,]
p3a <- averageBE(dd3, colSpec = cols, xlength = 300)
p3t <- totalVarianceBE(dd3, colSpec = cols, xlength = 300)
p3w <- withinVarianceBE(dd3, colSpec = cols, xlength = 300)
# two period case
dd2 <- dat[dat$period < 3,]
p2a <- averageBE(dd2, colSpec = cols, xlength = 300)
p2t <- totalVarianceBE(dd2, colSpec = cols, xlength = 300)