I was hoping I could bring up some issues that I have run into with NLME. A brief bit of background. Currently I am trying to model a drug which has two formulations. I have been searching the internet for strategies to model two separate formulations and have come up with an approach that I coded in PML from a NONMEM example. Here is the link for those of you who are curious. (http://www.cognigencorp.com/nonmem/nm/99apr302002.html) test(){ deriv(A1 = - (Cl * C) + (Aa * Ka)- (Q * (C - C2))) urinecpt(A0 = (Cl * C)) deriv(Aa = - (Aa * Ka)) deriv(A2 = (Q * (C - C2))) C = A1 / V error(CEps = 0.15) observe(CObs = C * (1 + CEps)) dosepoint(Aa, bioavail = (F), idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate) C2 = A2 / V2 covariate(ENFORM) stparm(V = tvV * exp(nV)) stparm(Cl = tvCl * exp(nCl)) stparm(Ka1 = tvKa1 * exp(nKa1)) stparm(Ka2 = tvKa2 * exp(nKa2)) stparm(V2 = tvV2 * exp(nV2)) stparm(Q = tvQ * exp(nQ)) stparm(F = 1ENFORM + tvF(1-ENFORM)) Ka = Ka1ENFORM + Ka2(1-ENFORM) fixef(tvV = c(0, 386.938, )) fixef(tvCl = c(0, 32.7305, )) fixef(tvKa1 = c(0, 1.65235, )) fixef(tvKa2 = c(0, 1.65235, )) fixef(tvV2 = c(, 821.482, )) fixef(tvQ = c(, 38.8886, )) fixef(tvF = c(0,0.5,1)) ranef(diag(nV, nCl, nKa1, nKa2, nV2, nQ) = c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5)) } note: this code snippett will not run in QRPEM What is essentially occuring in the code is that ENFORM represents our enabled formulation as a categorical covariate. When ENFORM = 1, the bioavailability fraction (F) is fixed to 1. I do not have IV data. When ENFORM is equal to zero, the bioavailability fraction is a fit parameter and is fit as a relative bioavailability like term. My issue comes in to play where I know that simple first order absorption is not accounting for the absorption properly. Without modeling two different formulations as I have demonstrated here, I have seen significant decreases in -2LL when coding in parallel first order absorption processes as well as simultaneous and sequential first order and zero order processes. However for any of these more complex absorption models, they require a bioavailability term to determine the fraction absorbed by each absorption process whether both first order or a combination of first and zero order. So my question is this, Is anyone aware of a shortcut/trick in NLME where I can fit the two different formulations as I had in the code with a more complex absorption model that requires the bioavailability fraction to be utilized to drive the split absorption processes? Any and all comments would be appreciated. Thanks! Lance
Dear Lance Can you try the following code? Let me know if it helps. The idea is to multiply the bioavail by the faction that goes through SC route and IV route. As an example I put a zero order absoprtion with duration tlag followed by a first order absorption delayed by tlag. In the data set, you just put 2 dose column with the same total dose (attached excell template). I hope it helps. best serge test(){ deriv(A1 = - (Cl * C) + (Aa * Ka)- (Q * (C - C2))) urinecpt(A0 = (Cl * C)) deriv(Aa = - (Aa * Ka)) deriv(A2 = (Q * (C - C2))) C = A1 / V error(CEps = 0.15) observe(CObs = C * (1 + CEps)) #dosepoint(Aa, bioavail = (F), idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate) dosepoint(A1, bioavail = (1-fractionsc)F, duration = (tlag), idosevar = A1Dose, infdosevar = A1InfDose, infratevar = A1InfRate) dosepoint(Aa, tlag = (tlag), bioavail = (fractionsc)F, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate) stparm(fractionsc = tvfractionsc * exp(nfractionsc)) stparm(tlag = tvtlag * exp(ntlag)) fixef(tvfractionsc=c(0,0.5,)) fixef(tvtlag=c(,1,)) ranef(diag(nfractionsc,ntlag)=c(0.1,0.1)) C2 = A2 / V2 covariate(ENFORM) stparm(V = tvV * exp(nV)) stparm(Cl = tvCl * exp(nCl)) stparm(Ka1 = tvKa1 * exp(nKa1)) stparm(Ka2 = tvKa2 * exp(nKa2)) stparm(V2 = tvV2 * exp(nV2)) stparm(Q = tvQ * exp(nQ)) stparm(F = 1ENFORM + tvF(1-ENFORM)) Ka = Ka1ENFORM + Ka2(1-ENFORM) fixef(tvV = c(0, 386.938, )) fixef(tvCl = c(0, 32.7305, )) fixef(tvKa1 = c(0, 1.65235, )) fixef(tvKa2 = c(0, 1.65235, )) fixef(tvV2 = c(, 821.482, )) fixef(tvQ = c(, 38.8886, )) fixef(tvF = c(0,0.5,1)) ranef(diag(nV, nCl, nKa1, nKa2, nV2, nQ) = c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5)) } [file name=Worksheet.xls size=10752]Certara | Drug Development Solutions (10.5 KB)
I am hoping someone can me figure out how to code something in PML code that I have implemented in NONMEM. I think enough people on here speak both languages fluently to be of assistance I have been using the PML model code (and variations on this) that Serge provided prior to this posting (Thanks Serge!). What I would really like to do is assign separate thetas (and eta distributions) for absorption parameters based on formulation (FORM). A snippet of the NONMEM example looks something like so $PK TVCL = THETA (1) CL = TVCLEXP (ETA (1)) TVV2 = THETA (2) V2 = TVV2EXP (ETA (2)) TVQ = THETA (3) Q = TVQEXP (ETA (3)) TVV3 = THETA (4) V3 = TVV3EXP (ETA (4)) K = CL/V2 TVKA=THETA(5)FORM + THETA(6)(1-FORM) KA = TVKA EXP (ETA(5)FORM + ETA(6)(1-FORM)) F1 = 1FORM + THETA(7)*(1-FORM) ; Theta(5) is the bioavailability of DOSE=0 formulation relative to DOSE=1 S2=V2/1000 I cannot figure out how this would be analogously coded in PML. Any help one could provided would be much appreciated. Alternatively, if someone knows how to implement this code in NONMEM that was described by Serge previously, where we have a Fraction governing split absorption routes and a bioavailability term to describe the the relative bioavailability to a given formulation, you will recieve a gold star.
Hi, I am not fluent in NONMEM at all so I can’t be certain this is what you need, but I used the following code to simultaneously model a generic and innovator drug where F is the relative bioavailability of the generic to the brand. in this case concentration for the two formulations where in different concentration columsn but it does allow you to use the same systemic parameters lie CL and V since if its the same drug you would not expect clearnace or volume to differ…and just fit individual absorption rates and the relative b/a parameter. Hope this helps at least as starting point. test(){ deriv(A1 = - (Cl * C) + (Aa * Ka)- (Cl2 * (C - C2))) urinecpt(A0 = (Cl * C)) deriv(Aa = - (Aa * Ka)) deriv(A2 = (Cl2 * (C - C2))) deriv(A3 = (Aa2 * Ka2)- (Cl2 * (C3 - C4))- (Cl * C3)) deriv(Aa2 = - (Aa2 * Ka2)) deriv(A4 = (Cl2 * (C3 - C4))) urinecpt(A0ref = (Cl * C3)) C = A1 / V dosepoint(Aa, bioavail = (F), idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate) C2 = A2 / V2 error(CEps = 0.574727) observe(CObs1 = C * (1 + CEps)) C3 = A3 / V dosepoint(Aa2, bioavail = (1), idosevar = Aa2Dose, infdosevar = Aa2InfDose, infratevar = Aa2InfRate) C4 = A4 / V2 observe(CObs2 = C3 * (1 + 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(F = tvF * exp(nF)) stparm(Ka2 = tvKa2 * exp(nKa2)) fixef(tvV = c(, 225966, )) fixef(tvCl = c(, 42713.1, )) fixef(tvKa = c(, 3.97541, )) fixef(tvV2 = c(, 1131890, )) fixef(tvCl2 = c(, 77273.3, )) fixef(tvF = c(, 0.813274, )) fixef(tvKa2 = c(, 0.604122, )) ranef(diag(nV, nCl, nKa, nV2, nCl2, nF, nKa2) = c(1, 1, 1, 1, 1, 1, 1)) }
Thanks Elliot, This seems to be an interesting approach, and one I hadn’t though of previously. That is to use the differential equations to describe separate absorption models. For clarification, do you need the DOSE in two separate columns depending on fomulation? Or just DV? To me this feels like you could code the differential eq. for the absorption as exotically as you would like, provided you specify where the dose goes to. The other column will recieve no dose and thus the absorption parameters used to code the absorption model for the other formulation would go to zero. Also, with your model, can you identify F coded as is? Do you get acceptable return codes? Convergence/parameter precision estimates? I suppose you might be able to given that you are using a single CL, CLd and V from both models to describe disposition and fixing the well performing fomulation to 1 would keep these parameters from floating. Thanks for the suggestions. Lance
Hi Lance, yes, in this case you woul dhave a different dosing column for each formulation. The F is a relative F and because it was a generic, the F is always expressed relative to a reference so that reference can be fixed at 1…but you could do the same for any two formulations and assign one as a the reference. What I found as a quick way to do this, is start in the graphical interface and then copy the model and past it alongside the original model and just rename the parameters appropriately. then switch to the code as textual and like 90% of the model code is there before you even code anything. Just a tip. Good luck. Elliot
Hi, Not sure if you still have questions I know NONMEM and PML very well I can help you translate: Note that in PML it is much easier to test for a covariate value or to specify conditional value TVKA=THETA(5)FORM + THETA(6)(1-FORM) or Ka = Ka1ENFORM + Ka2(1-ENFORM) or KA = ENFORM==1 ? Ka1 : KA2 (In NONMEM we can write IF THEN ELSE also in pml but I like the more concise way above) you can also try : stparm(Ka = ENFORM==1 ? tvKa1 * exp(nKa1) : tvKa2 * exp(nKa2) ) Bests, Samer
Thanks Samer, Do you specify this above in the differentials and use Ka to drive the differentials, but then specify separate fixed and random effects for Ka1 and Ka2 in the appropriate blocks? Lance
Hi Lance, There is many ways to achieve what you want. I was just illustrating one way to code defferent etas according to a covariate using the stparm statement. In PML you don’t need to have all DV’s in one column nore all doses in one column. A TYPEor CMT columns are not needed to flag which compartment this observation or dose belong to. NONMEM ID TIME AMT CMT 1 2 Phoenic PML ID TIME AMTIV AMTPO ( any name can be used ) etc. There is many emails in this thread let me know at what stage you are and I will try to help. Samer
Hi Samer, Here is the code I have based on your advice, thought I still think something is wrong or I have mis specified something. When run in Phoenix, the values stay pinned to the initial estimates and do not move. Any advice you might be able to provide would be awesome! Lance test(){ deriv(A1 = - (Cl * C)- (Q * (C - C2)) + (Aa1 * Ka)) deriv(A2 = (Q * (C - C2))) deriv(Aa1 = - (Aa1 * Ka)) Ka = Ka1FORM + Ka2(1-FORM) C = A1 / V error(CEps = 0.48901) observe(CObs = C * (1 + CEps)) dosepoint(Aa1, bioavail = (BA)) C2 = A2 / V2 covariate(FORM) stparm(V = tvV * exp(nV)) stparm(Cl = tvCl * exp(nCl)) stparm(Ka1 = tvKa1 * exp(nKa1)) stparm(Ka2 = tvKa2 * exp(nKa2)) stparm(V2 = tvV2 * exp(nV2)) stparm(Q = tvQ * exp(nQ)) stparm(BA = 1FORM + tvBA(1-FORM)) fixef(tvV = c(0, 33.3933, )) fixef(tvCl = c(0, 16.8123, )) fixef(tvV2 = c(, 159.172, )) fixef(tvQ = c(, 9.78656, )) fixef(tvBA = c(0,0.144452,1)) fixef(tvKa1 = c(0, 0.304145, )) fixef(tvKa2 = c(0, 0.660343, )) ranef(diag(nV, nCl, nV2, nQ, nKa1, nKa2) = c(0.47856698, 0.5715303, 1.0972792, 1.5988252, 0.59015926, 0.10582424)) }
would you be able to provide the dataset ? You can put fake data in it I need to double check if the model compiles fine and if mapping are done fine
Hi Samer, I sent you a dataset through email. Were you successful? Lance
I got the data it seems that there is lot of trailing doses ( after the last measured PK) these are not informative for the PK model. I suggest to develop the model on a subset representative dataset e.g. 10 patients from each formulation before trying the full dataset. Samer