+--------------------------------------------------------------------+
| |
| SIMULATION_1 EXAMPLE |
| |
+--------------------------------------------------------------------+
This is an example of simulation with population data. The presence
of the $SIMULATION record causes NONMEM to generate DV data items.
The data set in file SIMORIG may contain nulls in the DV column.
Table file SIMDATA1 is created. It is similar to SIMORIG, except that
the DV column contains the simulated observations. Because of the
option NOHEADER of $TABLE, table header lines are not present, and,
with the option NOPRINT, the table is not included in the NONMEM out-
put report. SIMDATA1 can be used in subsequent runs as an input file
for NONMEM analysis without further modification. These runs can
involve different initial estimates, different models, etc.
$PROBLEM Simulation of population data
$INPUT ID TIME WT AMT DV
$DATA SIMORIG IGNORE=#
$SUBROUTINE ADVAN1
$PK
CL=THETA(1)*EXP(ETA(1))
V=THETA(2)*EXP(ETA(2))
K=CL/V
S1=V
$ERROR
Y=F+F*EPS(1)
$THETA .0625 10
$OMEGA .09 .05
$SIGMA .01
$SIMULATION (9215690) ; seed 1-7 digits
$TABLE ID TIME WT AMT NOPRINT FILE=SIMDATA1 NOHEADER
Contents of SIMORIG (for the first two individuals) follow.
# ID TIME WT AMT DV
1 0 80 100 .
1 1 80 . .
2 0 75 100 .
2 2 75 . .
Contents of SIMDATA1 follow, with floating-point notation converted to
fixed-point notation for the convenience of the reader. With versions
of NONMEM prior to 7.4, this help item contained an incorrect set of
values. The correct values are as follows.
1. 0. 80. 100. 0.000 10.000 0.000 0.000
1. 1. 80. 0. 13.646 9.938 3.708 1.531
2. 0. 75. 100. 0.000 10.000 0.000 0.000
2. 2. 75. 0. 8.379 9.876 -1.496 -0.625
The last four columns are automatically included by NONMEM in every
table (unless the NOAPPEND option is used). They are: DV (simulated
values), PRED (calculated using zeros for etas and epsilons), RES, and
WRES. The DV, RES, and WRES colunns are zero for dose event records.
The last three columns may be ignored (or the DROP option of $INPUT
may be used) when the file is subsequently used. Alternately, list DV
on the $TABLE record, and include the option NOAPPEND.
It is possible to display simulated values of PRED-defined variables.
With NM-TRAN, simulated etas are automatically displayable.
Add the following to the $ERROR block to capture simulated epsilons as
ERROR-defined items:
EP1=EPS(1)
One may change the $SIMULATION and $TABLE records as follows.
$SIMULATION (9215690) ONLYSIM
$TABLE ID TIME WT AMT CL V ETA1 ETA2 EP1
NOPRINT FILE=SIMDATA1 NOHEADER
Displayed values of CL, V, ETA1, ETA2, and EP1 are simulated values.
Without the ONLYSIM option of $SIMULATION, the displayed values are
typical values.
(See Simulation example 2, Simulation example 3).
REFERENCES: Guide IV Section III.B.13, IV.I
REFERENCES: Guide V Section 12.4.8
REFERENCES: Guide VI Section III.C, III.E, IV.B, IV.G.1
Go to main index.
Created by nmhelp2html v. 1.0 written by Niclas Jonsson (Modified by AJB 5/2006,11/2007,10/2012)