Hi Nick,
I think that this discrepancy is associated with the random number
generator.
Using NONMEM 7.2.0 and gfortran compilers, I have replicated the same
simulation (10 times) using a different seed number (1 to 10). The average %
of MIXEST =1 is closed to 50% (50.3%).
Roberto
Roberto Gomeni, PhD HDR
PharmacoMetrica
Longcol, 12270 La Fouillade (France)
E-mail: [email protected]
www.pharmacometrica.com
Next workshop on pharmacometrics: http://www.pharmacometrica.webs.com
-----Messaggio originale-----
Da: [email protected] [mailto:[email protected]] Per
conto di Nick Holford
Inviato: venerdì 25 gennaio 2013 09:51
A: nmusers
Oggetto: [NMusers] Mixture model simulation
Hi,
I've been puzzled by the behaviour of NONMEM when trying to simulate with a
mixture model.
The data file has 1000 subjects. I simulate 100 times (see control stream
below).
The overall number of subjects with MIXEST of 1 is 45%. There are no
simulated values of 99. All values are either 1 or 2.
I would expect about 50% of subjects to have MIXEST=1 in each replication.
There are many replications of 1000 subjects which do not have MIXEST=2.
This occurs with NONMEM 7.2.0 and both Intel and gfortran compilers.
What is the expected behaviour of MIXEST when ICALL.EQ.4?
Nick
-------mixtest.ctl---------
$PROB mixbug
$DATA mixtest.csv
$INPUT ID DV
$THETA
0.5
$OMEGA 0 FIX
$SIGMA 1 FIX
$PRED
IF (NEWIND.LE.1) MIXE=99
IF (ICALL.EQ.4) MIXE=MIXEST
REP=IREP
Y=THETA(1)+ETA(1)+EPS(1)
$MIX
NSPOP=2
P(1)=THETA(1)
P(2)=1-THETA(1)
$TABLE REP ID MIXE
NOAPPEND ONEHEADER NOPRINT FILE=mixbug.fit $SIM (1) ONLYSIM NSUB=100
-----mixtest.csv----
#ID, DV
1,.
2,.
...
1000,.
--
Nick Holford, Professor Clinical Pharmacology Dept Pharmacology & Clinical
Pharmacology, Bldg 503 Room 302A University of Auckland,85 Park Rd,Private
Bag 92019,Auckland,New Zealand
tel:+64(9)923-6730 fax:+64(9)373-7090 mobile:+64(21)46 23 53
email: [email protected]
http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford