# PML for absorption model with 2 first order absorption rate

**URL:** <https://forum.certara.com/t/pml-for-absorption-model-with-2-first-order-absorption-rate/3595>\
**Category:** PML School\
**Created:** [March 17, 2022, 4:50pm UTC](https://forum.certara.com/t/pml-for-absorption-model-with-2-first-order-absorption-rate/3595 "2022-03-17T16:50:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidq8](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@davidq8](https://forum.certara.com/u/davidq8)\
**Post date:** [March 17, 2022, 4:50pm UTC](https://forum.certara.com/t/pml-for-absorption-model-with-2-first-order-absorption-rate/3595/1 "2022-03-17T16:50:41Z")

</div>

Hi, I am working on a population Pk model focusing on the absorption phase of an oral drug. I found this study with an interesting absorption scenario (please see figure):  
After oral administration, the drug goes to an absorption compartment with two depots (depots 1 and 2). Then the drug moves from depot 1 to 2 with Ka1 and Tlag and finally from depot2 to the central compartment with Ka2. So based on this scenario, we have two first-order absorption rates. My question can I get help on how to write PML lines that describe this process.  
I am also attaching the article for your reference.  
[pharmaceutics-12-00374-v234125.pdf](https://forum.certara.com/uploads/short-url/tPqSilounIMuEHsd2XgTNIok69M.pdf) (2.08 MB)

 ![figure.jpg](https://us1.discourse-cdn.com/certara/original/2X/0/07a18a3842c249108717f769d9ac5ae66d1982ca.jpeg)

---

<div class="post-metadata">

**Author:** ![cradhakr](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@cradhakr](https://forum.certara.com/u/cradhakr)\
**Post date:** [March 18, 2022, 11:41am UTC](https://forum.certara.com/t/pml-for-absorption-model-with-2-first-order-absorption-rate/3595/2 "2022-03-18T11:41:29Z")

</div>

Hi David,

Thanks for sharing the publication. I have attached the project file (simulation) based on the estimates from this paper using a graphical model

 ![Model.jpg](https://us1.discourse-cdn.com/certara/original/2X/7/7f513b1ea1cc7d89ef9913afe5e884f03afb7948.jpeg)

The PML code for this model is:

test(){  
deriv(A1 = - (Cl \* C) + (A2 \* Ka2))  
urinecpt(A0 = (Cl \* C))  
deriv(Aa = - (Aa \* Ka1))  
deriv(A2 = (Aa \* Ka1)- (A2 \* Ka2))  
C = A1 / V  
dosepoint(Aa, tlag = (Tlag), idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)  
error(CEps = 0.357)  
observe(CObs = C \* exp(CEps))  
stparm(V = tvV \* (1+(TotalProtein-7.6)\*dVdTotalProtein) \* exp(nV))  
stparm(Cl = tvCl \* (1+(TotalProtein-7.6)\*dCldTotalProtein) \* exp(nCl))  
stparm(Tlag = tvTlag \* exp(nTlag))  
stparm(Ka1 = tvKa1 \* exp(nKa1))  
stparm(Ka2 = tvKa2 \* exp(nKa2))  
fcovariate(TotalProtein)  
fixef(tvV = c(, 1717060.491, ))  
fixef(tvCl = c(, 447163.154, ))  
fixef(tvTlag = c(, 0.196, ))  
fixef(tvKa1 = c(, 3.187, ))  
fixef(tvKa2 = c(, 3.183, ))  
fixef(dVdTotalProtein(enable=c(0)) = c(, -1.049, ))  
fixef(dCldTotalProtein(enable=c(1)) = c(, -0.804, ))  
ranef(diag(nV, nCl, nTlag, nKa2, nKa1) = c(0.326, 0.16, 0.107, 0.557, 0.556))  
}

Simulation-based on this model

[attachment=3679:plots.jpg]

Please let me know if you need further assistance. Thanks and regards

Mouli  
[Simulation01.phxproj](https://forum.certara.com/uploads/short-url/6FvAwzkDNDsa7WND4KYJ7PTFZ9c.phxproj) (376 KB)

 ![plots.jpg](https://us1.discourse-cdn.com/certara/original/1X/e87557e242da207f78112eb76da46f21030e8c7e.jpeg)

---

<div class="post-metadata">

**Author:** ![davidq8](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@davidq8](https://forum.certara.com/u/davidq8)\
**Post date:** [March 18, 2022, 5:23pm UTC](https://forum.certara.com/t/pml-for-absorption-model-with-2-first-order-absorption-rate/3595/3 "2022-03-18T17:23:24Z")

</div>

Thank you Mouli for your time providing me a clear explanation on how to do this scenario using PML.

I have another question, I have been working on different absorption scenarios recently and I came up with this model :

cfMicro(A1, Cl / V, Cl2 / V, Cl2 / V2, first = (Aa = Ka))  
dosepoint(Aa, tlag = Tlag,duration = TK0 )  
C = A1 / V

The fit I got was a very good one but at that time I was thinking how to describe it. After reading the above article I came up with this possible explanation for this scenario:

After dosing the drug moves from depot 1 to 2 by zero order absorption rate (TK0) and Tlag and then from depot 2 to central compartment by first order absorption (Ka).

I am not sure if this explanation is quite accurate ?

Thanks
