a R package for therapeutic drug monitoring
Download and how to install:
(Note: please remember to install JAGS first before doing the following steps.):
tdm for R is one of R packages.  However, it cannot be installed from R repository website since v3.0.4. Thus, please download and install it from here. Please read the contents following the file list panel for more installation details first. Since v3.0.8, users need to install GTK+/gtk2 libraries to run GUI. No need to download the file again since it has been displayed on screen. The file - NEWS includes the change history. You can also type help("INSTALL") or help("install.packages") in R Console for information on how to install packages from this directory. After installation, you now can run tdm by simply typing "library(tdm)" under R Console.
Update History:
Update Log
3.1.4 01-12-2021 added messages about "adjusted tau" (as a reasonable 'tau',such as q8h,q12h or q24h, etc.) for aminoglycosides/vancomycin when running Sawchuk-Zaske method; fixed the error after the 1st run when there is still no pt's list (dataset) at the working path (aminoglycosides/vancomycin); added 'MIC' explanations for aminoglycosides.
3.1.3 12-06-2020 modified 'sampling time (hr)' -> 'sampling time (hr) post ivf' with agv(); modfied mcmc.tdm.gui() with 'nChains = 4' & 'numSavedSteps= 86000'; Added AUC24h for Vanco from M.P. Pai, et al., Innovative approaches to optimizing the delivery of vancomycin in individual patients,Adv. Drug Deliv. Rev. (2014),; added Sawchuk-Zaske method and Pai et al. (AUC(24h)/MIC, eq.4, Fig. 5) for Vanco (ref.: Pai MP, Neely M, Rodvold KA, Lodise TP. Innovative approaches to optimizing the delivery of vancomycin in individual patients. Adv Drug Deliv Rev. 2014 Nov 20;77:50-7. doi: 10.1016/j.addr.2014.05.016. Epub 2014 Jun 5. PMID: 24910345.); removed the Vanco file output of 'VanSSper.csv' (for debugging purposes); added mixed Sawchuk-Zaske method with Pai et al. AUC24h/MIC; added find.opt.tau() for Sawchuk-Zaske methods; added 'Cmax/MIC' for aminoglycosides; and also experimental implementation of 'T>MIC (%)' for later beta-lactams tdm.
3.1.2 06-10-2020 fixed lithium outputs for the obs vs. predicted conc.; added calculated AUC24h/MIC as PD therapeutic index for vanco; used the same infusion time as data input for dosage adjustments for aminoglycosides & vanco; changed the target Css trough of vanco therapeutic index from 6-10 mcg/mL to 15-20 mcg/mL; also the its plots; added PD therapeutic index of vanco (AUC(24h)/MIC) as 400-677; built for R v4.0.x;
3.1.1 09-10-2019 added sirolimus for Chinese renal transplant patients; re-route all outputs to GUI; no more outputs to R console/terminals; this significantly improved processing speed; fixed GUI layouts for all modules; fixed JAGS model with everolimus, phenytoin, carbamazepine, sirolimus for better Bayesian inferences.
3.1.0 08-01-2019 fixed ifx() mcmc.tdm.gui();fixed/simplified GUI layouts; and moved 'run' and 'exit' buttons of theophylline to the left of GUI.
3.0.9 10-05-2018 - fixed/re-arranged some GUIs layouts; - fixed crashed after the title page tested under macOS Mojave; - fixed valproate module; - converted all 'mcg/mL' -> '\U03BCg/mL'; - fixed ifx module.
3.0.8 09-17-2018 - created new function - mcmc.tdm() to simplify the codes;- quietly loaded gWidgets and gWidgetsRGtk2 with ifx(); - starting GUI for all tdm modules (single-subject with single sample); - remove all modules of single-subject with multiple samples; not supported any more since this release. - fixed indinavir model and enoxaparin models; - used ggmcmc to plot diagnostic plots for jags outputs.
3.0.7 12-03-2015 - created new function - mcmc.tdm() to simplify the codes; - fixed aminoglycosides; separated gentamicin/tobramycin/netilmicin/amikacin for y-label and other labellings, etc.; - fixed logo display; turned off graph display before entering top menu.
3.0.6 11-26-2015 - fixed graphic display mode (remove all, & from codes) to support RStudio's graphic display; should suggest that all users to install RStudio since this version; - fixed '' and 'PheDemo(); - fixed the flow of Cys-A dosage adjustment again; more make sense now; - added 'grDevices::windows.options(record=TRUE)' for Windows OS only; - fixed and its plots; Css_trough -> Css; as well as its example; - fixed NEWS content; newest is the last; - added C0_ss or C2_ss lines for Cys-A.
3.0.5 11-24-2015 - added simulation plots for all medication after parameter estimation, as well as changing dosage regimen or dosage adjustment; - fixed some errors of certain medications; such as unable to input data; - added MEC and MSC for all med.; and added therapeutic index bands/lines if possible; - fixed dosage adjustment of aminoglycosides to stick with Sawchuk-Zaske method; also plotted two therapeutic index bands; - no need to save the paramaters again using ''; - always sticked with the sequence of 'D -> C -> D -> C...' now when doing dosage adjustments; no more to reset the calculated D or C; - fixed tacrolimus with smaller Vd of 30 L (not its typcial value>6800L) to shorten the simulation time... otherwise, it takes a very long time to finish because its half-life is > 4000 hr; will be back to check this model again; - fixed Cys-A for C0 or C2 selection; as well as the dosage adjustment; - fixed all unit of 'mg/L' to 'mcg/mL'; though they are the same. - added three examples from built-in models;.
3.0.4 05-15-2014 fixed DESCRIPTION content.
3.0.3 05-15-2014 fixed package title as suggested; fixed run(); modified the content of DESCRIPTION;
3.0.2 05-15-2014 added 11 opioids tdm; fixed Tmax equation in some module; fixed some *.rd files; added simulation plots for opioids tdm in opioids tdm; improved appropriate dosage regimen selection in opioids tdm; adjusted the position of displayed texts in plots in opioids tdm; switched from lsoda(...) to lsode(...) in opioids tdm for solving differential equations; improved cl_F estimation with changing prior probability for cl_F of its JAGS model in opioids tdm; fixed simulation plots for multiple-dose with lsoda(..., events=...);
3.0.1 10-21-2013 fixed some tdm's input (used to be disabled for testing purpose); tested with JAGS v3.4.0 vs. JAGS v3.3.0 under Windows 7; found JAGS v3.4.0 may cause some models crashed; suggest to use JAGS v3.3.0 for stable concern; seems OK for linux or Mac OS X;fixed dose adjustment output formats;
3.0.0 09-23-2013 switch to JAGS from this release; unfortunately, warfarin PK/PD model is still not working yet with JAGS for the moment. It is removed from the list temporarily. I will try to solve this probelm later.
2.2.6 05-21-2013 this version added test runs for warfarin and also tune-up Bayesian model of warfarin. After library(tdm), user can type 'demo(warfarin)' is see the test runs.
2.2.5 03-04-2013 this version added test runs for phenytoin and also tune-up Bayesian model of phenytoin. After library(tdm), user can type 'demo(phenytoin)' is see the test runs.
2.1.1 11-20-2007 this version fixed warfarin problem that caused system hold when running it on R v2.6.0 with newly released BRugs. Also the function of multiple subjects with single dataset was removed in this version.
2.1.0 11-04-2007 This version fixed warfarin algorithm to work successfully with BRugs 0.4-1.
2.0.0 08-23-2007 Source codes of tdm were simplified for working effectively. For digoxin, models for pediatrics were removed, because models for adult also worked for estimating pediatric PK parameters. Considering using conveniently, function of summary outputs was removed.
1.2.1 07-09-2007 For better estimation results (smaller prediction errors than before), this version fixed theophylline salt form (IR tablet, iv infusion) and imatinib mesylate algorithms. Besides, settings of indinaivr were also modified again.
1.1.0 05-11-2007 For better estimation results (smaller prediction errors than before), this version fixed aminoglycoside, theophylline IR, imatinib mesylate and enoxaparin algorithms.  Besides, settings of Indinaivr and Enfuvirtide were also modified.  New function of summary outputs including individual information, estimated PK parameters with or without dose adjustment is displayed, and user can select them and save as a txt file.  Theophylline iv fusion has not been provided any more because it is unnecessary in practice. We also fixed some bugs including calculations of mm model and some interpretations.   Dose adjustment after calculating mm (estimate multiple subjects with multiple concentrations) data type was removed.
1.0.0 11-02-2006 First version of tdm is released in R website.