v2.9.1 (for R v4.1.3,***personal release***) up to 2022/04/03
 fixed minor codes with icd.check();
 changed webpage from pkpd.kmu.edu.tw to pkpd168.com (Wix);
 added "LC_CTYPE=C" if the OS is macOS to fix the error of
'df< edit(df)' (locale error?);
v2.9.0 (for R v4.0.5,***personal release***) up to 2021/04/20
 added 'project save' function;
 some minor fixed and changes of GUI layouts;
v2.8.9 (for R v4.0.2,***personal release***) up to 2020/09/21
 rolled back to previous version with minor ticks for
normal & semilog plots in NCAplot();
 fixed "error in xj[i] : invalid subscript type 'list'"
in NCAselect() for R4.0.x; and many other I didn't remember,
including NCAreglplot() & all algorithms for lambda_z
calculations;
v2.8.8 (for R v4.0.1,***personal release***) up to 2020/06/10
 fixed NCA plots overwritten by ODA plots in pdf output
file; also fixed ODAplot() for multiplepanel plots;
 disabled 'Hotellings T2' in ODA temporarily in this
version since ICSNP may not be able to run normally (BANOVA());
 fixed ggplot2 errors in NCAplot();
 added minor ticks for normal & semilog plots in NCAplot();
 updated sample size estimation using Helmut's codes; depredicated
logdata() and using calc.N.power() since this release;
 built for R v4.0.x;
v2.8.7 (for R v3.6.1,***personal release***) up to 2019/11/20
 fixed ss_rl_GUI() the page.no detection;
 fixed touchandshow (mousemotion) for once only;
 added 'manual' for 'previously data point selections';
v2.8.6 (for R v3.6.1,***personal release***) up to 2019/08/29
 fixed previous ssGUI() and logdata();
 combined ssGUI() and rl.gui() together in one GUI
(ss_rl_GUI());
 added more study designs to randomlist; blocksize is set to
'missing' to use defaults (blocksize = 2x # of sequence);
v2.8.5 (for R v3.6.1,***personal release***) up to 2019/08/12
 fixed and adjusted GUI layouts;
 used 48x48 icons to replace gbuttons;
 removed the support of RData for dataset files;
 added 'demo run' as a button;
 added two additional widgets for xxdf & psdp;
 cancelled the support of smaller GUI since this version;
v2.8.4 (for R v3.5.3,***personal release***) up to 2019/04/18
 fixed Tmax and lambda_z lists in nca_pk.txt and misc_pk.csv
with NCAoutput(); it was reported by Astea in Bebac Forum;
 fixed error for random# generation for output files (linux);
 added one more output file for replicated crossover BE;
 fixed some output files with FormatC(...) to shorten digit
numbers;
 fixed misc_pk.csv and pivotal.csv for parallel study;
 #### above were from v2.8.33 ###
 fixed the first logo(print.logo());
 used setGD() to avoid errors when running with RStudio;
this also enabled 'manual selection' for lambda_z to run
with RStudio;
 fixed about.bear(); deleted the last empty line;
 loaded GUI packages quietly;
 modified zzz.R with less words;
 created load.csv.data() to replace fread() to correctly
identify different separators for columns and decimals;
 fixed the error of 'MRT0inf_Ref' in NCAoutput() (three places)
when generating *_misc_pk.csv output (thanks to roman_max through
bebac Forum);
 fixed version # of ssGUI() (GUI for sample size estimation);
 modified csv file reading priorities;
 fixed tmax_stat() to add "P value..." explanation to output text;
 modified layouts of GUIs.
v2.8.3 (for R v3.4.0,***personal release***) up to 2017/05/24
 fixed GUI properties;
 fixed warning messages for IDP output; some modules may omit
this message;
 used gfile() to replace rchoose.files() from package rChoicedialogs;
no need to used package rChoicedialogs any more, as well as Java VM;
it can cause 'segmentation fault (core dump)' in x32bit Ubunut/
Linux; unfortunately this can cause two error messages in iMac OS X;
and the function of 'while{}' won't work properly under Ubuntu/Linux
and iMac OS X; should be able to solved in the future; this won't
affect the normal running of bear so far;
 added bear ascii logo when running as 'verbose mode = TRUE';
 fixed bGUI() with no looping until selecting a data file;
 fixed screen output of 'load previously selected data point'; also
no more edit() and print() if verbose.mode is OFF;
 fixed rl.gui() with gedit() to replace gslider() for total subject#.
 fixed rl.gui() with auto setting blocksize; errors can occur in
Ubuntu/Linux.
v2.8.2 (for R v3.4.0,***personal release***) up to 2017/05/09
 fixed some GUI properties (again).
v2.8.1 (for R v3.4.0,***personal release***) up to 2017/05/06
 fixed bGUI() again for some package limitations;
 added a 'verbose mode?' button;
 added a 'show text output on screen?' button; its setting will be
saved in 'bearGUI.setup.rds'; hiding screen text output can speed
up processing;
 removed some ambiguous text outputs on screen; its setting will
not be saved in 'bearGUI.setup.rds';
 did a spelling check with bGUI() and found some misspelling words;
v2.8.0 (for R v3.4.0,***personal release***) up to 2017/05/05
 fixed bGUI() and used 'droplevels()' to remove unused
factor levels for 'bearGUI.setup.rds' and this also can
reduce the file size of 'bearGUI.setup.rds';
 fixed ssGUI(); when selecting demo mode, disable all selections;
 fixed rl.gui for better output;
 turned all "Press Enter to continue..." off, instead using
Sys.sleep(2) for twosecond time pause period (too short?);
 fixed 'demo' mode with 'statistical analysis only' by adding
'svalue(Tmax.stat)< FALSE' before 'enabled(Tmax.stat)< FALSE'
command in bGUI();otherwise, this may cause an error because
there is no such dataset for this demo mode;
 added one more button  'Reset settings to default' at group;
v2.7.9 (for R v3.4.0,***personal release***) up to 2017/05/04
 fixed check.data.err() to remove "data_err_logs.txt" when
there is no error found;
 fixed levels[bear.set] problem to save bear.set correctly;
v2.7.8 (for R v3.3.3,***personal release***) up to 2017/04/13
 fixed some *description() file to fit RStudio spaces;
 used fread() from package 'data.table' to read in all csv data files now;
such as NCAcsv() & NCA.BANOVAcsv();
 automatically saved manual selection of data points; no more ask users
to save or not to save (kind of silly question); such as NCAselectsave();
 fixed some cat(...) contents with less than 70 or less in length;
 fixed the errors of NCAplot(); thanks to Dr. Mahmoud Hassan Teaima (20160728)
for all linear plot with mislabeled a 'log scale' on y axis;
 added data check after reading in from a csv file for NCA; two functions
added: check.data.err() and which.subj.has.err(); this feature can detect
nonvalue or nonNA data appearing in *.csv dataset;
 displayed plots on screen (device) again for Rgui/X11 or running with
RStudio; on RStudio, all plots will be saved finally;
 removed the functions that only be called once;
 created GUI for setup and data input; also fixed many related codes;
 added nonparametric statistics for Tmax for 2x2x2 crossover;
v2.7.7 (for R v3.3.0,***personal release***) up to 2016/05/04
 added new logo for 2016;
 fixed imported package; switched from 'gWidgets2' to 'gWidgets' since
the package 'gWidgets2RGtk2' has been archived;
 also fixed 'preinst.r' (v1.4);
v2.7.6 (for R v3.2.3,***personal release***) up to 2016/02/11
 kept all data points with conc.= 0 when doing AUC & AUMC calculations;
modified ARS(), aic(), NCA(), TTT(), TTTAIC(), and TTTARS() for trapezoidal
calculation; alllinear is fine; if linearup/logdown; it will switch back
to linear when (1) C[i1]=0 or C[i]=0; (2) C[i]>C[i1]; and (3) C[i]=C[i1];
 kept NCAplot() unchanged; no way to plot log(0) if there is any; it will be
excluded;
 fixed check.nca.data() without assigning conc. = 0 as 'NA'; instead to
see if enough data points are available for �fz estimation; also fixed
NCAanalyze(), NCA.BANOVAanalyze(), RepNCAanalyze(), and demomenu() &
demomenu1();
 fixed title of input GUI for D. Labes' randomizeBE;
 fixed go2menu() with the list of the Top menu;
 fixed check.nca.data(); to add more explanations for the list of subject data;
 fixed Singlego() to delete the file of 'bear.current.setting' from the second
level menu;
v2.7.5 (for R v3.2.3,***personal release***) up to 2015/12/30
 added GUI for D. Labes' randomizeBE;
v2.7.4 (for R v3.2.3,***personal release***) up to 2015/12/24
 fixed 'lambda_z estimate' display with the menu of '*edit setup file'; this
'�fz estimate' only works on Win7; not working on/Win10/linuxpc/Mac OSX; however
the display of '�fz estimate' on R console in OK for all platforms;
v2.7.3 (for R v3.2.3,***personal release***) up to 2015/12/23
 switched all packages in the package list of 'Imports' in DESCRIPTION to 'importFrom()'
in NAMESPACE to fix the warning messages as v2.7.2;
 update 'Multipledata.rda' (subj#15) in directory of 'inst/extdata' to be able to
analyze with ARS/AIC; also fixed demomenu1() & demo_datasets_gen() with readRDS()
due to "Error: bad restore file magic number..."
 fixed check.nca.data() to skip manual selection of data points ('5') or loading
dataset from previous manual selection ('6', *.RData).
v2.7.2 (for R v3.2.3,***personal release***) up to 2015/12/22
 fixed description_version() with adding win.version() for Win OS detection; this
function starts from R v3.2.3;
 fixed NCAanalyze() & NCA.BANOVAanalyze() with adding 'lambda_z_calc' to check.nca.data();
 fixed the warning message when loading bear (...) after upgrading ggplot2 to v2.0.0
as follows:

Warning messages:
1: replacing previous import by ��grid::arrow�� when loading ��bear��
2: replacing previous import by ��grid::unit�� when loading ��bear��

by removing 'grid' from "Imports" in DESCRIPTION (package 'grid' has been included in
R base) and instead using 'grid::grid.raster' in the codes;
v2.7.1 (for R v3.2.3,***personal release***) up to 2015/12/15
 fixed "Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...):
NA/NaN/Inf in 'y'" when calculating �fz if there is any zero conc. included; replaced
'0' with 'NA' now; codes included NCAanalyze(), NCA.BANOVAanalyze(), RepNCAanalyze(),
demomenu() and demomenu1();
 fixed demomenu() & demomenu1() again; last time did not complete add check.nca.data();
 fixed BANOVAdata(); to delete 'bear.Current.setting.rds' if end run;
 fixed NCAplot() to remove 'NA' of conc. originally coming from zero conc.;
 added 'news(Version=="2.7.1",package="bear")' to browse update logs (about.bear());
not working yet in compiled mode (portable package), but in R console;
 tested on new released R v3.2.3; seemed ok...
 fixed NCAoutput(); first time to use '\u03BBz'(�fz) to replace 'lambda_z' in NCA output
file;
 fixed NCA(), NCAselect(), ARS(), aic(), TTT(), TTTAIC() & TTTARS();

v2.7.0 (for R v3.2.2,***personal release***) up to 2015/12/07
 added check.nca.data() for checking if the data points are good enough to
calculate the terminal elimination rate constant (�fz);
 fixed ARS(), aic(), TTT(), TTTAIC() & TTTARS() accordingly;
 modified NCAanalyze(), RepNCAanalyze() & NCA.BANOVAanalyze();
 fixed the top menu again; removed linux warning message;
 fixed check.nca.data(); made it to check the dataset based on the selected
�fz calculation methods;
 fixed demomenu() & demomenu1() also;
v2.6.9 (for R v3.2.2,***personal release***) up to 2015/10/4
 fixed readline(...) to show only red color;
 move package gdata and nlme from 'Depends' to 'Imports' to suppress noised message when
doing library(bear); and it still runs fine;
 fixed NCAoutput() for stat output on screen simultaneously;
v2.6.8 (for R v3.2.2,***personal release***) up to Sept. 28, 2015
 fixed sizemenu() and logdata(); it used to be that sizemenu() would stop run
if replicate; and logdata() kept looping;
 fixed some rd files;
v2.6.7 (***personal release***) up to Sept. 01, 2015
 switched 'show()' into 'print(*, row.names=FALSE)'; forced not to print the row
numbering;
 changed 'Current Setting' to display only related info; hiding all 'no' settings;
 fixed NCAoutput() for sink(., split=TRUE) (i.e., to display output contents on the
screen simultaneously); also simplified the code; added text for reminding user if
it is a metabolite (the analyte);
 fixed aic(), ARS(), TTT(), TTTAIC(), TTTARS(), NCA(); not to display from these but
only to generate 'TotalData';
 fixed NCAselect() and NCA(); not to stop after manual selection of data points;
 changed 'NaN' to "NA" when assigning Cl/F and Vd/F if it is a metabolite;
 improve the display of "Current Setting" again; remove all "no" settings from list;

v2.6.6 (***always as personal release from now on!***)
 simplified setting schemes; no more separated plot setting since this ver.;
 forced 'dose' to be input as 'mg' now; will be converted based on the unit of
measured drug plasma/serum conc. (mcg/mL, ng/mL or pg/mL);
 added "is metabolite?" setting; when it is a metabolite (the analyte), Cl/F and
Vd/F will not be able to calculate; the volume term is always fixed as the
unit of 'mL';
 label for y axis does not need to put conc. unit there; it will be added
automatically;
 changed logo of bear for 2015.
v2.6.5 (***personal release***)
 fixed helper.func() with suggested package (plyr) using requireNamespace();
 fixed BANOVAcsv() & NCA.BANOVAdata() to keep 'NA' after loading data;
 fixed RepMIXanalyze(), RepMIXoutput(), RepMIX(), MultipleParaMIX(),
MultipleParaMIXoutput(), MultipleParaMIXanalyze(), ParaMIX() and ParaMIXoutput()
for parameter transfer between functions; place all partial AUC parameters to the
last; BANOVA() and its related functions should be fine.
 tested bear with R v3.2.0 (Full of ingredient); all seem fine;
 fixed the dataset of 'SingleRep_stat_demo.csv' in both demoBANOVA() and
demo_datasets_gen();
 add option of 'na.action=na.exclude' to every lme() and lm();
 remove (remark)'TotalData<na.omit(TotalData)' to keep all NAs; these NA will be
ignored when doing lm() or lme();
 fixed lm.mod() for Type III SS;

v2.6.4 (official release)
 modified lme() in RepMIX(), NCAoutput() & lme_lm.mod() with
lmeControl(opt='optim', msMaxIter=1000);
 added R version into description_version() (as part of outputs);
 modified DESCRIPTION  Title;
 added warning for the writing permission of working path at the beginning;
 added citation into output files;
 added the message of showing the folder name for all output files at
the beginning;
 fixed helper.func() with plyr::ddply() for R 3.1.x;
 added warning for invalid selection of 'conc' for �fz estimation using
ARS(), aic(), TTT(), TTTAIC(), and TTTARS(); not required for NCAselect().
v2.6.3 (official release)
 added the tests for carryover effects and the direct formulation effects with
lm.mod() for 2x2x2 crossover study;
 took care of switching pAUC to be FALSE when running 'statistical analysis only';
since the demo dataset for 'statistical analysis only' does not include any
pAUC parameter (demoBANOVA());
 fixed BANOVA() again to simplify the codes;
 started working with new release of R v3.0.3;
 fixed BANOVAcsv() for dataset input if doing pAUC;
 demo dataset do not have any pAUC example for statisticalonly runs;
 BANOVA() for pAUC stats. and 2x2x2 crossover with multipledose stats.;
 fixed default values for 'pAUC_start' and 'pAUC_end' with '121' & '128',
instead of '1' & '8' respectively; since the 'pAUC_start' & 'pAUC_end'
counts from time zero, not from one dosing interval, especially for multipledose;
otherwise, it will cause error, such as 'Na/NaN/Inf > y...'
 fixed NCAplot() hopefully to speedup plotting and enhance efficiency;
 changed parallel study in NCAoutput() as lme(); in RepMix() the parallel
uses lm(); but the results are the same.
v2.6.2 (official release)
 added lme_lm.mod() to simplify original RepMix();
 added lm.mod() to simplify original BANOVA(); also fixed an error in original
BANOVA(); btw, fixed the output format of BANOVA();
 fixed BANOVAanalyze() to run BANOVAoutput() once and RepMixanalyze() to run
RepMIXOutput() once; no more run 'BANOVA() > BANOVAoutput()' since BANOVAoutput()
will call BANOVA(); and also no more 'RepMix() > RepMixOutput()' since
RepMIXoutput() will call RepMIX(); more efficient now; otherwise; BANOVA() & RepMix()
will run/be called twice.
 fixed some typo in the display of setting guide;
 recoded with NCAcsv(), BANOVAcsv() & NCA.BANOVAcsv(); more efficient hopefully;
 excluded the parallel study from icd_check(); how can I forget this? and kept
the replicated crossover study;
 added 'input data' to description_version(); it only works for Windows OS;
 added 'input dataset' and the name of OS platform to NCAoutput();
 fixed icd_check() and abandoned using 'stop()' from it; icd.check()
can be detected icd earlier than previous version since it will get
work done once the dataset is loaded; only for nca data; not for anova
dataset.
 added 'run.demo','study.type' and 'dose.type' into setting items to
reduce menu levels;
 fixed 'dosing interval' in bear setting; forgot to change in the last
release (v2.6.1); so this can cause error for multipledose;
 disable dataset output for demo runs; all can be done from the top menu;
 fixed CV_inter of BANOVA() when occurring negative variance components;
 corrected typo in RepMix() to show CV(intra);
 also fix NCAoutput() as adding ODA setting function;
 integrate ODA into setting file; modify the top menu;
 changed bear setup cheatsheet mode as a graphic display;
 fixed setting display screen;
 fixed output format for RepMIX();
 reassigned column names for 'statistical analysis' (BANOVA()) if the imported
.csv was not originally generated by bear;
 changed lme() in RepMIX(), NCAoutput() & lme_lm.mod() with lmeControl(opt='optim')
since v2.6.2 since the default 'nlminb' fails to converge frequently;
 fixed the inconsistency of 90% CI for replicate crossover in 'stat_sum_output'
and 'lme_output' with NCAoutput() and RepMIX();
v2.6.1 (official release)
 added function to avoid the errors due to dummy input;
 reorganize the information about how to setup bear using file.show();
testing on Windows, linux and iMac OS X platforms; iMac will work with
R.app or RStudio,but not TK GUI;
 added license (GPL2GPL3) announcement for bear on all output or display
pages;
 added the output function of individual data points (IDP output) with mean
& sd for each time point;
 removed formfeed with NCAoutput(); it does not print correctly with a
pdf printer; don't know why.
 fixed onscreen display content when it is pAUC;
 fixed some typo;
v2.6.0 (official release)
 decided not to implement data point interpolation for missing data value (C*)
when doing partial AUC or truncated AUC analysis in bear; users may consider
to use an estimate/interpolation/extrapolation for missing data when
necessary beforehand; further ref. included:
(1) http://forum.bebac.at/mix_entry.php?id=4655#p4681
(2) http://forum.bebac.at/mix_entry.php?id=1933&page=0&category=0&order
=last_answer&descasc=DESC#p2323
 added analysis for pAUC or truncated AUC (all noted as pAUC);
 fixed AUMC to comply with linearup/logdown trapezoidal rule as AUC.
 added "study tracer" (footprint) following the selected items from menu;
 create the export module for demo dataset;
 enable demo dataset export through NCA and ANOVA for later testing purposes;
 add 'plot.setup.rds'; plus original 'bear.setup.rds' of setup file for
bear;
 fixed export/import .csv and .Rdata file for 'statistical analysis' in
NCAoutput();
 added bear.setup() for setup files generation; new features.
 moved AUC calc. method to NCA.BANONAanalyze(); this has been changed later;
 corrected some typos again;
 fixed BANOVA() with no "abs()" for CV_intra values;
 fixed descriptionTOST() using paste() for better display;
v2.5.8 (official release)
 fixed BE criteria with percentage (/100); sorry about this error;
 disable warning message with options(warn=1) in go2menu();
 add the function of NCA saved pivotal parameters back again with automatically
saving as .RData (NCAoutput()); it was disabled before;
 added more output info of study design for NCAoutput(); not just multiple
dose or singledose; now also include if it is parallel or if it is replicated;
 added LL/UL as data.frame() input for replicated study as the nonreplicated;
 fixed AIC crashed when running multipledose study; and
 fixed plots of regression lines (ARS, AIC, etc.) for hiding the first
empty (null) plot window.
v2.5.7 (official release)
 official release on Sept. 27, 2013
v2.5.6.9 (prerelease)

 added LL/UL as data.frame() input; not just LL;
 fixed abnormal onscreen text display with Mac OS X using data.frame() input;
 fixed BANOVAdata() & BANOVAcsv() with graphic menu; and also spelling check; and
 removed abs() from CV_intra calculation (07/16/2013)
v2.5.6 (official release)

 official release on June 27, 2013
v2.5.5.9 (prerelease)

 added csv outputs for data point selections of linear regression to calculate
�fz with ARS, AIC, TTT, TTTAIC & TTTARS now; it used to be only available
for manual selection of data points; It's most easy function to implement so far
which I cannot figure out how to do this long time ago.
 fixed R^2 display on linear regression plots for terminal elim. rate constant (�fz)
estimation; just a mathematical annotation (squared 2), it took me two whole
nights to complete; Wow, it's not easy for this little thing...
 fixed NCAselect() & NCAregplot() with plot(...,lab=c(15,15,40),...) for better
looking.
 fixed selection of all linear or linup/logdown calc. for AUC with manual selection
of data points; others (AIC, ARS, TTT & etc. have been fixed last time); previously
the selection does not work effectively, even the 'all linear' is selected.
 corrected some typos; Is it cont. or cont'd? Answer: In formal writing use cont'd.
ref. link: http://wiki.answers.com/Q/Is_it_cont_or_cont%27d (used in NCAOutput).
fine.
 fixed 'description_pointselect()' to give more details about Windows, Linux/unix
or ubuntu, and Mac OS X.
 added linup/logdown trapezoidal AUC calc; the inup/logdown trapezoidal method
is default method now;
 fix graphics in linux/unix (ubuntu), Mac OS X; use 'dev.new()' instead of
'windows(record=TRUE)'; original codes won't work any more for R v3.0 or above;
 set options(digits=5) as default;
v2.5.5 (official release)

 official release on May 07, 2013
v2.5.4.9 (prerelease)

 OK, let's back to v2.5.4.9 as prerelease version; it makes more logical and
convenient for users to upgrade from CRAN. The next official release will be
v2.5.5, of course. Users only need to update their packages from CRAN in this case.
 NCA plots are switched from plot() to ggplot() now; better graphics looking
I think; add 'ggplot2' as Depends and 'plyr' as Suggests in DESCRIPTION.
 use some helper functions from "Cookbook for R" authored by Winston Chang to
use ggplot() (website);
 remove console plotting now; all plots will be logged into .pdf of NCA plots;
this will remove 5 R scripts from previous version;
 add test or demo functions; split from original /R directory;
 add page break for xxx_nca_outputs.txt;
 fix bugs for the section containing the means (SD) for each formulation
(by time point) in NCA output file. (thanks to Elba Romero). This is only
for the situations of running NCA demo or NCA.
 improve data point selection methods with correct subject labeling;
 add bear cover page for nca plot and ODA plot pdf files (using library(png));
 fixed the part of data point manual selection logged as .pdf. With R3.0.0, it
is still a problem; however, it is OK with R2.15.3 (miss it so much). Porbably
in R3.0.0 the graphic windows have been changed as stated in its update doc. Now
it should be fine. Quite different from ARS, AIC, TTT, etc.. my mistake.
 remove the function to save 'TotalData' again after NCA as a .RData. It does not
make any sense to do this.
 remove DOA onscreen plots since all plots have been logged into a .pdf file.
It's a redundancy procedure, just like onscreen NCA plots.
 improve pivotal_output.csv; now it is much better than previously.
 now manual data selection from previously saved .RData can also be plotted into
pdf now, as well as onscreen plots.
 fix 'Tmax_ss' for multiple dose BE; the original one should be subtracted with
TlastD (the time of the final dose be given)
 fix NCAselect again; try to improve graphic looking for multiple dose BE dataset,
especially the setting of ylim(); done.
 fixed the section containing the means (SD) for each formulation (by time point)
in NCA output file; it was the same for the ref. & test products in the previous
version. Sorry about this.
 hide onscreen linear regression plots, but still save all plots as one .pdf file.
 set 'ylim=c(1e3, 1e+5)' in all linear regression plots for �fz estimations; it
looks better in this case.
 all selection menu > 'graphics=TRUE' now

v2.5.4
 mostly based on BE/BA forums (bear feature request).
 grouping each run with random batch# and system date marked; more outputs from this version.
and no more overwrite previous outputs now.
 outlier detection analysis (ODA) is taken away from routine run; and also ODA outputs
is separated;
 max. data point selections for �fz estimation was increased to 6 (26);
 single plot for point selection now (used to be 2x2 plots), oldman version?
 fix inconsistent outputs for unbalanced dataset;
 incomplete dataset will be blocked before being analyzed (hopefully);
 use "file.choose()" for data file loading;
 total �fz selections outputs as .csv format (sarawuto); not for demo functions;
 pivotal and misc pk parameters output as .csv format;
 change data() for demo functions (demodemu.r & demomenu1.r); to adapt future R (with R v3.0
alpha);
 add "extdata" directory to store demo data files as .rda format;
 add 'legend=FASLE' into lineplot.CI(...) (NCAplot.r) otherwise, lineplot.ci() package will
crash with error... [Error in rep_len(col, n.leg) : cannot replicate NULL to a nonzero
length] only with R v3.0.0 alpha;
 add linear regression line plots for �fz estimation for manual data points selections (
OK for R 2.15.3 and still got dev.copy() error when testing on R3.0.0beta (Helmut & sarawuto).
 change save() and load() to saveRDS() and readRDS() for convenient scripting.
 add mean (sd) plots on semilog scale (Helmut).
 add alarm() and readline("...") for methods of estimation �fz to alert user what
they should know before next step.(as suggested by Detlew)
 add a section containing the means (SD) for each formulation (by time point) in NCA output
file (as requested by Helmut).
 modify some output files.
 add plots of linear regression lines for �fz estimation for ARS, AIC, TTT,TTTAIC &
TTTARS.
 change all load() and save() to readRDS() and saveRDS().
v2.5.3
 generalized SASlike outputs (such as ANOVA and Type III SS) with 2x2x2 crossover;
 added variance model into lme() and fixed random effect in lme() for replicate study
as suggested by D. Labes posted at bebac forum (browse this thread at bebac forum);
 the maximum data points that can be chosen to estimation of �fz is set to 4, at
least 2 data points are required. The "Select the exact 3 data points" has been changed
to "Select 24 data point"; and
 other minor changes.
v2.5.2
 changed anova model back to lm(log(PK)~ seq + subj:seq + prd + drug , data) as with
v2.4.0; if not, this will result in error in calculation of 90% CI, as well as point
estimates (thanks to Ji?i Hofmann, Czech Republic).
v2.5.1
 recompiled again to change the requirement with R v2.10.0 to enable installation in MacOSX;
however, bear was still compiled with R v2.11.0.
v2.5.0
 added Welch t tests (also 90% CI) for a parallel BE study (thanks to Helmut Schutz);
 added CVintra (intrasubject CV) calculation for a replicate BE study (lme_stat.txt)
right after classical 90% CI;
 hide ln(PK) list in the report of ANOVA_stat.txt/lm_stat.txt/lme_stat.txt;
 completed the function of a parallel BE study with multipledosed (used to be singledosed only);
and
 some other bugs fixed
v2.4.4
 fixed the output file, Statistical_summaries.txt; i.e., Table 2: remove n1, n2 list from
nonreplicate or replicate crossover BE study; They only appear in Parallel BE study.
v2.4.3
 changed the statistical model from linear mixed model(lme()) to linear model (lm())(similar to
SAS GLM) for a parallel BE study; basically, the results obtained from lme() or lm() are the same.
However, to meet the regulatory requirements (both FDA and EU), lm() has been adopted since this
version. Later, the Welch ttest will be added for a parallel BE study for unequal variances in
the next release. See more discussion: Post#01 and Post#02.
 recompiled bear under R v.2.11.0.
v2.4.2
 fixed NCA outputs for the unbalanced parallel BE study
 fixed TOST descriptions
 recompiled with R v2.10.1
v2.4.1
 add time/date stamp on the header or title page of text or pdf (plots) outputs (11.10(e) of 21 CRF
Part 11); more to be made for Part 11...
 set .pdf output format as A4 paper size.
 modify all .Rd files to fit R v2.9.2 requirements
 change of the name "seq:subj" to "subj(seq)" in anova with the mode of "Y ~ seq + subj:seq +
per + trt" in order to be conveniently cross validated with SAS (thanks to Elmaestro)
 mostly minor changes with this release
v2.4.0
 add data analysis of multipledosed (MD) ABE data
 add Cook's distance for outlier detection with various criteria
 fixed yaxis scaling problem
v2.3.1
 fixed NCA plots of Time scale (with autoscaled)
 used the difference of lsmeans between the Ref. and the Test to calculate 90% CIs for
Cmax and AUCs
v2.3.0
 add sample size estimation and lme analysis for the parallel BE study
 add References into bear's output (such as ANOVA)
 label outliers' subjects number for boxplot only if there is any (see crossover demo)
 add input data summary of BA measurement (class level information, means, etc.)
 add interpretations for some statistical tests (such as Hotelling T2 test)
 add add Two OneSided Tests (TOST) and AndersonHauck's tests (just for educational
purposes ONLY)
 allow users to change BE acceptance range now (not fixed on 80%125% any more!); different
countries have different regulatory basis...
 show MSResidual and MSSubject(seq) values when calculating inter and intrasubject CV
 change Hotelling T2 test layout
v 2.2.0
 add point estimate along with 90% CI in output file called 'Statistical_summaries.txt
(suggested by D. Labes).
 add sample size estimation for replicate BE study, and output rearrangement.
 add Hotelling T2 function and boxplot for outlier detection
 add Quantiles for intrasubject and intersubject (with boxplot)
 add replicated study for 2*2*3, 2*2*4, 2*2*5, and 2*2*6 (using lme to analyze replicated
BE study)
 add sample size estimation for replicated study (using 2*2*2 sample size estimation extended
to 2*2*n sample size of replicate crossover design)
v.2.1.0
 we add 'analysis of outliers detection' since this release. These include some normality
tests, and some diagnostic plots for this functions, such as QQ plots and intra and
intersubject residual plots.
 fix intrasubject CV calculation based on ref. #6. (thanks to Helmut Schutz).
v1.5.0~2.0.3
 now �fz can be estimated from three methods: manual selections of the 3 exact data points,
computer selection based on adjusted R sq. (ARS), and the TwoTimesTmax (TTT) Method.
 restructure all codes of bear since v2.0.0.
 add R sq. in NCA output; the original one is adjusted R sq. & changed T1/2 to T1/2(z) in NCA
output file
 corrected some typo errors appearing in the output files or console display
 rearrange the output files with better styles: such as 3decimal digits for 'power', etc.
 builtin the data file (.RData) required for demo purposes; user doesn't need to enter/import
/load it again
 manual selection of the 3 exact data points can be saved now. user does not have to redo it
next time.
 displayed the method used to estimate �fz in NCA output
 changed '0.693' to ln(2) when estimating T1/2(z) (= ln(2)/�fz) in NCA algorithm
 changed LSMref and LSMtest to LSMEANref and LSMEANtest, respectively, in the output file
of 'Statistical_Summaries.txt'
 and many more that I just cannot remember right now...
v1.1.5
 fixed the anova (lm) calculation due to the import of a .csv file. (thanks to Ji?i Hofmann,
Czech Republic)
 added Type III SS (suggested by EIMaestro)
 changed upper bound of sample size estimation from 105% to 95% (more conservative; suggested
by Helmut Schutz)
v1.1.4
 fixed the compatibility for iMac and Linux (thanks to Koji Shimamoto, Tokyo, Japan; also for
his testing bear on iMac)
v1.1.31.1.0
 removed the function of "Sample size estimation (raw data)"; also improve the function of
"Sample size estimation (Log Transform)."
 fixed the rounding error in the display of "Sample size estimation (Log transform)" (thanks
to Helmut Schutz)
 fixed some the format (comma, semicolon, etc.) of import data file (thanks to Helmut Schutz); users
now can choose their favorite formats.
 display the PATH where bear will import from and will output the all results to.
 display only one graphic devices (using PageDown & PageUp to change plots) (thanks to Helmut Schutz)
 display semilog (not linear) plots when choosing data points to do linear regression for
�fz in NCA (thanks to Helmut Schutz)
 calculate CV_intra & CV_inter now (thanks to Helmut Schutz)
 output both the .csv and the .RData file formats obtained from NCA; users can choose either
one for anova.
 use "Tests of SUBJECT(SEQUENCE) as an error term" in ANOVA output (thanks to Helmut Schutz)
 changed ANOVA(GLM) to ANOVA (lm) in the menu title (thanks to ElMaestro)

Todo lists (July 23, 2009)

 add configuration setup file (as .RData data frame) into bear. Use can create/edit this
configuration file. Once data has been imported, don't need to enter anything... just sit
back and watch.

References
1. Hauschke D, Steinijans VW, Diletti E and Burke M. Sample size determination for bioequivalence
assessment using a multiplicative model. J. Pharmacokin. Biopharm. 20:557561, 1992.
2. U.S. Dept of Health and Human Services, Food and Drug Administration, Center for Drug Evaluation and
Research. Guidance for industry. Statistical approaches to establishing bioequivalence, 2001.
3. Liu JP and Chow SC. Sample size determination for the twp onesided tests procedure in bioequivalence.
J. Pharmacokin. Biopharm. 20:101104, 1992.
4. Schuirmann DJ. A comparison of the two onesided tests procedure and the power approach for assessing
the equivalence of average bioavailability. J. Pharmacokin. Biopharm. 15:657680, 1987.
5. Chow SC, Liu JP. Design and Analysis of Bioavailability and Bioequivalence Studies. 2009; 3rd. ed., CRC
Press, Chapman & Hall/CRC.
6. Hauschke D, Steinijans V, Pigeot I. Bioequivalence Studies in Drug Development: Mehtods and
Applications, 2007; John Wiley & Sons Ltd.