NONMEM Users Network Archive

Hosted by Cognigen

Re: simulation question

From: Leonid Gibiansky <LGibiansky>
Date: Thu, 05 Feb 2009 22:32:37 -0500

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
Received on Thu Feb 05 2009 - 22:32:37 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: