
Transit compartment codes
#1
Posted 13 January 2022 - 07:08 PM
#2
Posted 13 January 2022 - 08:08 PM
Hi, I am building a population Pk model for an oral drug. The plasma concentration-time curve suggests two compartments for the Structural model. Adding a Tlag function to delay absorption has improved the fit; however, I believe modeling the absorption process using transit compartments models will improve the general fitting of the model. I need help to write the codes for the Transit compartments for extravascular administration with two compartments. I really appreciate help and suggestions.Thanks
Have you considered using a delay function instead?
https://onlinehelp.c...=delay&rhsyns=
#3
Posted 14 January 2022 - 09:24 AM
You did not provide an example Phoenix project file. Let me start with a standard 2-comp oral model in PML:
___________________________________
test(){
deriv(A1 = - (Cl * C) + (Aa * Ka)- (Cl2 * (C - C2)))
deriv(Aa = - (Aa * Ka))
deriv(A2 = (Cl2 * (C - C2)))
C = A1 / V
dosepoint(Aa, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)
C2 = A2 / V2
error(CEps = 1)
observe(CObs = C + CEps)
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
stparm(Ka = tvKa * exp(nKa))
stparm(V2 = tvV2 * exp(nV2))
stparm(Cl2 = tvCl2 * exp(nCl2))
fixef(tvV = c(, 1, ))
fixef(tvCl = c(, 1, ))
fixef(tvKa = c(, 1, ))
fixef(tvV2 = c(, 1, ))
fixef(tvCl2 = c(, 1, ))
ranef(diag(nV, nCl, nKa, nV2, nCl2) = c(1, 1, 1, 1, 1))
}
_________________________________________________
For a transit compartment, just add a transit statement:
--------------------------------------------------------------------------------------
test(){
#deriv(Aa = - (Aa * Ka))
transit(Aa, mtt, ntr, max=50, out=-Aa*Ka)
deriv(A1 = - (Cl * C) + (Aa * Ka)- (Cl2 * (C - C2)))
deriv(A2 = (Cl2 * (C - C2)))
C = A1 / V
dosepoint(Aa, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)
C2 = A2 / V2
error(CEps = 1)
observe(CObs = C + CEps)
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
stparm(Ka = tvKa * exp(nKa))
stparm(V2 = tvV2 * exp(nV2))
stparm(Cl2 = tvCl2 * exp(nCl2))
stparm(mtt = tvmtt)
stparm(ntr = tvntr)
fixef(tvV = c(, 1, ))
fixef(tvCl = c(, 1, ))
fixef(tvKa = c(, 1, ))
fixef(tvV2 = c(, 1, ))
fixef(tvCl2 = c(, 1, ))
fixef(tvmtt = c(,1,))
fixef(tvntr= c(,1,))
ranef(diag(nV, nCl, nKa, nV2, nCl2) = c(1, 1, 1, 1, 1))
}
----------------------------------------------------------------------------
For the delay-function that Keith suggested, a few additional changes need to be done:
-----------------------------------------------------------------------------
test(){
#deriv(A1 = - (Cl * C) + (Aa * Ka)- (Cl2 * (C - C2)))
#deriv(Aa = - (Aa * Ka))
delayInfCpt( A1, mtt, ntr, out = - Cl*C - (Cl2 * (C - C2)))
deriv(A2 = (Cl2 * (C - C2)))
C = A1 / V
dosepoint(A1, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)
C2 = A2 / V2
error(CEps = 1)
observe(CObs = C + CEps)
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
#stparm(Ka = tvKa * exp(nKa))
stparm(V2 = tvV2 * exp(nV2))
stparm(Cl2 = tvCl2 * exp(nCl2))
stparm(mtt = tvmtt)
stparm(ntr = tvntr)
fixef(tvV = c(, 1, ))
fixef(tvCl = c(, 1, ))
#fixef(tvKa = c(, 1, ))
fixef(tvV2 = c(, 1, ))
fixef(tvCl2 = c(, 1, ))
fixef(tvmtt = c(,5,))
fixef(tvntr= c(,10,))
ranef(diag(nV, nCl, nKa, nV2, nCl2) = c(1, 1, 1, 1, 1))
}
-----------------------------------------------------------------------------
Please let us know if you run into issues.
Bernd
#4
Posted 14 January 2022 - 04:00 PM
the online help has more background about PML syntaxt if you have not found this yet; https://onlinehelp.c...ment_models.htm
#5
Posted 11 February 2022 - 07:24 PM
Thanks, kniefort for your suggestion! I will try it.
Edited by Davidq8, 11 February 2022 - 07:28 PM.
#6
Posted 11 February 2022 - 07:27 PM
You did not provide an example Phoenix project file. Let me start with a standard 2-comp oral model in PML:
___________________________________
test(){
deriv(A1 = - (Cl * C) + (Aa * Ka)- (Cl2 * (C - C2)))
deriv(Aa = - (Aa * Ka))
deriv(A2 = (Cl2 * (C - C2)))
C = A1 / V
dosepoint(Aa, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)
C2 = A2 / V2
error(CEps = 1)
observe(CObs = C + CEps)
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
stparm(Ka = tvKa * exp(nKa))
stparm(V2 = tvV2 * exp(nV2))
stparm(Cl2 = tvCl2 * exp(nCl2))
fixef(tvV = c(, 1, ))
fixef(tvCl = c(, 1, ))
fixef(tvKa = c(, 1, ))
fixef(tvV2 = c(, 1, ))
fixef(tvCl2 = c(, 1, ))
ranef(diag(nV, nCl, nKa, nV2, nCl2) = c(1, 1, 1, 1, 1))
}_________________________________________________
For a transit compartment, just add a transit statement:
--------------------------------------------------------------------------------------
test(){
#deriv(Aa = - (Aa * Ka))
transit(Aa, mtt, ntr, max=50, out=-Aa*Ka)
deriv(A1 = - (Cl * C) + (Aa * Ka)- (Cl2 * (C - C2)))
deriv(A2 = (Cl2 * (C - C2)))
C = A1 / V
dosepoint(Aa, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)
C2 = A2 / V2
error(CEps = 1)
observe(CObs = C + CEps)
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
stparm(Ka = tvKa * exp(nKa))
stparm(V2 = tvV2 * exp(nV2))
stparm(Cl2 = tvCl2 * exp(nCl2))
stparm(mtt = tvmtt)
stparm(ntr = tvntr)
fixef(tvV = c(, 1, ))
fixef(tvCl = c(, 1, ))
fixef(tvKa = c(, 1, ))
fixef(tvV2 = c(, 1, ))
fixef(tvCl2 = c(, 1, ))
fixef(tvmtt = c(,1,))
fixef(tvntr= c(,1,))
ranef(diag(nV, nCl, nKa, nV2, nCl2) = c(1, 1, 1, 1, 1))
}----------------------------------------------------------------------------
For the delay-function that Keith suggested, a few additional changes need to be done:
-----------------------------------------------------------------------------
test(){
#deriv(A1 = - (Cl * C) + (Aa * Ka)- (Cl2 * (C - C2)))
#deriv(Aa = - (Aa * Ka))
delayInfCpt( A1, mtt, ntr, out = - Cl*C - (Cl2 * (C - C2)))
deriv(A2 = (Cl2 * (C - C2)))
C = A1 / V
dosepoint(A1, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)
C2 = A2 / V2
error(CEps = 1)
observe(CObs = C + CEps)
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
#stparm(Ka = tvKa * exp(nKa))
stparm(V2 = tvV2 * exp(nV2))
stparm(Cl2 = tvCl2 * exp(nCl2))
stparm(mtt = tvmtt)
stparm(ntr = tvntr)
fixef(tvV = c(, 1, ))
fixef(tvCl = c(, 1, ))
#fixef(tvKa = c(, 1, ))
fixef(tvV2 = c(, 1, ))
fixef(tvCl2 = c(, 1, ))
fixef(tvmtt = c(,5,))
fixef(tvntr= c(,10,))
ranef(diag(nV, nCl, nKa, nV2, nCl2) = c(1, 1, 1, 1, 1))
}-----------------------------------------------------------------------------
Please let us know if you run into issues.
Bernd
Thanks, Bernd, for providing codes for both models, I really appreciate your help!!
#7
Posted 11 February 2022 - 07:29 PM
the online help has more background about PML syntaxt if you have not found this yet; https://onlinehelp.c...ment_models.htm
Thanks Simon for sharing the link!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users