bear (BE/BA for R) v2.9.0
This package was designed to analyze average bioequivalence (ABE) data from noncompartmental analysis (NCA) to ANOVA (using lm() for a 2x2x2 crossover and parallel study; lme() for replicate crossover study). The study design of ABE can be 2x2x2 crossover or repeated crossover (2x2x2, 2x2x3,...2x2x6) or a parallel study. The dosing can be single- or multiple-dose. The statistical analysis for bioavailability (BA) measurements (AUCs and Cmax) was based on the two one-sided tests (Schuirmann, 1987). ABE involves the calculation of 90% confidence intervals for the ratio of the averages of the measures for the test and reference products. The BE will be concluded based on the calculated 90%CIs falling within 80-125% (or up to user's defined). You can browse bebac Forum - R for BE/BA to get more information about the development of bear. We received a lots of great suggestions from the experts of bebac Forum - R for BE/BA. bear is developed under GPL (> 2) and is open sourced freeware.
Installations & upgrade
Download and install R first. bear (stands for BE/BA for R) is an R package. However, it is not available directly from R repository website since v2.6.5. Please download from here. For more detailed information about installation, please browse bear download page at Sourceforge. Read the content following the file list panel for more details first. No need to download the file README.md since it has been displayed on the screen. The file - NEWS is the change history. Users will require an R script file called preinst.r from Sourceforge to install bear.
about preinst.r - from Sourceforge
PLEASE READ CAREFULLY TO SAVE YOUR TIME AND AVOID POSSIBLE ERRORS.
This file ("preinst.r") is not a part of R packages, but an R script to automate the installation for all the required packages/libraries for package bear. Please download preinst.r and place/copy it to the R working directory. Use 'getwd()' to find out where the directory is. Under R console, type source("preinst.r") and click the package to install. You require the system administrator's privilege (Windows & Linux) to run this script. Answer "Yes" if asked for anything during installation. GTK+ runtime is now bundled with RGtk2 package installation for the Windows platform, as well as more GTK+ (a.k.a. GTK2) themes were added.
What bear can do:
This package includes three parts. The first is doing “sample size estimation.” Users can choose 80 or 90% power and defined upper BE acceptance criteria to conduct an ABE between these two formulations. Sample size also depends on the magnitude of variability. Variance estimates can be obtained from the biomedical literature or pilot studies. For crossover designs, we provide two kinds of methods for different data (raw and log-transformed) (Liu, et al. 1992; Hauschke, et al.1992). This function will provide information about how many numbers of subjects should be included. Second part is to perform NCA. We provide NCA approach to compute AUC0-t, AUC0-inf and terminal elimination rate constant (λz) with time-Cp profile. λz, the terminal phase rate constant, will be estimated from the slope of linear regression with various approaches (manual selection of data points, adjusted R2 (ARS), AIC, Two-Times-Tmax (TTT), TTT-ARS, TTT-AIC, etc). All these approaches do not include the data point of (Tmax, Cmax). Linear trapezoidal rule is used to calculate AUC0-t (AUC from time 0 to the last measurable Cp). The extrapolated AUC (from time of the last measurable Cp to infinity) will be estimated from the last measurable Cp divided by λz. AUC0-inf (AUC from time 0 to infinity) equals to AUC0-t plus the extrapolated AUC(AUCt-inf). Cmax is obtained from the observed time-Cp profile. All plots from NCA will be stored in a pdf file (like this pdf) and all reports, including NCA reports (like this NCA PK) and pharmacokinetic summaries (Cmax, Tmax, AUC0-t, AUC0-inf, AUC0-t/AUC0-inf*100%, ln(Cmax), ln(AUC0-t), ln(AUC0-inf), MRT0-inf, T1/2, Vd/F, λz, Cl/F). Please refer to some pharmacokinetic textbooks about how to calculate these parameters with NCA. Final step is to perform ANOVA (lm in R). For non-replicated crossover designs, FDA guidance (FDA, 2001) recommends parametric procedures to analyze log-transformed BA measures. It continues to perform ANOVA and calculate 90%CIs, and finally to conclude if it is bioequivalent with three pivotal BE parameters. This package also supplies ANOVA stat reports (like this ANOVA stat) or results of linear mixed effects (lme_stat.txt for replicate or parallel BE studies) and summaries (like this statistical summaries). All results obtained from outlier detection analysis (now only for 2x2x2 crossover BE study) will also appear in ANOVA_stat, and all plots from outlier detection analysis will be stored in this ODplots.pdf.
Dataset format (very important to read!): Only the *.csv dataset file is supported for bear. The following picture shows dataset format for a 2x2x2 crossover (A), replicate crossover (2x2x3/2x2x4...2x2x6) (B), and the parallel study (C).
where "subj", "seq", "prd", "tmt" (or "drug"), "time" and "conc" represents subject#, sequence, period, treatment (or drug), sampling time and drug concentration, respectively. Users can use different column names as wished. Please note that:
Users must follow the column sequence as shown above; However, the column names can be different;
We have internally defined the study sequence in bear as "1" (no double quote, please) when a subject takes the reference product first, followed by the test product and "2" in reverse;
In coding "tmt" or "drug", please set drug or tmt ="1" for the Reference, and tmt = "2" for the Test.
All data should be entered only as the numerical format, not the text format (so no double-quote!);
When a drug plasma/serum/blood concentration is near the end of the sampling time period and is below LLOQ, this value (entire row) can be deleted (IndivDP_output function can not handle with the case); The recommended way is to input these data values as 'NA' since bear will handle it properly. However, the first data point at time = 0 & Cp = 0 must be included, otherwise only measurable plasma/serum drug conc. (non-zero) should be included in the dataset.
Users can manually choose the terminal 2-24 data points for estimation of λz; not necessary to choose the exact 3 data points. It can be difficult for multiple-dosed studies sometimes to choose the exact 3 data points. The max. data points are set to 24 since v2.8.7. Users can click "Stop -> Stop locator" on the graphic window (on the upper left corner) and then click "Stop locator" to stop further selection if less than 4 data points are selected since v2.5.4; See the picture below with "stop locator" in Windows).
Any fixed/upgrade version of bear can be downloaded from here (Sourceforge). Please read the messages carefully at Sourceforge for more details and for saving your time and avoid all possible errors.
If there is any question about using bear, please report bugs/questions to pkpd168 at gmail.com, I will respond asap.
Validation: We have done cross-validation of bear with a dataset of 2x2x2 BE and found that all output results appear to be the same as those obtained from commercial software. Here is the file of cross-validation results (pdf) done in 2009.
Update history is here.