Integer function and NEWIND/icall

2 messages 2 people Latest: Feb 14, 2007

Integer function and NEWIND/icall

From: Navin Goyal Date: February 13, 2007 technical
Hello, Could anyone please tell me how could i use an integer function in nonmem. I am trying to do some pop pkpd simulations In excel when I have Tabsolute > tmax, I can convert it to time lower than tmin by using integer function (if tabs>tmax INT(tabs-tmax)/24+1) I then use these integer values to get the time points after 24 48 or so on in terms of 24 hours. t'=tabs-(integer*24) I tried to do it by having multiple statements wherein ABST=TIME IF(TIME.GT.TMAX) ABST=TIME-24 IF(TIME.GT.TMAX+24) ABST=TIME-48 IF(TIME.GT.TMAX+48) ABST=TIME-72 IF(TIME.GT.TMAX+72) ABST=TIME-96 is this the only way or could i do it in some other way too. Also could someone please explain me as to what exactly are the "newind" and "ICALL"function. How would they help me in my simulations?? if there might be any example it would be great Thanks a lot

Re: Integer function and NEWIND/icall

From: Alison Boeckmann Date: February 14, 2007 technical
With NONMEM VI, the INT function can be used in abbreviated code. With earlier versions, the INT function could be used, but only in verbatim code. I think that this code computes ABST2 equal to ABST in your original email: ABST2=TIME IF (TIME.GT.TMAX) ABST2=TIME-(INT((TIME-TMAX)/24)+1)*24 ICALL is a variable that may be tested in abbreviated code. It tells what NONMEM is currently doing. A test for ICALL=0 or 1 allows (e.g.) initialization of your own variables; a test for ICALL=3 allows (e.g.) display of your variables when the run is finished, and so on. A test for ICALL=4 allows you to do something different during data simulation vs. data analysis. If all you are doing in the current run is simulation, then do not bother testing ICALL unless you are forced to (e.g., because of NMTRAN error messages having to do with nested IF statements and random variables.) NEWIND is a variable that may be tested in abbreviated code.It tells where you are in the data set: First record of the data set, start of an individual record that is not the first, or a data record that is not the first of any individual record. It is not generally used in simulation, because NONMEM knows when a new individual record starts and change the simulated ETA's for the new individual. THere are a number of examples of the use of NEWIND and ICALL among the examples in Guide VIII and on-line help. On Tue, 13 Feb 2007 15:00:43 -0500, "navin goyal" <[EMAIL PROTECTED]> said: > Hello, > Could anyone please tell me how could i use an integer function in > nonmem. > I am trying to do some pop pkpd simulations > In excel when I have Tabsolute > tmax, I can convert it to time lower > than tmin by using integer function (if tabs>tmax INT(tabs-tmax)/24+1) > I then use these integer values to get the time points after 24 48 or so > on > in terms of 24 hours. > t'=tabs-(integer*24) > > I tried to do it by having multiple statements wherein > ABST=TIME > IF(TIME.GT.TMAX) ABST=TIME-24 > IF(TIME.GT.TMAX+24) ABST=TIME-48 > IF(TIME.GT.TMAX+48) ABST=TIME-72 > IF(TIME.GT.TMAX+72) ABST=TIME-96 > > is this the only way or could i do it in some other way too. > > > Also could someone please explain me as to what exactly are the "newind" > and > "ICALL"function. How would they help me in my simulations?? > if there might be any example it would be great > > Thanks a lot -- Alison Boeckmann [EMAIL PROTECTED]