IF function in NLME

Hello,

I am trying to add an IF function to a 2 compartment model after a single 30-min infusion. The IF function is for an additional clearance between hour 3 and 6 (i.e. a 3-hour hemodialysis) on top of a baseline clearance. I have data from the plasma, hemodialysis fluid during hour 3 and 6; and urine.

How do I write the code or edit in the graphical model for that additional clearance during hour 3 to 6?

Any help is appreciated!

Dear sinyinlim,

PML support various if constructs for a differential equation model the variable t is available and you can write things like that:

deriv(A) = -K10*A - (t >=3 | t<=6 )DIALYSISRATECONSTANTA

This only works if you have one dose and that indeed all your patients have had dialysis at the exact times between 3 and 6. So I don’t recommend this approach.

Alternatively, you might want to use a “covariate” that changes with time and that tells the model when dialysis in on or off and that can change between patients.

Without a working example, it is hard to help you

Dear Sinyinlim,

For a case like what you present I dealt with it the following way. I believe this is as was suggested above.

Inclusion of covariate for dialysis in the model:

test(){
covariate(CLdial)
CLtot = Cl + CLdial
deriv(A1 = - CLtot * C - Cl2 * (C - C2) - Cl3 * (C - C3))
deriv(A2 = Cl2 * (C - C2))
deriv(A3 = Cl3 * (C - C3))
dosepoint(A1)
C = A1 / V
C2 = A2 / V2
C3 = A3 / V3

Then CLdial covariate I included in the dosing schedule Data Worksheet; below dialysis is applied from 44 to 48 h, then again 92 to 96 h, post first dose. The covariate is then mapped in the “main” of the Phoenix model object.

Dose Time Concentration A1Rate CLdial mg h uL/mL mg/h L/h 500 0 250 0 43.9 0 44 12.6 47.9 12.6 500 48 250 0 91.9 0 92 12.6 95.9 12.6 750 96 375 0

Best,

Patrice

Dosing+Dialysis.xlsx (8.98 KB)[quote=“PJLARGER, username:pjlarger”]

Dear Sinyinlim,

For a case like what you present I dealt with it the following way. I believe this is as was suggested above.

Inclusion of covariate for dialysis in the model:

test(){
covariate(CLdial)
CLtot = Cl + CLdial
deriv(A1 = - CLtot * C - Cl2 * (C - C2) - Cl3 * (C - C3))
deriv(A2 = Cl2 * (C - C2))
deriv(A3 = Cl3 * (C - C3))
dosepoint(A1)
C = A1 / V
C2 = A2 / V2
C3 = A3 / V3

Then CLdial covariate I included in the dosing schedule Data Worksheet; below dialysis is applied from 44 to 48 h, then again 92 to 96 h, post first dose. The covariate is then mapped in the “main” of the Phoenix model object.

Dose Time Concentration A1Rate CLdial mg h uL/mL mg/h L/h 500 0 250 0 43.9 0 44 12.6 47.9 12.6 500 48 250 0 91.9 0 92 12.6 95.9 12.6 750 96 375 0

Best,

Patrice

Table text hardly readable, see attached as Excel file

[/quote]

Hi,

Thanks for the responses! I tried the first method with deriv(A) = -K10*A - (t >=3 | t<=6 )DIALYSISRATECONSTANTA, it does not work for some reason.

I tried the “covariate” method, however, based on Patrice suggestion, I was not able to estimate the dialysis clearance.

I ended up using the “covariate” method with the “covariate” being 1 and 0 (on and off dialysis), and have the software estimated my dialysis rate constant.

test(){
covariate(dial)
deriv(A1 = - (A1 * Ke)- (A1 * K12- A2 * K21)- (A1 * Knr)- (A1 * Kddial))
urinecpt(AUrine = (A1 * Ke))
deriv(A2 = (A1 * K12- A2 * K21))
urinecpt(Anr = (A1 * Knr))
urinecpt(Adialysis = (dial
A1 * Kd))
C = A1 / V

And in “dial” column in the data set, it’s 1 between time 3 to 6 or whatever the dialysis time is, and 0 outside of that.

That is correct. I should have indicated my model I used for simulation. CLdial is assumed to be known; it can allow to estimate CL but not CLdial.
Your modification will allow to estimate CLdial as well.
Best