simulation question

13 messages 11 people Latest: Feb 06, 2009

simulation question

From: Ethan Wu Date: February 05, 2009 technical
Dear users, I am trying to compareseveral specific PK/PD study designs by: -- run 200 simulations with the final model (develope from original dataset) -- fit the final model to the 200 simulated dataset To achieve above, I used $SIM SUBPROB 0 option however, nonmem would completely stop afterrunning intoestimationproblem atone specific simulation/estimation cycles, for some designs it stop even before 10th iterations. Is there anyway nonmem could continue go on? Or, does someone know alternative way to achieve the goal? thanks

Re: simulation question

From: Leonid Gibiansky Date: February 05, 2009 technical
You can use S+ (or R that has an advantage of being free) to control nonmem, but you may need a bit of programming. One possible scheme is to prepare template control stream (with $SIM SUBPROB=1 option) and then run the loop for(i in 1:NumerOfIterations) { # prepare control file from a template # (need to change random seed in the $SIM record) system(NonmemCOmmandToRunNonmem) } The control stream should include INFN routine or INFN block that outputs parameter estimates to some file (adds them to the file, not over-writes it). R (or S+) working directory should contain all the files needed to run nonmem (in R, use setwd(NonmemDirName) to do it) Leonid -------------------------------------- Leonid Gibiansky, Ph.D. President, QuantPharm LLC web: www.quantpharm.com e-mail: LGibiansky at quantpharm.com tel: (301) 767 5566 Ethan Wu wrote: > Dear users, > I am trying to compare several specific PK/PD study designs by: > -- run 200 simulations with the final model (develope from original > dataset) > -- fit the final model to the 200 simulated dataset > To achieve above, I used $SIM SUBPROB=200 option > however, nonmem would completely stop after running > into estimation problem at one specific simulation/estimation cycles, > for some designs it stop even before 10th iterations. > Is there anyway nonmem could continue go on? > Or, does someone know alternative way to achieve the goal? > thanks > >

simulation question

From: Ethan Wu Date: February 06, 2009 technical
Dear users, I am trying to compare several specific PK/PD study designs by: -- run 200 simulations with the final model (develope from original dataset) -- fit the final model to the 200 simulated dataset To achieve above, I used $SIM SUBPROB=200 option however, nonmem would completely stop after running into estimation problem at one specific simulation/estimation cycles, for some designs it stop even before 10th iterations. Is there anyway nonmem could continue go on? Or, does someone know alternative way to achieve the goal? thanks

Re: simulation question

From: Leonid Gibiansky Date: February 06, 2009 technical
You can use S+ (or R that has an advantage of being free) to control nonmem, but you may need a bit of programming. One possible scheme is to prepare template control stream (with $SIM SUBPROB=1 option) and then run the loop for(i in 1:NumerOfIterations) { # prepare control file from a template # (need to change random seed in the $SIM record) system(NonmemCOmmandToRunNonmem) } The control stream should include INFN routine or INFN block that outputs parameter estimates to some file (adds them to the file, not over-writes it). R (or S+) working directory should contain all the files needed to run nonmem (in R, use setwd(NonmemDirName) to do it) Leonid -------------------------------------- Leonid Gibiansky, Ph.D. President, QuantPharm LLC web: www.quantpharm.com e-mail: LGibiansky at quantpharm.com tel: (301) 767 5566 Ethan Wu wrote: > Dear users, I am trying to compare several specific PK/PD study designs by: -- run 200 simulations with the final model (develope from original dataset) > > -- fit the final model to the 200 simulated dataset > To achieve above, I used $SIM SUBPROB=200 option > > however, nonmem would completely stop after running into estimation problem at one specific simulation/estimation cycles, for some designs it stop even before 10th iterations. > > Is there anyway nonmem could continue go on? > Or, does someone know alternative way to achieve the goal? > thanks

Re: simulation question

From: Sebastian Ueckert Date: February 06, 2009 technical
Dear Ethan, the simplest solution to solve your problem would be to use the bootstrap command of PSN ( http://psn.sourceforge.net/). With PSN installed you would simply do: bootstrap final_model.mod -samples=200 PSN would take care of unsuccessful runs and provide a nice summary of the individual estimates. Best regards Sebastian
Quoted reply history
On Thu, Feb 5, 2009 at 11:18 PM, Ethan Wu <[email protected]> wrote: > Dear users, > I am trying to compare several specific PK/PD study designs by: > -- run 200 simulations with the final model (develope from original > dataset) > -- fit the final model to the 200 simulated dataset > To achieve above, I used $SIM SUBPROB=200 option > however, nonmem would completely stop after running > into estimation problem at one specific simulation/estimation cycles, for > some designs it stop even before 10th iterations. > Is there anyway nonmem could continue go on? > Or, does someone know alternative way to achieve the goal? > thanks > > >

RE: simulation question

From: Elodie Plan Date: February 06, 2009 technical
Dear Ethan, Perl-speaks-NONMEM (PsN) is a free program developed by Uppsala Research Pharmacometrics group. We recently added a module performing Stochastic Simulations followed by re-Estimations (SSE). The purpose is to investigate aspects related to simulation or estimation methods, models, study designs or statistical inference. I think it will solve your problem. You can download it here as well as find the sse userguide: http://psn.sourceforge.net/ What it does compared to NSUB=X is to run all problems in parallel, so a termination won't affect the others. And moreover it provides a summary with computations like bias etc... A simple single command will do the simulation and the re-estimation with the different designs: sse run1.mod -samples=200 -alt=run2.mod You can contact me or my colleagues for more details. Best regards, Elodie Elodie L. Plan, PharmD, MSc, PhDstudent ******************************************* Div. of Pharmacokinetics and Drug Therapy, Department of Pharmaceutical Biosciences, Faculty of Pharmacy, Uppsala University Box 591 - 751 24 Uppsala - SWEDEN Office +46 18 4714385 - Fax +46 18 4714003 ----------------------------------------------------
Quoted reply history
From: [email protected] [mailto:[email protected]] On Behalf Of Ethan Wu Sent: Thursday, February 05, 2009 11:19 PM To: [email protected] Subject: [NMusers] simulation question Dear users, I am trying to compare several specific PK/PD study designs by: -- run 200 simulations with the final model (develope from original dataset) -- fit the final model to the 200 simulated dataset To achieve above, I used $SIM SUBPROB=200 option however, nonmem would completely stop after running into estimation problem at one specific simulation/estimation cycles, for some designs it stop even before 10th iterations. Is there anyway nonmem could continue go on? Or, does someone know alternative way to achieve the goal? thanks

RE: simulation question

From: Jakob Ribbing Date: February 06, 2009 technical
Ethan, Sebastian is right that a non-parametric bootstrap may be suitable for determining the uncertainty in the population parameters. However, I got the impression that you wanted to investigate possible study designs on how informative they are for a future model-based analysis? If you would like to do simulation based on your current best guess of the model parameters (i.e. the point estimates) and you would like to do model based analysis of the future study in isolation, then PsN has another program which is highly efficient and would automatically provide you with summary statistics, without any programming required. This program is called sse for stochastic simulation and estimation: http://psn.sourceforge.net/PDF_docs/sse_userguide.pdf sse would also allow you to investigate the performance of alternative models, e.g. simulation with a two-compartment model and estimation with a one-compartment model, to see if CL can be estimated with good precision and low bias, even from the sparse data of a future study. You need to generate the data sets with the study designs yourself, but the rest is really slick. If you are planning to analyse the new study in conjunction with the currently-available data (i.e. a pooled analysis) there may be some clever way of tweaking sse into evaluating this, but I could not say exactly how to best achieve that. (maybe someone in Uppsala has a suggestion in that case) Best regards Jakob
Quoted reply history
________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Sebastian Ueckert Sent: 06 February 2009 09:51 To: Ethan Wu Cc: [email protected] Subject: Re: [NMusers] simulation question Dear Ethan, the simplest solution to solve your problem would be to use the bootstrap command of PSN ( http://psn.sourceforge.net/). With PSN installed you would simply do: bootstrap final_model.mod -samples=200 PSN would take care of unsuccessful runs and provide a nice summary of the individual estimates. Best regards Sebastian On Thu, Feb 5, 2009 at 11:18 PM, Ethan Wu <[email protected]> wrote: Dear users, I am trying to compare several specific PK/PD study designs by: -- run 200 simulations with the final model (develope from original dataset) -- fit the final model to the 200 simulated dataset To achieve above, I used $SIM SUBPROB=200 option however, nonmem would completely stop after running into estimation problem at one specific simulation/estimation cycles, for some designs it stop even before 10th iterations. Is there anyway nonmem could continue go on? Or, does someone know alternative way to achieve the goal? thanks

RE: simulation question

From: Martin Bergstrand Date: February 06, 2009 technical
Dear all, PsN is useful tool for this purpose but I think that the functionality that should be used is called "Stochastic Simulation and Estimation (SSE)". The Bootstrap functionality is primarily used for obtaining parameter uncertainties. A detailed userguide for the SSE functionality is presented at the PsN webpage (see link below). http://psn.sourceforge.net/PDF_docs/sse_userguide.pdf Write to the PsN mailing list if you experience any troubles and need help ([email protected]). Best regards, Martin
Quoted reply history
From: [email protected] [mailto:[email protected]] On Behalf Of Sebastian Ueckert Sent: Friday, February 06, 2009 10:51 To: Ethan Wu Cc: [email protected] Subject: Re: [NMusers] simulation question Dear Ethan, the simplest solution to solve your problem would be to use the bootstrap command of PSN ( http://psn.sourceforge.net/). With PSN installed you would simply do: bootstrap final_model.mod -samples=200 PSN would take care of unsuccessful runs and provide a nice summary of the individual estimates. Best regards Sebastian On Thu, Feb 5, 2009 at 11:18 PM, Ethan Wu <[email protected]> wrote: Dear users, I am trying to compare several specific PK/PD study designs by: -- run 200 simulations with the final model (develope from original dataset) -- fit the final model to the 200 simulated dataset To achieve above, I used $SIM SUBPROB=200 option however, nonmem would completely stop after running into estimation problem at one specific simulation/estimation cycles, for some designs it stop even before 10th iterations. Is there anyway nonmem could continue go on? Or, does someone know alternative way to achieve the goal? thanks

Re: simulation question

From: Marc Gastonguay Date: February 06, 2009 technical
Ethan, As Leonid suggests, you may want to control NONMEM runs using an external tool and an INFN routine for extraction of results. MIfuns, an open-source R package, provides functions for this sort of automation. Template INFN codes are provided as well. It's a free download: http://metruminstitute.org/downloads/index.shtml R is good choice for this purpose because you can also script tasks such as data preparation, post processing of output and graphics and table creation - all within the same language. Other options for this sort of automation use a variety of scripting languages. Some examples are: Perl-Speaks NONMEM (PSN), Wings for NONMEM (WFN) and others... see the PAGE website for links to these projects ( http://www.page-meeting.org/ ). Good luck, Marc Marc R. Gastonguay, Ph.D. President & CEO, Metrum Research Group LLC [www.metrumrg.com] Scientific Director, Metrum Institute [www.metruminstitute.org] Direct: 860-670-0744 Main: 860-735-7043 Email: [email protected]
Quoted reply history
On Feb 5, 2009, at 5:18 PM, Ethan Wu wrote: > Dear users, > I am trying to compare several specific PK/PD study designs by: > > -- run 200 simulations with the final model (develope from original dataset) > > -- fit the final model to the 200 simulated dataset > To achieve above, I used $SIM SUBPROB=200 option > > however, nonmem would completely stop after running into estimation problem at one specific simulation/estimation cycles, for some designs it stop even before 10th iterations. > > Is there anyway nonmem could continue go on? > Or, does someone know alternative way to achieve the goal? > thanks

Re: simulation question

From: Nick Holford Date: February 06, 2009 technical
Hi, I dont understand why this wasn't fixed in NONMEM VI. It was a well known bug in NONMEM V and has caused lots of grief for users. I hope the NONMEM VII developers have got this high on their list of NONMEM bugs that need to be fixed. Nick > > Dear users, I am trying to compare several specific PK/PD study designs by: -- run 200 simulations with the final model (develope from original dataset) > > > > -- fit the final model to the 200 simulated dataset > > To achieve above, I used $SIM SUBPROB=200 option > > > > however, nonmem would completely stop after running into estimation problem at one specific simulation/estimation cycles, for some designs it stop even before 10th iterations. > > > > Is there anyway nonmem could continue go on? > > Or, does someone know alternative way to achieve the goal? > > thanks -- Nick Holford, Dept Pharmacology & Clinical Pharmacology University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford

RE: simulation question

From: Ekaterina Gibiansky Date: February 06, 2009 technical
Yes, it is fixed in Nonmem VII. Katya -------------------------- Ekaterina Gibiansky Senior Director, PKPD, Modeling & Simulation ICON Development Solutions [email protected]
Quoted reply history
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Nick Holford Sent: Friday, February 06, 2009 6:39 AM To: [email protected] Subject: Re: [NMusers] simulation question Hi, I dont understand why this wasn't fixed in NONMEM VI. It was a well known bug in NONMEM V and has caused lots of grief for users. I hope the NONMEM VII developers have got this high on their list of NONMEM bugs that need to be fixed. Nick >> Dear users, >> I am trying to compare several specific PK/PD study designs by: >> -- run 200 simulations with the final model (develope from original >> dataset) >> -- fit the final model to the 200 simulated dataset >> To achieve above, I used $SIM SUBPROB=200 option >> however, nonmem would completely stop after running >> into estimation problem at one specific simulation/estimation cycles, >> for some designs it stop even before 10th iterations. >> Is there anyway nonmem could continue go on? >> Or, does someone know alternative way to achieve the goal? >> thanks >> >> >> > -- Nick Holford, Dept Pharmacology & Clinical Pharmacology University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford

Re: simulation question

From: Rob ter Heine Date: February 06, 2009 technical
Hi Ethan, If think you get the message "message issued from estimation step" you still have the $ESTIMATION block in your control stream, although you're using SIMONLY option. Try removing the $ESTIMATION block and try again. Perhaps you could post your control stream as well? Sincerely, Rob _______________________________ Rob ter Heine, MSc, PharmD Department of Pharmacology, Slotervaart Hospital Amsterdam, The Netherlands E: [email protected] T: +31-20-5124737 >>> Ethan Wu <[email protected]> 02/06/09 2:28 >>> Hi Robm the simulatio step runs fine as I checked by using SIMONLY the termination says "0PROGRAM TERMINATED BY OBJ ERROR IN NCONTR WITH INDIVIDUAL 16 ID=0.16000000E+02 NUMERICAL HESSIAN OF OBJ. FUNC. FOR COMPUTING CONDITIONAL ESTIMATE IS NON POSITIVE DEFINITE MESSAGE ISSUED FROM ESTIMATION STEP AT 0TH ITERATION, UPON EVALUATION OF GRADIENT WITH RESPECT TO OMEGA 0TRY SUBSTANTIALLY INCREASING "INITIAL ESTIMATE OF SIGMA" OR DECREASING "INITIAL ESTIMATE OF OMEGA""
Quoted reply history
________________________________ From: Rob ter Heine <[email protected]> To: [email protected]; [email protected] Sent: Friday, February 6, 2009 5:54:33 AM Subject: Betr.: Re: [NMusers] simulation question Dear Ethan, Have you tried removing the $ESTIMATION step and replace all values with your final estimations? What does your result file say after termination? Sincerely Rob >>> Sebastian Ueckert <[email protected]> 02/06/09 10:51 >>> On Thu, Feb 5, 2009 at 11:18 PM, Ethan Wu <[email protected]> wrote: > Dear users, > I am trying to compare several specific PK/PD study designs by: > -- run 200 simulations with the final model (develope from original > dataset) > -- fit the final model to the 200 simulated dataset > To achieve above, I used $SIM SUBPROB=200 option > however, nonmem would completely stop after running > into estimation problem at one specific simulation/estimation cycles, for > some designs it stop even before 10th iterations. > Is there anyway nonmem could continue go on? > Or, does someone know alternative way to achieve the goal? > thanks > > >

RE: simulation question

From: Serge Guzy Date: February 06, 2009 technical
Do you bootstrap the individual patients X times and then fit the model to these new datasets or do you simulate datasets based on the final population characteristics you already established? Both options are also automated in the PDX-MC-PEM program and I think also in SADAPT. Best Serge
Quoted reply history
________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Sebastian Ueckert Sent: Friday, February 06, 2009 1:51 AM To: Ethan Wu Cc: [email protected] Subject: Re: [NMusers] simulation question Dear Ethan, the simplest solution to solve your problem would be to use the bootstrap command of PSN ( http://psn.sourceforge.net/). With PSN installed you would simply do: bootstrap final_model.mod -samples=200 PSN would take care of unsuccessful runs and provide a nice summary of the individual estimates. Best regards Sebastian On Thu, Feb 5, 2009 at 11:18 PM, Ethan Wu <[email protected]> wrote: Dear users, I am trying to compare several specific PK/PD study designs by: -- run 200 simulations with the final model (develope from original dataset) -- fit the final model to the 200 simulated dataset To achieve above, I used $SIM SUBPROB=200 option however, nonmem would completely stop after running into estimation problem at one specific simulation/estimation cycles, for some designs it stop even before 10th iterations. Is there anyway nonmem could continue go on? Or, does someone know alternative way to achieve the goal? thanks -- The information contained in this email message may contain confidential or legally privileged information and is intended solely for the use of the named recipient(s). No confidentiality or privilege is waived or lost by any transmission error. If the reader of this message is not the intended recipient, please immediately delete the e-mail and all copies of it from your system, destroy any hard copies of it and notify the sender either by telephone or return e-mail. Any direct or indirect use, disclosure, distribution, printing, or copying of any part of this message is prohibited. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of XOMA.