Replacement of values during simulation

5 messages 3 people Latest: Apr 26, 2011

Replacement of values during simulation

From: Elba Romero Date: April 23, 2011 technical
Dear nonmemusers: I’m performing some simulations in order to verify the behaviour of my model. My iDV and DV are time an concentration respectively. In my case it would be useful to replace all simulated data (DV) that have values less or equal than -3.9 by this value: -3.0. Does anybody could help me how to give this instruction to NONMEM7 in order to replace all this values during simulation? Thank you in advance! Elba PhD student UNAV

Re: Replacement of values during simulation

From: Nathan Teuscher Date: April 25, 2011 technical
Elba, In the $ERROR block you can add code such as the following: Y=F + F*ERR(1) + ERR(2) ; Replace values below -3.9 with -3.0 IF(Y.LE.-3.9) THEN Y=-3.0 ENDIF This can often be used to simulate the effect of an LOQ on the resulting dataset. Good luck! Nathan -- Nathan S. Teuscher, PhD Founder, PK/PD Associates www.learnpkpd.com blog.learnpkpd.com [email protected] Twitter: www.twitter.com/learnpkpd Facebook: http://www.facebook.com/pages/Learn-PKPD/184975014854559?v=wall YouTube Channel: www.youtube.com/learnpkpd
Quoted reply history
On Sat, Apr 23, 2011 at 11:53 AM, elba romero <[email protected]> wrote: > Dear nonmemusers: > > > > I’m performing some simulations in order to verify the behaviour of my > model. My iDV and DV are time an concentration respectively. > > In my case it would be useful to replace all simulated data (DV) that have > values less or equal than -3.9 by this value: -3.0. > > Does anybody could help me how to give this instruction to NONMEM7 in order > to replace all this values during simulation? > > > > Thank you in advance! > > > > Elba > > > > PhD student > > UNAV > > >

RE: Replacement of values during simulation

From: Elba Romero Date: April 25, 2011 technical
Dear Nathan and Nick: Thank you very much for your help. Finally I'm exploring the model under this conditions, and as Nathan explained before, I simulate the effect of an LOQ in my resulting dataset. The final code is this: LLOQ = LOG(0.020) ;LOW LIMIT OF QUANTIFICATION Y=IPRED+W*EPS(1) IF (ICALL.EQ.4)THEN ;Required to simulate IF (F.NE.0) Y=LOG(F) IF(Y.LE.LLOQ) THEN;Required to replace values lower or equal than LOQ Y = LLOQ ENDIFENDIF This instruction allow me to work with PsN and "play around" to know my model. I also try to use the code that Nick send me but it did not work. I wonder where is the problem, just to close the circle...Elba. Date: Sun, 24 Apr 2011 21:48:30 -0500 Subject: Re: [NMusers] Replacement of values during simulation From: [email protected] To: [email protected] CC: [email protected] Elba, In the $ERROR block you can add code such as the following: Y=F + F*ERR(1) + ERR(2) ; Replace values below -3.9 with -3.0 IF(Y.LE.-3.9) THEN Y=-3.0 ENDIF This can often be used to simulate the effect of an LOQ on the resulting dataset. Good luck! Nathan -- Nathan S. Teuscher, PhD Founder, PK/PD Associates www.learnpkpd.com blog.learnpkpd.com [email protected] Twitter: www.twitter.com/learnpkpd Facebook: www.facebook.com/pages/Learn-PKPD YouTube Channel: www.youtube.com/learnpkpd
Quoted reply history
On Sat, Apr 23, 2011 at 11:53 AM, elba romero <[email protected]> wrote: Dear nonmemusers: I’m performing some simulations in order to verify the behaviour of my model. My iDV and DV are time an concentration respectively. In my case it would be useful to replace all simulated data (DV) that have values less or equal than -3.9 by this value: -3.0. Does anybody could help me how to give this instruction to NONMEM7 in order to replace all this values during simulation? Thank you in advance! Elba PhD student UNAV

Re: Replacement of values during simulation

From: Nick Holford Date: April 25, 2011 technical
Elba, It's hard to understand what you are doing because you do not give all the details e.g. how is IPRED computed? I am guessing it might be LOG(F)? In the ICALL.EQ.4 block it would be clearer (to me) if you wrote the following: IF (IPRED.LT.LLOQ) THEN Y=LLOQ ENDIF What do you mean by "I also try to use the code that Nick send me but it did not work"? What exactly happens? Why do you think it does not work? Nick
Quoted reply history
On 25/04/2011 8:08 p.m., elba romero wrote: > Dear Nathan and Nick: > > Thank you very much for your help. Finally I'm exploring the model under this conditions, and as Nathan explained before, I simulate the effect of an LOQ in my resulting dataset. The final code is this: > > LLOQ = LOG(0.020) ;LOW LIMIT OF QUANTIFICATION > > Y=IPRED+W*EPS(1) > > IF (ICALL.EQ.4)THEN ;Required to simulate > IF (F.NE.0) Y=LOG(F) > IF(Y.LE.LLOQ) THEN;Required to replace values lower or equal than LOQ > Y = LLOQ > ENDIF > ENDIF > > This instruction allow me to work with PsN and "play around" to know my model. I also try to use the code that Nick send me but it did not work. I wonder where is the problem, just to close the circle... > > Elba. > > ------------------------------------------------------------------------ > Date: Sun, 24 Apr 2011 21:48:30 -0500 > Subject: Re: [NMusers] Replacement of values during simulation > From: [email protected] > To: [email protected] > CC: [email protected] > > Elba, > > In the $ERROR block you can add code such as the following: > > Y=F + F*ERR(1) + ERR(2) > ; Replace values below -3.9 with -3.0 > IF(Y.LE.-3.9) THEN > Y=-3.0 > ENDIF > > This can often be used to simulate the effect of an LOQ on the resulting dataset. > > Good luck! > Nathan > > -- > Nathan S. Teuscher, PhD > Founder, PK/PD Associates > www.learnpkpd.com http://www.learnpkpd.com/ > blog.learnpkpd.com http://blog.learnpkpd.com/ > [email protected] <mailto:[email protected]> > Twitter: www.twitter.com/learnpkpd http://www.twitter.com/learnpkpd > > Facebook: www.facebook.com/pages/Learn-PKPD < http://www.facebook.com/pages/Learn-PKPD/184975014854559?v=wall > YouTube Channel: www.youtube.com/learnpkpd < http://www.youtube.com/learnpkpd > On Sat, Apr 23, 2011 at 11:53 AM, elba romero < [email protected] < mailto: [email protected] >> wrote: > > Dear nonmemusers: > > I’m performing some simulations in order to verify the behaviour > of my model. My iDV and DV are time an concentration respectively. > > In my case it would be useful to replace all simulated data (DV) > that have values less or equal than -3.9 by this value: -3.0. > > Does anybody could help me how to give this instruction to NONMEM7 > in order to replace all this values during simulation? > > Thank you in advance! > > Elba > > PhD student > > UNAV -- Nick Holford, Professor Clinical Pharmacology Dept Pharmacology& Clinical Pharmacology University of Auckland,85 Park Rd,Private Bag 92019,Auckland,New Zealand tel:+64(9)923-6730 fax:+64(9)373-7090 mobile:+64(21)46 23 53 email: [email protected] http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford

RE: Replacement of values during simulation

From: Elba Romero Date: April 26, 2011 technical
Dear nonmemusers: First I want to apologize because my lacks of information when I ask for help making hard to all of you to understand what I’m trying to do. When I wrote ”I also try to use the code that Nick send to me but it did not work", means I was not able to figure out how to relate DV in the third conditional were I indicate the replacement of DV values, and replacement in this case did not happen. Definition of IPRED was the missing part I did not figure out before. This is my complete $ERROR code (IPRED is defined as Nick guessed): $ERROR (OBSERVATION ONLY) ADD = THETA(21) ; FROM IV ADMINISTRATION IF (PLGA.EQ.1) ADD = THETA(22) ; Intramuscular FORMULATION 1 IF (PLGA.EQ.2) ADD = THETA(23) ; Intramuscular FORMULATION 2 IF (PLGA.EQ.3) ADD = THETA(24) ; Subcutaneous FORMULATION 3 LLOQ = LOG(0.020) ;LOW LIMIT OF QUANTIFICATION IPRED = LOG(F) IRES=DV-IPRED W=ADD IWRES=IRES/W Y=IPRED+W*EPS(1) IF (ICALL.EQ.4)THEN ;REQUIRED TO SIMULATE IF (F.NE.0) Y=LOG(F) IF(Y.LT.LLOQ) THEN;REQUIRED TO REPLACE VALUES FOR LOQ Y = LLOQ ENDIF ENDIF Now I know the "LLOQ replace code" could be written also as: IF (ICALL.EQ.4)THEN ;REQUIRED TO SIMULATE IF (F.NE.0) Y=LOG(F) IF(IPRED.LT.LLOQ) THEN;REQUIRED TO REPLACE VALUES FOR LOQ Y = LLOQ ENDIF ENDIF Thank you very much for your help. Both codes work perfectly! Elba Date: Mon, 25 Apr 2011 21:26:15 +0200 From: [email protected] To: [email protected] Subject: Re: [NMusers] Replacement of values during simulation Elba, It's hard to understand what you are doing because you do not give all the details e.g. how is IPRED computed? I am guessing it might be LOG(F)? In the ICALL.EQ.4 block it would be clearer (to me) if you wrote the following: IF (IPRED.LT.LLOQ) THEN Y=LLOQ ENDIF What do you mean by "I also try to use the code that Nick send me but it did not work"? What exactly happens? Why do you think it does not work? Nick On 25/04/2011 8:08 p.m., elba romero wrote: Dear Nathan and Nick: Thank you very much for your help. Finally I'm exploring the model under this conditions, and as Nathan explained before, I simulate the effect of an LOQ in my resulting dataset. The final code is this: LLOQ = LOG(0.020) ;LOW LIMIT OF QUANTIFICATION Y=IPRED+W*EPS(1) IF (ICALL.EQ.4)THEN ;Required to simulate IF (F.NE.0) Y=LOG(F) IF(Y.LE.LLOQ) THEN;Required to replace values lower or equal than LOQ Y = LLOQ ENDIF ENDIF This instruction allow me to work with PsN and "play around" to know my model. I also try to use the code that Nick send me but it did not work. I wonder where is the problem, just to close the circle... Elba. Date: Sun, 24 Apr 2011 21:48:30 -0500 Subject: Re: [NMusers] Replacement of values during simulation From: [email protected] To: [email protected] CC: [email protected] Elba, In the $ERROR block you can add code such as the following: Y=F + F*ERR(1) + ERR(2) ; Replace values below -3.9 with -3.0 IF(Y.LE.-3.9) THEN Y=-3.0 ENDIF This can often be used to simulate the effect of an LOQ on the resulting dataset. Good luck! Nathan -- Nathan S. Teuscher, PhD Founder, PK/PD Associates www.learnpkpd.com blog.learnpkpd.com [email protected] Twitter: www.twitter.com/learnpkpd Facebook: www.facebook.com/pages/Learn-PKPD YouTube Channel: www.youtube.com/learnpkpd On Sat, Apr 23, 2011 at 11:53 AM, elba romero <[email protected]> wrote: Dear nonmemusers: I’m performing some simulations in order to verify the behaviour of my model. My iDV and DV are time an concentration respectively. In my case it would be useful to replace all simulated data (DV) that have values less or equal than -3.9 by this value: -3.0. Does anybody could help me how to give this instruction to NONMEM7 in order to replace all this values during simulation? Thank you in advance! Elba PhD student UNAV -- Nick Holford, Professor Clinical Pharmacology Dept Pharmacology & Clinical Pharmacology University of Auckland,85 Park Rd,Private Bag 92019,Auckland,New Zealand tel:+64(9)923-6730 fax:+64(9)373-7090 mobile:+64(21)46 23 53 email: [email protected] http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford