RE: Problem of STS in NONMEM
Dear Anyue,
I think you are trying to make a short-cut to getting individual parameter estimates in one go. It maybe possible for someone more intelligent than me, but can I suggest just doing it the long way round by fitting the model to each individual in turn. Something like this should work if you use R:
two.st.par <- NULL
for(i in c(1:10)){
all.data <- read.csv("ALLDATA.csv",h=T)
one.data <- all.data[all.data$ID=i,]
write.csv(one.data,"i.data.csv",row.names=F,quote=F) # set $DATA i.data.csv in your control stream
# Summons NONMEM - I think in windows you might use shell rather than system?
system("nmfe73 run1.mod run1.lst",wait=TRUE) # Set $OMEGA 0 FIX in your model file, estimate residual with e.g. $SIGMA 0.1
param.out <- read.table("run1.ext",skip=1,h=T)
param.out <- param.out[param.out$ITERATION=-1000000000,]
param.out <- c(param.out$THETA1,param.out$THETA2)
two.st.par <- rbind(two.st.par,param.out)
}
then two.st.par contains individual parameter ests for each individual.
Best wishes,
Joe
Joseph F Standing
MRC Fellow, UCL Institute of Child Health
Antimicrobial Pharmacist, Great Ormond Street Hospital
Tel: +44(0)207 905 2370
Mobile: +44(0)7970 572435
Quoted reply history
________________________________________
From: owner-nmusers_at_globomaxnm.com [owner-nmusers_at_globomaxnm.com] On Behalf Of Anyue Yin [anyueyin929_at_gmail.com]
Sent: 22 December 2015 10:32
To: Mats Karlsson; Mills, Richard; Jeroen Elassaiss-Schaap (PD-value B.V.); R.terHeine_at_radboudumc.nl
Cc: nmusers_at_globomaxnm.com
Subject: Re: [NMusers] Problem of STS in NONMEM
Dear all,
Thanks for replying me.
I am trying to carry out the first stage of Standard Two Stage estimation method in NONMEM (i.e. estimate individual parameter by ID). For the sake of argument, let's assume that I have a data file which includes 10 subjects (ID from 1 to 10). Now I wish to estimate individual parameter by fitting each individual data, so I will be able to get 10 individual parameter estimates. But I found that these 10 individual parameter estimates were all around the initial value what I assigned to the THETA. For example, if I assign 20 to the initial value of THETA, then these 10 parameter estimates are all around 20. If I assign 30, then all around 30... It looks like NONMEM uses initial value of THETA as prior to estimate individual parameters. What I expect is to estimate individual parameters by ID, as if these 10 subjects are separated into 10 data file and estimate 10 times to get each result. So the key point of my question is individual parameter estimation by the first stage of STS in NONMEM. Thank you very much.
Sincerely,
Anyue
On Tue, Dec 22, 2015 at 5:33 PM, Mats Karlsson <Mats.Karlsson_at_farmbio.uu.se<mailto:Mats.Karlsson_at_farmbio.uu.se>> wrote:
Dear Anyue,
I dont know what you mean by the individual parameter estimate changed if I change the initial value of THETA
If you mean that individual ETA estimates change, that is expected when you change THETA. For CL and V to be the same, ETA need to change when THETA change. It may be that you are at local minima for EBEs. You may want to add MCETA00 on the $EST line in order to test more initial estimates. I would use MAXEVAL=0, not MAXEVAL99. Possibly I would use MAXEVAL99 after having fixed $OMEGA parameters to the high values you use now.
Best regards,
Mats
Mats Karlsson, PhD
Professor of Pharmacometrics
Dept of Pharmaceutical Biosciences
Faculty of Pharmacy
Uppsala University
Box 591
75124 Uppsala
Phone: +46 18 4714105<tel:%2B46%2018%204714105>
Fax + 46 18 4714003<tel:%2B%2046%2018%204714003>
http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
From: owner-nmusers_at_globomaxnm.com<mailto:owner-nmusers_at_globomaxnm.com> [mailto:owner-nmusers_at_globomaxnm.com<mailto:owner-nmusers_at_globomaxnm.com>] On Behalf Of Mills, Richard
Sent: Tuesday, December 22, 2015 8:54 AM
To: Anyue Yin; nmusers_at_globomaxnm.com<mailto:nmusers_at_globomaxnm.com>
Subject: RE: [NMusers] Problem of STS in NONMEM
Hi Anyue,
You need to amend MAXEVAL=0 in $EST (I suggest MAXEVAL99) in order to allow estimation.
Kind regards,
Richard
Richard Mills PhD
Senior Scientist, PKPDM&S
[cid:image001.jpg_at_01D13CA4.38DCE9C0]