NONMEM Users Network Archive

Hosted by Cognigen

RE: simulation question

From: Serge Guzy <GUZY>
Date: Fri, 6 Feb 2009 09:48:48 -0800

This can be done automatically using either SADAPT or PDX-MC-PEM.
Both programs will give you also at the end an output summary (bias,
imprecision, etc...)

-----Original Message-----
From: owner-nmusers
On Behalf Of Leonid Gibiansky
Sent: Thursday, February 05, 2009 7:33 PM
To: Ethan Wu
Cc: nmusers
Subject: Re: [NMusers] simulation question

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)



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 Gibiansky, Ph.D.
President, QuantPharm LLC
e-mail: LGibiansky at
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

The information contained in this email message may
contain confidential or legally privileged information and is intended sole=
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 =
prohibited. Any views expressed in this message are those of the individua=
sender, except where the message states otherwise and the sender is
authorized to state them to be the views of XOMA.
Received on Fri Feb 06 2009 - 12:48:48 EST

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to:

Once subscribed, you may contribute to the discussion by emailing: