I currently have a single dose data set that I am modeling recirculation using:
sequence{
sleep(Tbump);
EHC=Abile/tau;
sleep(tau);
EHC=0;
}
stparm( Tbump = tvTbump*exp(nTbump) )
stparm( tau = tvtau*exp(ntau) )
I’d like to know how to amend this code so that Tbump is executed relative to a dose in a multiple dosing data set, i.e. that the recirculation occurs at a specific time within a given distribution relative to a dosing event. Is there a difference notation that can be used? e.g. is there some way I can define TSLD and perpetuate the circulation effect that way?
Thanks. Perhaps I’m missing it, but I’m looking to use TSLD to define the value of Tbump in the sequence statement. is this syntax similar to the NONMEM syntax of using a ‘dummy’ derivative to define a lag time? I’m just missing how your code extends to the sequence statement and estimating Tbump as a value of TSLD. Apologies for any confusion. Thanks again.
Please find attached that shows how I believe you could handle that interesting problem. The issue is that putting on/off without stopping the numerical integration can cause instability. That is why we use the sequence that tells the program to stop after a specified sleeping period.
The code is quite tricky. Look at it and come back to me after for clarification.
In the code I wrote only one cycle on/off will be performed within each dosage interval which is I think what you want.
QRPEM fit very well when starting far away from the true while FOCE ELS had problems. Note that the model I wrote is not physiological at all. I just wanted to show you how to do it.
I cannot copy the code in any editor for some reason, then best I can do is to send you the project in 14 of course. We do not use anymore 13.
Is there any way you can paste the code in a text file? I only have 13 and our validation of 14 is still a ways back on the company list. I’m very interested to see your code though. I can get a version to run if I do:
sequence{
if (tsld==Tbump) {EHC=Abile/tau}
else if (tsld==(Tbump+tau)) {EHC=0}
else {EHC=0}
}
but I’m not sure this is effective within the NLME parameters and don’t want to let the model run until I see your code as it will likely take around 18hrs.
Unfortunately the code I wrote works only with 14 and the patch that will be released soon. This is because there were bugs that were fixed now in the patch.
Just for your information , here is the code you will be able to use once the patch 14 is released. You will need to first install 14 and then the patch.
First bug that was fixed is doafter did not work at a dose point. Second bug was while(1) did nto work and works in the patch. I will see if I can modify the code to have it working on 13 but the problem is the reset of the time to be tme after the dose.
best regards
Serge
test(){
deriv(tad=1)
deriv(A1=-Cl*C+EHC)
Abile=100
dosepoint(A1,doafter={tad=0})
C = A1 / V
error(CEps = 0.1)
observe(CObs = C*(1+CEps))
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
fixef(tvV = c(, 2, ))
fixef(tvCl = c(, 0.2, ))
ranef(diag(nV, nCl) = c(1, 1))
Abile=1
double(EHC)
sequence{
going through all the records
while(1) {
increase delat t by 0.1
sleep(0.1)
as long as the time after the dose is less than the total time Tbump + tau
than perform the following. Note that this will happen only one time within
hope it helps. The only issue with 13 was in fact the while(1) that did not work.
while(1) means do the loop as long as you have records in your data set (or times you still want to simulate). Here you need in 13 look at your max time point and use it in the loop as while(t<thatmaxtime)
Thanks Serge, this is great. I had run into the while(1) problem previously, so it’s good to know that it was actually a bug with 13. I have implemented a modified version of your script - it is running about 40min/iteration… Hopefully the results look good! Thanks again!
You are welcome. Let me know how it goes. I hope you click first on “initial estimates” to make sure you start with a good spot of initial estimates. Do not forget to change the initial estimates in the code if you change those in the "initial estimate"tab.