Hi Penny, I suspect you are right in your conclusion that number of records for each id matters in this case. My solution to your problem would be to add columns for IIV to your dataset outside of NONMEM. Quite easily done in R.
Use the rmvnorm R function to simulate your etas, 600 rows times as many etas you have require(mvtnorm) sigma<-diag(c(1,2,3)) ## example 3 etas , without block, variances 1,2 and 3 Etas<-rmvnorm(600,sigma=sigma) colnames(Etas)<-paste("ETAr",1:ncol(Etas),sep="") Then load your NONMEM datafile as is now with dosing and observational records, d0<-read.table(.....) Match each of the rows in Etas to ID in your data Etas2<-Etas[as.numeric(factor(d0$ID)),] and then append the simulated etas d1<-cbind(d0,Etas2) and then finaly save the d1 R data.frame as a text file using write.table. In your nonmem code you the just replace eta(1) with ETAR1, and so on. BW Magnus Åstrand Principal Clinical Pharmacometrician, Ph.D. _____________________________________________________________________________________________ AstraZeneca Innovative Medicines | Quantitative Clinical Pharmacology SE-431 83 Mölndal, Sweden T: +46 (0)31 776 23 41 Mob: +46 (0)708 467 667 magnus.astr...@astrazeneca.com Please consider the environment before printing this e-mail From: owner-nmus...@globomaxnm.com [mailto:owner-nmus...@globomaxnm.com] On Behalf Of Zhu, Penny Sent: den 9 mars 2017 19:19 To: nmusers@globomaxnm.com Subject: [NMusers] question about random seed for simulation Dear All I have finished a multiple dose simulation for 600 subjects and want to perform a single dose simulation (different sampling time) on the same subjects (same ETA as the first simulation). I used the same seed for the simulation step, it turned out the first subject was the same and the rest of the subjects are not and I am not sure whether this was due to the fact that the two simulation has different number TIME records. If so, I wonder what is the proper way to set the simulation seed so that the ETAs for the second simulation will be identical to the first one. I know that I could output the individual parameter estimate from the first simulation and import them into the second one. But I was thinking if the random seed can be synchronized between the two simulation, it could be an easier solution. Your help is very much appreciated! Thank you very much and best regards! Penny (Peijuan) Zhu, Ph.D. Associate Director Clinical Pharmacology Cell: 862-926-9079 PD Bio-Pharma CDMA Sandoz 1N025, 100 College Road West Princeton, NJ 08540 ________________________________ Confidentiality Notice: This message is private and may contain confidential and proprietary information. If you have received this message in error, please notify us and remove it from your system and note that you must not copy, distribute or take any action in reliance on it. Any unauthorized use or disclosure of the contents of this message is not permitted and may be unlawful.