I’d like to output the dosing column in my rawsimtable and cannot figure out the appropriate syntax (in PML or otherwise). In nonmem I’d do something along the lines of if(AMT.GT.0) AMTX = AMT and table out amount. When I table out the dosepoint Aa/A1 etc it gives me the amounts in the compartment rather than the actual dosing itself. I don’t know if phoenix has an internal flag or something that is accessible via PML?
You could duplicate the AMT column and then include it as a sort or covariate. That should add it to the output file. -Nathan
I do realize there are some hacky/manual ways, though I am hesitant to map as a covariate as you could run into issues with the forward/backward propogation of the covariate value if you ask for times in your sim table that are not in your main sheet. I also don’t really understand how you envision using sort? Say you have a loading dose and then some additional doses how would you use sort to output that? My ‘true’ purpose goes beyond just outputing the dosing. I’m also trying to understand how (if possible) to access some of the deeper underlying processes that PML could take advantage of. For example, I was hoping that it would be possible to be able to access information fed into dosepoint to handle other events (say inside a sequence statement) without actually having to make a separate ‘flag’/reset column. It just seems odd to me that you can map information into phx (eg Amt into dosepoint) yet have no control over recording or interacting with it during model execution.
Hi , if you try to apply a winnonlin model then you get code like this : see how the dosepoint has an argument called idosevar=AaDose This is supposed to track the dose given and then you can compute secondary parameters or whatever you see fit There is many possibilites we can try to help once we know more about what you are trying to achieve. Bests, Samer test(){ cfMicro(A1, Cl / V, Cl2 / V, Cl2 / V2, first = (Aa = Ka)) dosepoint(Aa, idosevar = AaDose) C = A1 / V error(CEps = 1) observe(CObs = C + CEps) stparm(Ka = tvKa * exp(nKa)) stparm(V = tvV * exp(nV)) stparm(V2 = tvV2 * exp(nV2)) stparm(Cl = tvCl * exp(nCl)) stparm(Cl2 = tvCl2 * exp(nCl2)) fixef(tvKa = c(, 1, )) fixef(tvV = c(, 1, )) fixef(tvV2 = c(, 1, )) fixef(tvCl = c(, 1, )) fixef(tvCl2 = c(, 1, )) secondary(Ke = tvCl/tvV) secondary(K12 = tvCl2/tvV) secondary(K21 = tvCl2/tvV2) secondary(Ktot = K12+K21+Ke) secondary(r1 = (Ktot^2-4K21Ke)^0.5) secondary(Alpha = (Ktot+r1)/2) secondary(Beta = (Ktot-r1)/2) secondary(Gamma = tvKa) secondary(a1 = (K21-Alpha)/(Beta-Alpha)) secondary(b1 = (K21-Beta)/(Alpha-Beta)) secondary(KaAlpha = tvKa/(tvKa-Alpha)) secondary(KaBeta = tvKa/(tvKa-Beta)) secondary(aa = KaAlphaa1) secondary(bb = KaBetab1) secondary(cc = -(aa+bb)) secondary(DoseOverVol = AaDose/tvV) secondary(A = DoseOverVolaa) secondary(B = DoseOverVolbb) secondary(C = DoseOverVolcc) secondary(AUC = DoseOverVol/Ke) secondary(Alpha_hl = log(2)/Alpha) secondary(Beta_hl = log(2)/Beta) secondary(Tmax = CalcTMax(A,Alpha, B, Beta, C, Gamma)) secondary(Cmax = Aexp(-AlphaTmax)+Bexp(-BetaTmax)+Cexp(-Gamma*Tmax)) secondary(Ke_hl = log(2)/Ke) secondary(Ka_hl = log(2)/tvKa) ranef(diag(nKa, nV, nV2, nCl, nCl2) = c(1, 1, 1, 1, 1)) }
Thanks Samer, Is there any documentation on how idosevar works? I just tried it out and got some unexpected outcomes: It seems to propagate the initial dose and does not record/note additional dosing. Likewise, it gives that dose value at every time, including overwriting other dosing events (though you can see the dose occurred via the TAD column properly recording) I attached a picture of the output from a simple 1 cmpt oral absorption model. You can see that the second dose is recorded as TAD resets properly, and concentrations spike, however the amt column (given as idosevar = amt) does not take any of those into account. Likewise, the Aa amount does correspond with the initial actual dose, but it is not reflected with the second dose. Any idea of whats going on?