recursion

3 messages 3 people Latest: May 23, 2011

recursion

From: Pierre-Olivier Tremblay Date: May 19, 2011 technical
Dear NONMEM users, I plan to use an inverse gaussian distribution as an empirical input function. I'd like to obtain the cumulative density function (or rather the percent absorbed in time) however, I'm not familiar with recursive functions in NONMEM. Would anyone be able to provide an example where a variable is updated and output at each time point so that: for time=t from 0 to n, the cumulated quantiy = quantity(t)+quantity(t-1) until t=n Best regards, Pierre-Olivier

Re: recursion

From: Indrajeet Singh Date: May 19, 2011 technical
Hi there If you look into NONMEM manual NONMEM Users Guide - Part VIII Page# 267,296, 405 you should see few examples of DO loop inclusion. Though my understanding was that NMTRAN does not recognize DO loops, so you may need to try and see if it works. Good Luck.
Quoted reply history
On Thu, May 19, 2011 at 1:16 PM, Tremblay, Pierre-Olivier < [email protected]> wrote: > Dear NONMEM users, > > I plan to use an inverse gaussian distribution as an empirical input > function. I'd like to obtain the cumulative density function (or rather the > percent absorbed in time) however, I'm not familiar with recursive > functions in NONMEM. Would anyone be able to provide an example where a > variable is updated and output at each time point so that: > > for time=t from 0 to n, the cumulated quantiy = quantity(t)+quantity(t-1) > until t=n > > Best regards, > > Pierre-Olivier > -- Indrajeet Singh,PhD Postdoctoral Research Associate Dept. of Pharmaceutical Sciences University at Buffalo

Re: recursion

From: Venkatesh. P Date: May 23, 2011 technical
Dear Pierre-Olivier, I had used the following function to calculate the cumulative hazard over time. You may have to adjust this code according to your model. IF(NEWIND.NE.2) LOC=0 ; Set LOCF value to 0 for new ID at time 0 IF(NEWIND.NE.2) TIM1=0 ; Set time value to 0 for new ID at time 0 IF(NEWIND.NE.2) CHZ1=0 ; Set CHZ value to 0 for new ID at time 0 CHZ2=BH*EXP(-BE*LOC) ; calculate cumulative hazard for each time TOCH=CHZ1+CHZ2*(TIME-TIM1) ; total cumulative hazard (CHZ) CHZ1=TOCH ; redefine previous CHZ to current TIM1=TIME ; redefine previous time to current time SUR= EXP(-TOCH) ; survival I hope this might work. Best Regards, Venkatesh Pilla Reddy PhD Fellow, Dept. of Pharmacokinetics, Toxicology and Targeting, University of Groningen, Antonius Deusinglaan 1, 9713 AV Groningen, The Netherlands --- On Thu, 19/5/11, Tremblay, Pierre-Olivier <[email protected]> wrote:
Quoted reply history
From: Tremblay, Pierre-Olivier <[email protected]> Subject: [NMusers] recursion To: [email protected] Date: Thursday, 19 May, 2011, 10:46 PM recursion Dear NONMEM users, I plan to use an inverse gaussian distribution as an empirical input function. I'd like to obtain the cumulative density function (or rather the percent absorbed in time) however, I'm not familiar with recursive functions in NONMEM. Would anyone be able to provide an example where a variable is updated and output at each time point so that: for time=t from 0 to n, the cumulated quantiy = quantity(t)+quantity(t-1) until t=n Best regards, Pierre-Olivier