From:"Luciane Velasque" 
Subject:[NMusers] DV Simulation
Date:Mon, 20 May 2003 16:19:02 -0300

Dear NM users:
I have fit a model with some covariables and random effects.
Now I would like to validate my model againt another group of individuals.
Can I simulate the DV this new group of individuals using my model?
How can I ask NONMEM to do this?  
Luciane V

From: Nick Holford 
Subject: Re: [NMusers] DV Simulation
Date: Wed, 21 May 2003 08:55:58 +1200


You can certainly simulate the DV using the model you have developed. 
A good reason for doing this is to perform a predictive check i.e. when you simulate from
your model do the simulated observations resemble the original observations? There are
many ways of answering this question. A relatively simple one is to simulate 1000 DV
values at typical time points (e.g. the protocol observation times for your original data
set) then find the 95% prediction interval from these 1000 DVs and compare it with a
scatterplot of your original data. This is a form of internal validation that the model
and parameter estimates are adequate for your data. Because of the approximations NONMEM
has to make in its estimation you may be disappointed to find that the predictive check
fails. Simply looking at the scatterplot may show you that 95% of your observations do
not fall within the prediction intervals.

Note that even if your model passes this predictive check it does not say that your model
is more generally applicable e.g. to describe a new data set. The only way to test this
kind of external validity is to collect new data. Simulation is not enough.

Put the final estimates from NONMEM as initial estimates in your NM-TRAN control stream
then add this record:


It is helpful to put this record somewhere e.g. in $ERROR

REPI=IREP ; simulation replication index

You will also need to add a suitable $TABLE record e.g.


The $SIMULATION record uses 20030521 as a random number seed. You should replace this
with another big number if you want to create a different simulation data set.

The simulated DV values will appear in the table file. You will have to work out your own
method for extracting the DV values at each time point and working out the 95% prediction
interval. The REPI item in the table file can be helpful in distinguishing each of the
1000 replications.


Nick Holford, Dept Pharmacology & Clinical Pharmacology
University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand tel:+64(9)373-7599x86730 fax:373-7556


From:"Hutmacher, Matthew [Non-Employee/1820]" 
Subject:  RE: [NMusers] DV Simulation
Date:  Tue, 20 May 2003 16:58:08 -0500


To add to Nick's suggestion, as Nick states below:

'Put the final estimates from NONMEM as initial estimates in your NM-TRAN
control stream then add this record:


If you don't want to imput the final estimates from your previous NONMEM
into you simulation run by hand, you can use the $MSFI file.  For example 

$MSFI prevmodel.msf
$TABLE ... model.sim


From: "Luciane Velasque" 
Subject: Re: [NMusers] DV Simulation
Date:Tue, 21 May 2002 15:13:50 -0300

Nick & Matt

Thanks for your reply