# Enterohepatic Recycling - negative parameter problems

**URL:** <https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581>\
**Category:** Modelling and Simulation\
**Created:** [January 12, 2022, 5:45am UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581 "2022-01-12T05:45:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![joybaker](https://avatars.discourse-cdn.com/v4/letter/j/aca169/32.png) [@joybaker](https://forum.certara.com/u/joybaker)\
**Post date:** [January 12, 2022, 5:45am UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581/1 "2022-01-12T05:45:06Z")

</div>

Hi,

I have a question related with the Enterohepatic Recycling (PML School Lesson 7), I have a model with OCA and its two metabolites which both have EHC. I used normal model (nonEHC) and EHC in different format (simply EHC and EHC with bile/gut compartments). However, the fitting always gives negative values though in the structure they all suppose to be positive (exp sturcture). I tried to give 0 limit but other parameter will turn to negative instead.

[Test drug\_test sample.phxproj](https://forum.certara.com/uploads/short-url/n7fzKTjQmMLnW29gvAVChYVq3Wg.phxproj) (3.84 MB)

Thank you

Jo

[OCA POPPK model.pdf](https://forum.certara.com/uploads/short-url/TJf4N7Nu6TUzAGo7oS0H4mdp0y.pdf) (588 KB)

---

<div class="post-metadata">

**Author:** ![Samer\_Mouksassi](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Samer\_Mouksassi](https://forum.certara.com/u/Samer_Mouksassi)\
**Post date:** [January 12, 2022, 11:32am UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581/2 "2022-01-12T11:32:47Z")

</div>

link to the full fda review doc:

[https://www.accessdata.fda.gov/drugsatfda\_docs/nda/2016/207999Orig1s000ClinPharmR.pdf](https://www.accessdata.fda.gov/drugsatfda_docs/nda/2016/207999Orig1s000ClinPharmR.pdf)

I was part of the team who did the OCA consulting project but this was not in the public domain.

We can help in specific software related questions

---

<div class="post-metadata">

**Author:** ![joybaker](https://avatars.discourse-cdn.com/v4/letter/j/aca169/32.png) [@joybaker](https://forum.certara.com/u/joybaker)\
**Post date:** [January 13, 2022, 12:59am UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581/3 "2022-01-13T00:59:20Z")

</div>

Thank you for the information. The data and file are not from the this FDA review though. And the questions are connected with the software about how I can set the parameters so that it won’t give negative estimation for convergence. I hope this clarifies:)

> [@smouksassi1](#):
>
> link to the full fda review doc:
> 
> [https://www.accessdata.fda.gov/drugsatfda\_docs/nda/2016/207999Orig1s000ClinPharmR.pdf](https://www.accessdata.fda.gov/drugsatfda_docs/nda/2016/207999Orig1s000ClinPharmR.pdf)
> 
> I was part of the team who did the OCA consulting project but this was not in the public domain.
> 
> We can help in specific software related questions

---

<div class="post-metadata">

**Author:** ![kniefort](https://avatars.discourse-cdn.com/v4/letter/k/c68b51/32.png) [@kniefort](https://forum.certara.com/u/kniefort)\
**Post date:** [January 13, 2022, 2:34pm UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581/4 "2022-01-13T14:34:50Z")

</div>

> [@joybaker](#):
>
> Thank you for the information. The data and file are not from the this FDA review though. And the questions are connected with the software about how I can set the parameters so that it won’t give negative estimation for convergence. I hope this clarifies:)

Hi Joy, with respect to the negative parameters, I believe the issue is caused by the way volumes for compartments A2 and A3 are specified:

V2\_gly = V\_OCA \* KOG / KGO  
V3\_tau = V\_OCA \* KTO / KOT

Using the estimates from the paper, the product of V\_OCA multiplied by the ratio of rate constants gives V2 and V3 estimates of ~2200 and ~35 respectively, nowhere close to the reported values which are closer to V\_OCA.

I recoded your model to estimate V2\_gly and V3\_tau and it ran with no negative parameter values. I did not go any further, but agree with you that your model is probably overparameterized. Perhaps you can fix V2 and V3 and/or reparameterize from microconstants to clearances, or maybe others have ideas for how to code this.

Hope this helps!

Keith

[Test drug.phxproj](https://forum.certara.com/uploads/short-url/fvMVvW5mGv5AlYmPCk6Aa8HrZ4l.phxproj) (3.92 MB)

---

<div class="post-metadata">

**Author:** ![joybaker](https://avatars.discourse-cdn.com/v4/letter/j/aca169/32.png) [@joybaker](https://forum.certara.com/u/joybaker)\
**Post date:** [January 21, 2022, 4:37am UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581/5 "2022-01-21T04:37:06Z")

</div>

Thank you Keith, I think the major problem is over parameterization.

Another question to ask, if I have two switch point say have means at 4 and 12 h after dosing, is the following setting right?

double(Switch)  
Ri=4  
Ri1=12  
K\_BT = Switch/TAU  
K\_BG = Switch/TAU

sequence{  
Switch=0;  
sleep(Ri);  
Switch=1;  
sleep(TAU);  
Switch=0;

sleep(Ri1);  
Switch=1;  
sleep(TAU);  
Switch=0;

}

TAU=1.5 #TAU as 90 min

Jo

> [@kniefort](#):
>
> Hi Joy, with respect to the negative parameters, I believe the issue is caused by the way volumes for compartments A2 and A3 are specified:
> 
> V2\_gly = V\_OCA \* KOG / KGO  
> V3\_tau = V\_OCA \* KTO / KOT
> 
> Using the estimates from the paper, the product of V\_OCA multiplied by the ratio of rate constants gives V2 and V3 estimates of ~2200 and ~35 respectively, nowhere close to the reported values which are closer to V\_OCA.
> 
> I recoded your model to estimate V2\_gly and V3\_tau and it ran with no negative parameter values. I did not go any further, but agree with you that your model is probably overparameterized. Perhaps you can fix V2 and V3 and/or reparameterize from microconstants to clearances, or maybe others have ideas for how to code this.
> 
> Hope this helps!
> 
> Keith

---

<div class="post-metadata">

**Author:** ![bwendt](https://avatars.discourse-cdn.com/v4/letter/b/f4b2a3/32.png) [@bwendt](https://forum.certara.com/u/bwendt)\
**Post date:** [January 21, 2022, 6:38pm UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581/6 "2022-01-21T18:38:05Z")

</div>

Jo,

it is not clear what you want to achieve with the switch construction, perhaps you can explain in more detail. Right now it is switching on both rate constants from 4-5,5 and 17,5-19 hours. I have no idea if that would be of any use.

Bernd

---

<div class="post-metadata">

**Author:** ![joybaker](https://avatars.discourse-cdn.com/v4/letter/j/aca169/32.png) [@joybaker](https://forum.certara.com/u/joybaker)\
**Post date:** [January 22, 2022, 4:16am UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581/7 "2022-01-22T04:16:02Z")

</div>

The switch setting is based on the PML school setting (Lesson 7 ) but with a small twist that it removes the gut chamber.

Originally the meal was taken at 4 h after dosing, so the code is like this :

double(Switch)  
Ri=4  
K\_BT = Switch/TAU

sequence{  
Switch=0;  
sleep(Ri);  
Switch=1;  
sleep(TAU);  
Switch=0;  
}

TAU=1.5 #TAU as 90 min

The “switch” was only on at 4 h for the duration of TAU.  
So what if the meal was taken at 4 h and 12 h after dosing, and the EHC is initiated at both 4 h and 12 h for the duration of 90 min?

Thank you,  
Jo

> [@bwendt\_1](#):
>
> Jo,
> 
> it is not clear what you want to achieve with the switch construction, perhaps you can explain in more detail. Right now it is switching on both rate constants from 4-5,5 and 17,5-19 hours. I have no idea if that would be of any use.
> 
> Bernd

---

<div class="post-metadata">

**Author:** ![bwendt](https://avatars.discourse-cdn.com/v4/letter/b/f4b2a3/32.png) [@bwendt](https://forum.certara.com/u/bwendt)\
**Post date:** [January 25, 2022, 9:35am UTC](https://forum.certara.com/t/enterohepatic-recycling-negative-parameter-problems/3581/8 "2022-01-25T09:35:14Z")

</div>

Jo,

you need to factor in the Tau period when calculating the intervals of meals.

Here is a code that I would use for that:

test(){  
double(Switch)  
deriv(A1 = - (Cl \* C)- (Cld \* (C - Ct))- (A1 \* K1g) + (Agut \* Ka))  
urinecpt(A0 = (Cl \* C))  
deriv(A2 = (Cld \* (C - Ct)))  
deriv(Abile = (A1 \* K1g)- (Abile \* Rate))  
deriv(Agut = (Abile \* Rate)- (Agut \* Ka))  
C = A1 / V  
double(dosetime)  
dosepoint(A1, dobefore={dosetime=t},idosevar = A1Dose, infdosevar = A1InfDose, infratevar = A1InfRate)  
tad=t-dosetime  
Ct = A2 / Vt  
error(CEps = 0.2)  
observe(CObs = C \* (1 + CEps))  
Ri1=4  
Ri2=12  
rest=period-Ri1-Ri2-Tau  
Rate = Switch / Tau  
sequence{  
while(1)  
{  
Switch=0  
sleep(Ri1)  
Switch=1  
sleep(Tau)  
Switch=0  
sleep(Ri2-Tau)  
Switch=1  
sleep(Tau)  
Switch=0  
sleep(rest)  
}  
}  
stparm(V = tvV_exp(nV))  
stparm(Cl = tvCl_exp(nCl))  
stparm(Vt = tvVt)  
stparm(Cld = tvCld)  
stparm(K1g = tvK1g)  
#stparm(GBr = tvGBr)  
stparm(Ka = tvKa)  
fixef(tvV = c(, 9, ))  
fixef(tvCl = c(, 3.5, ))  
fixef(tvVt = c(, 21, ))  
fixef(tvCld = c(, 15, ))  
fixef(tvK1g = c(, 1, ))  
#fixef(tvGBr = c(, 1, ))  
fixef(tvKa = c(, 1, ))  
fixef(Tau = c(, 1.5 ,))  
fixef(period = c(,24,))  
ranef(diag(nV,nCl) = c(0.3,0.1))  
}

Here is the outcome:

 ![ehc_peaks.gif](https://us1.discourse-cdn.com/certara/original/1X/f9df6f9fef30ff4340a74812ab0dff92aacc07de.gif)
