NONMEM Users Network Archive

Hosted by Cognigen

Re: AW: Simulations with/without residual error

From: Jian Xu <alanub>
Date: Fri, 10 Jul 2009 06:11:10 -0700 (PDT)

Hi, Nick, This may work. In order to account for uncertainty to the ra=
ndom effect parameters, we can fix OMEGA and SIGMA to 1, and reparametrize =
them as THETA. Your example modified: $SIM (20090709) ONLYSIM SU=
BPROBLEMS=100 ; estimates of THETA and OMEGA from previous run $THE=
TA 1 ; POP_CL theta1 10 ; POP_V =
        theta2 0.2 ; Coefficient on CL ETA theta3 0.5 ; Coefficient on =
V ETA theta4 0.3 ; PROP_RV theta5 $OMEGA 1 ;FIX=
 ; PPV_CL eta1 1 ;FIX; PPV_V eta2 $S=
IGMA 1 ;FIX; PROP RV eps1 ;variance-covariance matrix o=
f the THETA estimates from previous run $OMEGA BLOCK(5) 0.2 ; UNC_POP=
_CL eta3 0.1 3 ; UNC_POP_V eta 4 0.08 0.2 0.7 ; UNC Coef_CL eta5 =

 PROP RV eta7 $PK ; get CL and V uncertainties IF (NEWIND.EQ.0) TH=
EN ; do this just once per subproblem UNCCL=THETA(1)+ETA(3) UNC=
V=THETA(2)+ETA(4) UNCLE=THETA(3)+ETA(5) UNVE=THETA(4)+ ETA(6)=

h uncertainty for CL and OMEGA V =UNCV*EXP(UNVE*ETA(2)) ; with =
uncertainty for V and OMEGA PROP=UNRV $ERROR IPRE=F Y=
=F*(1+PROP*EPS(1)) Cheers, Jian _________________=
_______________ From: Nick Holford <n.holford
rs <nmusers
ect: Re: AW: [NMusers] Simulations with/without residual error Andreas=
, Thanks for your comments. I am sorry I did not explain everything th=
at NONMEM was doing in this simple example. It does not shave my face (!) b=
ut it does recognize the covariance between the uncertainty estimates UNC_P=
OP_CL and UNC_POP_V when the values of ETA(3) and ETA(4) are sampled -- so =
the covariance of 0.1 in the OMEGA block defining parameter uncertainty is =
not ignored. NONMEM is doing exactly the same thing you describe in R -- it=
 is sampling from multivariate normal distributions. The code I gave w=
as just a simple example showing the idea. Of course, you can include the f=
ull variance-covariance matrix of the estimate from a previous run includin=
g the uncertainties in THETA, OMEGA and SIGMA (and their correlations). =

EGA and SIGMA, but it may not be so simple as for THETA. I personally have =
no experience of this. I am sure there are others who have done it who may =
wish to comment. Best wishes, Nick andreas.krause
n.com wrote: > > Nick, > > your example shows there is almost not=
hing you can not do with nonmem (maybe except shaving your face). > On th=
e other hand, even in the simple two parameter example you have off-diagona=
l covariance terms. > In your example code the value of 0.1 in the $OMEGA=
 block seems ignored (covariance pop CL and pop Vol). > > There would =
typically also be covariances between the pop parameters and the OMEGA and =
SIGMA blocks. > The latter are often small compared to other variance te=
rms but the proper way would be to draw from the full variance-covariance m=
atrix. > For now it seems best to draw multivariate Normals with full cov=
ariance matrices in some other environment like R and write the generated p=
opulation parameters to nonmem control streams. > Unless you find a way a=
gain of doing it all in nonmem. > > Best regards, > > And=
reas > > PS. Specifying the variance-covariance matrix to use it with =
$SIM might actually be a good candidate for the to-do list for nonmem VIII.=

ng and Simulation > > Actelion Pharmaceuticals Ltd / Gewerbestrasse 16=
 / CH-4123 Allschwil / Switzerland > andreas.krause
telion.com > > > > *Nick Holford <n.holford
 Sent by: owner-nmusers
> > To > nmusers <nmusers
Subject > Re: AW: [NMusers] Simulations with/without residual error=

t is not strictly true to say you cannot specify the parameter > uncertai=
nties from a previous run to be included in a simulation. > > If you t=
ake the variance-covariance matrix of the estimate from a > previous run =
('the uncertainty matrix') you can add it as an additional > OMEGA matrix=
 and use it to obtain parameter samples with uncertainty. > > e.g. wit=
h a very simple example with just two parameters. This will > simulate 10=
0 data sets and uncertainty to the THETA values for CL and V. > > $SIM=
 (20090709) ONLYSIM SUBPROBLEMS=100 > ; estimates of THETA and OMEGA fr=
om previous run > $THETA > 1 ; POP_CL theta1 > 10 ; POP_V theta2 >=
 $OMEGA > 0.5 ; PPV_CL eta1 > 0.5 ; PPV_V eta2 > ;variance-covarianc=
e matrix of the THETA estimates from previous run > $OMEGA BLOCK(2) > 0=
.2 ; UNC_POP_CL eta3 > 0.1 3 ; UNC_POP_V eta 4 > > $PK > ; get CL =
and V uncertainties > IF (NEWIND.EQ.0) THEN ; do this just once per subpr=
oblem > UNCCL=THETA(1)+ETA(3) > UNCV=THETA(2)+ETA(4) > ENDIF=

A(2)) ; with uncertainty for V > ... > > Nick > > > > =
andreas.krause
re hinting at the difference between simulation of a large > > population=
 and simulation of a study. > > > > The latter incorporates the added u=
ncertainty of the parameter estimates, > > as you point out. > > You wo=
uld simulate the population parameters with their uncertainties first > >=
 (from the "big covariance matrix" in nonmem) and then simulate the study=

> > Nonmem can only do the latter directly since you cannot specify the >=
> parameter uncertainties from a previous run to be included in the > > =
simulation. > > It is fairly straightforward though since the matrix refl=
ects a > > multivariate Normal distribution. > > > > Andreas > >=

and Simulation > > > > Actelion Pharmaceuticals Ltd / Gewerbestrasse 16=
 / CH-4123 Allschwil / > > Switzerland > > andreas.krause
 www.actelion.com > > > > > > > > -----owner-nmusers
 wrote: ----- > > > > > > To: <nmusers
ndreas lindauer" <lindauer
axnm.com > > Date: 2009-07-09 09:42 > > Subject: AW: [NMusers] Simulati=
ons with/without residual error > > > > Nick, > > Thank you very much=
 for your comments. > > Indeed for VPC et al. i always simulate with resi=
dual error. > > I understand that when one wants to simulate the 'true' v=
alue residual > > error > > is not needed. But what if one wants to sim=
ulate 'real' values which will > > be > > observed in a future study. F=
or example, you have a PK/PD model for an > > anti-hypertensive drug and =
want to predict how many subjects will attain a > > blood pressure below =
a pre-defined value. Wouldn't a simulation without > > residual error res=
ult in an overoptimistic prediction because in reality > > blood pressure=
 is measured with error? > > On the other hand, the estimated residual er=
ror does not only reflect > > measurement error but also model misspecifi=
cation etc.. So, might it be an > > option to simulate not with the estim=
ated residual error but rather with a > > residual error set to the impre=
cision of the measurement method? > > Best regards, Andreas. > > > >=

musers
g von Nick Holford > > Gesendet: Mittwoch, 8. Juli 2009 15:39 > > An: n=
musers > > Betreff: Re: [NMusers] Simulations with/without residual error=

 compare your simulations with actual observations then > > you should in=
clude residual error in the simulation. The observations > > will include=
 noise as well as the 'true' value so in order to compare > > observation=
s with simulated observations you need the residual error. > > > > If y=
ou want to use the simulation to describe the 'true' value then dont > > =
include the residual error. Residual error is assumed to have a mean of >=
> zero around the 'true' value so there is no point in adding this kind of=

r examples suggest to me that you are trying to predict the 'true' > > va=
lue -- not trying to match simulations directly with measured values. > >=
 If my guess is correct then you dont need to include residual error. > >=

eck > > (visual, numerical, statistical) that will be compared to distrib=
ution > > statistics of the observations then you should include residual=
 error. > > > > Nick > > > > andreas lindauer wrote: > > >> Dear=
 NMUSERS, > >> > >> > >> > >> The recent discussion about simulatio=
n with a nonparametric method > >> brought a general question concerning =
monte-carlo simulations into my > >> mind. When should simulations be per=
formed with residual error and > >> when not. I am especially interested =
in comments regarding the > >> following scenarios when the result of the=
 simulation should be > >> reported as mean or median and 90% prediction =
interval: > >> > >> 1. Simulated response at a particular time point (e=
g. Trough values) > >> > >> 2. Simulated response at a particular time =
point (x) relative to > >> baseline response (IPRED(t=x)/IPRED(t=0) v=
s. DV(t=x)/DV(t=0) ) > >> > >> 3. Simulated time of maximal respons=
e (eg. Tmax) > >> > >> > >> > >> > >> > >> Thanks and best rega=
rds, Andreas. > >> > >> > >> > >> > >> > >> ___________________=
_________ > >> > >> > >> > >> Andreas Lindauer > >> > >> > >>=



> >> > >> fax: + 49 228 73 9757 > >> > >> > >> > >> > >=
> -- > > Nick Holford, Professor Clinical Pharmacology > > Dept Pharma=
cology & Clinical Pharmacology > > University of Auckland, 85 Park Rd, Pr=
ivate Bag 92019, Auckland, New > > Zealand > > n.holford
 tel:+64(9)923-6730 fax:+64(9)373-7090 > > mobile: +33 64 271-6369 (Apr 6=
-Jul 20 2009) > > http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford=

smitted with it is strictly confidential and may be legally privileged. >=
> It is intended solely for the addressee. If you are not the intended rec=
ipient, any copying, distribution or any other use of this email is prohibi=
ted and may be unlawful. In such case, you should please notify the sender =
immediately and destroy this email. > > The content of this email is not =
legally binding unless confirmed by letter. > > Any views expressed in th=
is message are those of the individual sender, except where the message sta=
tes otherwise and the sender is authorised to state them to be the views of=
 the sender's company. For further information about Actelion please see ou=
r website at http://www.actelion.com > > > > > -- Nick Holford, Pro=
fessor Clinical Pharmacology > Dept Pharmacology & Clinical Pharmacology=

ealand > n.holford

nd.ac.nz/sms/pharmacology/holford > > > > The information of thi=
s email and in any file transmitted with it is strictly confidential and ma=
y be legally privileged. > It is intended solely for the addressee. If yo=
u are not the intended recipient, any copying, distribution or any other us=
e of this email is prohibited and may be unlawful. In such case, you should=
 please notify the sender immediately and destroy this email. > The conte=
nt of this email is not legally binding unless confirmed by letter. > Any=
 views expressed in this message are those of the individual sender, except=
 where the message states otherwise and the sender is authorised to state t=
hem to be the views of the sender's company. For further information about =
Actelion please see our website at http://www.actelion.com -- Nick H=
olford, Professor Clinical Pharmacology Dept Pharmacology & Clinical Phar=
macology University of Auckland, 85 Park Rd, Private Bag 92019, Auckland,=
 New Zealand n.holford
90 mobile: +33 64 271-6369 (Apr 6-Jul 20 2009) http://www.fmhs.auckland=
.ac.nz/sms/pharmacology/holford
Received on Fri Jul 10 2009 - 09:11:10 EDT

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: nmusers-request@iconplc.com.

Once subscribed, you may contribute to the discussion by emailing: nmusers@globomaxnm.com.