```From:"Hayashi, Naoto {PDMP~Basel}"
Subject:[NMusers] Simulation with a uniform distribution by NONMEM
Date:Mon, 14 Oct 2002 14:29:07 +0200

Dear All,

I like a simulation using NONMEM but I do not know how I can use
an uniform distribution for only one parameter.

Could I set only one parameter as uniform and the others as normal (lognormal) distribution?

I hope anybody can inform me of the method.  I like NONMEM much more than TS.

Best regards,
Naoto

------------------------------------
Naoto Hayashi, Ph.D.
F. Hoffmann-La Roche AG
Medical Science/Clinical Pharmacology (PDMP)
Bldg. 15/1.030 CH-4070 Basel Switzerland
Phone: ++41.61.688.20.92
Fax: ++41.61.688.10.43
___________________________________

From:"Bachman, William"
Subject: RE: [NMusers] Simulation with a uniform distribution by NONMEM
Date:Mon, 14 Oct 2002 11:12:39 -0400

Naoto,

See NONMEM Users Guide VII, p.87, \$SIMULATION.  A uniform distribution is
specified with the seed.  You can specify a normal distribution for one
parameter and uniform for another based on the order of the random seeds on
the \$SIMULATION record, e.g.
\$SIMULATION  (8892690) (227789 UNIFORM)

Note: the uniform seed cannot be the first seed, it must be the second or
higher seed.

See also the RANDOM subroutine on p. 244.  Here is an example of using
normal distribution for CL and V and uniform distribution for KA:

;Model Desc: SIMULATION OF NORMALLY & UNIFORMLY DISTRIBUTED PARAMETERS
;Project Name: example1
;Project ID: GM00-001

\$PROB RUN# 105 SIMULATION EXAMPLE
\$INPUT C ID TIME AMT WT APGR DV EVID MDV
\$DATA 002.CSV IGNORE=C
\$PK
;distributions of CL and V are normal
TVCL=THETA(1)
CL=TVCL*EXP(ETA(1))
TVV=THETA(2)
V=TVV*EXP(ETA(2))

;distribution of KA is uniform
TVKA=THETA(3)
KA=TVKA
IF (ICALL.EQ.4.AND.NEWIND.NE.2) CALL RANDOM (2,R)
IF (ICALL.EQ.4) KA=TVKA+0.25*R

S1=V
TAD=TIME ; for a single dose only

\$ERROR
DEL=0
IF(F.EQ.0) DEL=1
W1=1
W2=F
IPRED=F
IRES=DV-IPRED
IWRES=IRES/(W1+W2)
Y=F + W1*ERR(1); + W2*ERR(2)

\$THETA
(0, 1) ;CL
(0, 5) ;V
(0, 1) ;KA

\$OMEGA
0.16 ;[P]
0.16 ;[P]
\$SIGMA
6 ;[A]
; 0.04 ;[P]
;\$MSFI 001.MSF
;\$EST MAXEVAL=9999 PRINT=20 NOABORT POSTHOC MSF=104.MSF
\$SIMULATION (976543) (22391 UNIFORM) ONLYSIM