# NonLinear Ka

**URL:** <https://forum.certara.com/t/nonlinear-ka/3673>\
**Category:** PML School\
**Created:** [March 21, 2023, 6:38pm UTC](https://forum.certara.com/t/nonlinear-ka/3673 "2023-03-21T18:38:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vetpharma](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vetpharma](https://forum.certara.com/u/vetpharma)\
**Post date:** [March 21, 2023, 6:38pm UTC](https://forum.certara.com/t/nonlinear-ka/3673/1 "2023-03-21T18:38:05Z")

</div>

Hi,

I modeling a compound using pop PK which follows a non linear absorption. For dose dependent Ka, could you please confirm if the following syntax is correct?

test(){  
covariate(Dose)  
deriv(Aa = - Ka \* Aa)  
deriv(A1 = Ka \* Aa - Cl \* C)  
dosepoint(Aa)  
nlKa = tvKa \* (1-Dose/(Dose+D50))  
C = A1 / V  
error(CEps = 0.1)  
observe(CObs = C \* (1 + CEps))  
stparm(D50 = tvD50 \* exp(nD50))  
stparm(Ka = tvKa \* exp(nKa))  
stparm(V = tvV \* exp(nV))  
stparm(Cl = tvCl \* exp(nCl))  
fixef(tvKa = c(, 1, ))  
fixef(tvV = c(, 1, ))  
fixef(tvCl = c(, 1, ))  
fixef(tvD50 = c(,1,))  
ranef(diag(nV, nCl, nKa, nD50) = c(1, 1, 1, 1))

The model is not working so I would appreciate it if you help me to troubleshoot the problem.  
Is that correct to introduce D50 as a param?  
Is that correct to map Dose in Aa and also as covariate or I should separate them?

Regards  
Amir

---

<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:** [March 22, 2023, 9:12am UTC](https://forum.certara.com/t/nonlinear-ka/3673/2 "2023-03-22T09:12:18Z")

</div>

Hi Amir,

if you are interested in modeling nonlinear absorption, I would kindly refer you to exercise PK42 from the Gabrielsson book: “Pharmacokinetic and Pharmacodynamic Data Analysis - Concepts and Applications, 5th Edition, by Gabrielsson Johan and Daniel Weiner”

His implementation uses a different approach, e.g. saturating the amount of compound in the absorption compartment:

deriv(Aa = - Vm \* Aa / (Km + Aa))

You could define Vm and Km as population parameters, e.g. with random effects included.

I would suggest you apply this approach first and see whether it helps to represent your data.

Bernd

---

<div class="post-metadata">

**Author:** ![dlweiner](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@dlweiner](https://forum.certara.com/u/dlweiner)\
**Post date:** [March 22, 2023, 2:00pm UTC](https://forum.certara.com/t/nonlinear-ka/3673/3 "2023-03-22T14:00:26Z")

</div>

Amir,

As Bernd suggested, the G&B book has use of an MM model for this (PK42).

The parameterization you are using (1-Dose/(Dose+D50)) is more often used for modeling bioavailability (F). There are a few problems with your attempt at using this for Ka. The nonlinear function needs to be a structural parameter, not an eta (n). The function you are using is unitless, but Ka has units 1/time. Lastly, you are using 1’s (the default) for initial estimates, and that is often a problem.

Dan

---

<div class="post-metadata">

**Author:** ![vetpharma](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vetpharma](https://forum.certara.com/u/vetpharma)\
**Post date:** [March 22, 2023, 5:07pm UTC](https://forum.certara.com/t/nonlinear-ka/3673/4 "2023-03-22T17:07:25Z")

</div>

Hi Bernd and Dan,

Thanks for your recommendations, I will certainly try that. However, I have a problem with the model running.

The problem is same as when I try to define transit compartment in the model (below).

The model starts running but after the first iteration for a few seconds it turns back with terrible fitting. I am a bit in doubt in the model building for nonlinear Ka, so I asked you, but the same trend happened for transit compartment and delay function. Do you think that there is a problem or it is normal?

Transit(){  
#deriv(Aa = - Ka \* Aa)  
transit(Aa, mtt, ntr, max=50, out=-Ka \* Aa)  
deriv(A1 = Ka \* Aa - Cl \* C)  
dosepoint(Aa, idosevar=AaDose, infdosevar=AaInfDose, infratevar=AaInfRate)  
C = A1 / V  
error(CEps = 0.875127242290243)  
observe(CObs = C \* (1 + CEps))  
stparm(Ka = tvKa \* exp(nKa))  
stparm(V = tvV \* exp(nV))  
stparm(Cl = tvCl \* exp(nCl))  
stparm(mtt = tvmtt)  
stparm(ntr = tvntr)  
fixef(tvKa = c(, 0.728509724154436, ))  
fixef(tvV = c(, 0.0237209174816188, ))  
fixef(tvCl = c(, 0.0176748737356305, ))  
fixef(tvmtt = c(,2,))  
fixef(tvntr = c(,2,))  
ranef(diag(nV, nCl, nKa,) = c(0.36942176, 0.10711289, 0.47215645))  
}

Amir

---

<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:** [March 23, 2023, 2:04pm UTC](https://forum.certara.com/t/nonlinear-ka/3673/5 "2023-03-23T14:04:19Z")

</div>

Hi Amir,

we can only diagnose fitting problems with a Phoenix project file. If you can’t share publicly you may want to send it to [support@certara.com](mailto:support@certara.com)

Bernd
