{"id":2026,"date":"2026-03-22T09:21:54","date_gmt":"2026-03-22T15:21:54","guid":{"rendered":"https:\/\/rxkinetics.com\/blog\/?p=2026"},"modified":"2026-03-22T09:21:54","modified_gmt":"2026-03-22T15:21:54","slug":"bayesian-revisited","status":"publish","type":"post","link":"https:\/\/rxkinetics.com\/blog\/?p=2026","title":{"rendered":"Bayesian Revisited"},"content":{"rendered":"\n<p>About 30 years ago, a friend asked if I could add Bayesian analysis to my pharmacokinetic (PK) programs: \u201cLook at the equation\u2014it is very simple.\u201d Yes, deceptively so. By this same logic, Einstein&#8217;s Field Equations are also simple. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/Bayes.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"413\" height=\"227\" src=\"https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/Bayes.jpg\" alt=\"\" class=\"wp-image-2027\" srcset=\"https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/Bayes.jpg 413w, https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/Bayes-300x165.jpg 300w\" sizes=\"(max-width: 413px) 100vw, 413px\" \/><\/a><\/figure>\n\n\n\n<p>Of course, in both cases, implementation is exponentially more complex. I chose the <strong>Levenberg\u2013Marquardt <\/strong>(LM) Maximum A Posteriori (MAP) estimation because it is a fast and accurate optimizer and is considered the gold standard for therapeutic drug monitoring (TDM). MAP estimation finds the best-fit PK parameters given both observed data and the population model. Another way of putting it, MAP shrinks estimates toward the population mean, and that \u201cshrinkage\u201d is why it is so useful in TDM.<\/p>\n\n\n\n<p>LM uses gradient information\u2014it computes the Jacobian (partial derivatives of the predicted concentration with respect to each parameter) at every iteration and uses that to steer directly toward the minimum. This makes it fast and accurate in well-behaved models.<\/p>\n\n\n\n<p>However, least squares (Error\u00b2) penalizes outliers exponentially. Outliers create gradients that can pull the algorithm toward a nonsensical solution, or create local minima that the Jacobian calculation cannot \u201csee\u201d past.<\/p>\n\n\n\n<p>Users get frustrated when our Bayesian analysis software returns a \u201cBayesian failed\u201d message. In the classic Bayesian scenario, the fallback in the presence of an outlier is effectively a return to the population model. Obviously, that is not safe\u2014hence the \u201cBayesian failed\u201d message.<\/p>\n\n\n\n<p>The root of the problem is that vancomycin pharmacokinetics vary widely. In addition, failure to converge is more likely with fewer data points. Therefore, a single-point vancomycin analysis involving an outlier fails too often.<\/p>\n\n\n\n<p>I have always been dissatisfied with this outcome, as there was no fallback. Lately, I have been working on a safe alternative when the data fail to converge with LM. Here is a comparison of common methods for implementing Bayesian serum level analysis. Most are designed for population PK analysis, not individual patient TDM.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/CompareBayes.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"324\" src=\"https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/CompareBayes.jpg\" alt=\"\" class=\"wp-image-2028\" srcset=\"https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/CompareBayes.jpg 707w, https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/CompareBayes-300x137.jpg 300w, https:\/\/rxkinetics.com\/blog\/wp-content\/uploads\/2026\/03\/CompareBayes-500x229.jpg 500w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/a><\/figure>\n\n\n\n<p>I developed a small utility to compare the three most clinically useful Bayesian implementations, and they generally show agreement: <a href=\"https:\/\/www.rxkinetics.com\/files\/bayescompare.exe\" data-type=\"link\" data-id=\"https:\/\/www.rxkinetics.com\/files\/bayescompare.exe\">Bayesian PK Method Comparator<\/a><\/p>\n\n\n\n<p>I believe the <strong>Nelder\u2013Mead<\/strong> (downhill simplex) method can serve as a useful fallback, provided appropriate guardrails are in place. I am currently evaluating its integration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>About 30 years ago, a friend asked if I could add Bayesian analysis to my pharmacokinetic (PK) programs: \u201cLook at the equation\u2014it is very simple.\u201d Yes, deceptively so. By this same logic, Einstein&#8217;s Field Equations are also simple. Of course, &hellip; <a href=\"https:\/\/rxkinetics.com\/blog\/?p=2026\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[27,28],"class_list":["post-2026","post","type-post","status-publish","format-standard","hentry","category-software","tag-bayesian","tag-pharmacokinetics"],"_links":{"self":[{"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2026"}],"collection":[{"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2026"}],"version-history":[{"count":5,"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2026\/revisions"}],"predecessor-version":[{"id":2033,"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2026\/revisions\/2033"}],"wp:attachment":[{"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rxkinetics.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}