Dear NMusers,
I am developing a PK model using log-transformed single-dose oral data. My
question relates to using combined error model for log-transform data.
I have read few previous discussions on NMusers regarding this, which were
really helpful, and I came across two suggested formulas (below) that I tested
in my PK models. Both formulas had similar model fits in terms of OFV (OFV
using Formula 2 was one unit less than OFV using Formula1) with slightly
changed PK parameter estimates. My issue with these formulas is that the model
simulates very extreme concentrations (e.g. upon generating VPCs) at the early
time points (when drug concentrations are low) and at later time points when
the concentrations are troughs. These simulated extreme concentrations are not
representative of the model but a result of the residual error model structure.
My questions:
1. Is there a way to solve this problem for the indicated formulas?
2. Are the two formulas below equally valid?
3. Is there an alternative formula that I can use which does not have
this numerical problem?
4. Any reference paper that discusses this subject?
Here are the two formulas:
1. Formula 1: suggested by Mats Karlsson with fixing SIGMA to 1:
W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2)
2. Formula 2: suggested by Leonid Gibiansky with fixing SIGMA to 1:
W = SQRT(THETA(16)+ (THETA(17)/EXP(IPRE))**2 )
The way I apply it in my model is this:
FLAG=0 ;TO AVOID ANY CALCULATIONS OF LOG (0)
IF (F.EQ.0) FLAG=1
IPRE=LOG(F+FLAG)
W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2) ;FORMULA 1
IRES=DV-IPRE
IWRES=IRES/W
Y=(1-FLAG)*IPRE + W*EPS(1)
$SIGMA
1. FIX
Best regards,
Ahmad Abuhelwa
School of Pharmacy and Medical Sciences
University of South Australia- City East Campus
Adelaide, South Australia
Australia
Additive plus proportional error model for log-transform data
5 messages
5 people
Latest: Jun 02, 2016
Hi Ahmad,
The two error models are equivalent (only that with Leonids suggested code, the
additive-on-log-transformed error term (TH16) is estimated on variance scale,
instead of standard deviation scale (approximate CV).
This inflated error rates for very low concentrations is what you get for
additive+proportional on the log transformed scale, and I believe that has been
discussed on nmusers previously as well, many years ago.
You could possibly use a cut-off for when lower IPRE should not lead to higher
residual errors, but why not move to additive + proportional for the original
concentration scale?
Also, this implementation may be unfortunate:
> Y=(1-FLAG)*IPRE + W*EPS(1)
Effectively, when concentration predictions are zero (FLAG=1), e.g. for
pre-dose samples or before commence of absorption, then you set the
concentration prediction to EXP(1)=3.14 concentration units.
Depending on what concentration scale you work on (i.e. if BLQ is much higher
than this) it may be OK, but otherwise not.
Instead of applying a flag, just set IPRE to a negative value (low in relation
to LOG(BLQ)), if you want to stay on the log-transformed scale.
I hope this helps to solve your problem.
Best regards
Jakob
Jakob Ribbing, Ph.D.
Senior Consultant, Pharmetheus AB
Cell/Mobile: +46 (0)70 514 33 77
[email protected]
www.pharmetheus.com
Phone, Office: +46 (0)18 513 328
Uppsala Science Park, Dag Hammarskjölds väg 52B
SE-752 37 Uppsala, Sweden
This communication is confidential and is only intended for the use of the
individual or entity to which it is directed. It may contain information that
is privileged and exempt from disclosure under applicable law. If you are not
the intended recipient please notify us immediately. Please do not copy it or
disclose its contents to any other person.
Quoted reply history
On 02 Jun 2016, at 04:27, Abu Helwa, Ahmad Yousef Mohammad - abuay010
<[email protected]> wrote:
> Dear NMusers,
>
> I am developing a PK model using log-transformed single-dose oral data. My
> question relates to using combined error model for log-transform data.
>
> I have read few previous discussions on NMusers regarding this, which were
> really helpful, and I came across two suggested formulas (below) that I
> tested in my PK models. Both formulas had similar model fits in terms of OFV
> (OFV using Formula 2 was one unit less than OFV using Formula1) with slightly
> changed PK parameter estimates. My issue with these formulas is that the
> model simulates very extreme concentrations (e.g. upon generating VPCs) at
> the early time points (when drug concentrations are low) and at later time
> points when the concentrations are troughs. These simulated extreme
> concentrations are not representative of the model but a result of the
> residual error model structure.
>
> My questions:
> 1. Is there a way to solve this problem for the indicated formulas?
> 2. Are the two formulas below equally valid?
> 3. Is there an alternative formula that I can use which does not have
> this numerical problem?
> 4. Any reference paper that discusses this subject?
>
> Here are the two formulas:
> 1. Formula 1: suggested by Mats Karlsson with fixing SIGMA to 1:
> W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2)
>
> 2. Formula 2: suggested by Leonid Gibiansky with fixing SIGMA to 1:
> W = SQRT(THETA(16)+ (THETA(17)/EXP(IPRE))**2 )
>
> The way I apply it in my model is this:
>
> FLAG=0 ;TO AVOID ANY CALCULATIONS OF LOG (0)
> IF (F.EQ.0) FLAG=1
> IPRE=LOG(F+FLAG)
>
> W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2) ;FORMULA 1
>
> IRES=DV-IPRE
> IWRES=IRES/W
> Y=(1-FLAG)*IPRE + W*EPS(1)
>
> $SIGMA
> 1. FIX
>
> Best regards,
>
> Ahmad Abuhelwa
> School of Pharmacy and Medical Sciences
> University of South Australia- City East Campus
> Adelaide, South Australia
> Australia
Hi Ahmad,
This issue hasbeen discussed a lot and I'm afraid there's no consensus yet.
To your question:
1. Is there away to solve this problem for the indicated formulas?
As you said, thisproblem occurs at the early/later time points. In other words,
it happenswhen prediction is relatively low. This is because there's an
underlyingapproximation in the derivation of the two formulas:
----------------------------------------------------------------------------------------------------------------------------------------
Innon-transformed terms
Conc=F*EXP(SQRT(THETA(x)**2+THETA(y)**2/F**2)*EPS(1))
Assuming thatEXP(x)=1+x (for small x), you get
Conc=F*(1+SQRT(THETA(x)**2+THETA(y)**2/F**2)*EPS(1))
Variance of thisexpression
Var(conc)=F**2*(THETA(x)**2+THETA(y)**2/F**2)=
= F**2*THETA(x)**2+THETA(y)**2
On the otherhand, for the error model
Y=Fexp(EPS1)+EPS2=F(1+EPS1)+EPS2
variance isequal to
F**2*OMEGA1+OMEGA2
Thus, thesemodels are similar if not identical with
OMEGA1=THETA(x)**2,
OMEGA2=THETA(y)**2
-------------------------------------------------------------------------------------------------------------------------------------------
So when F is rathersmall, the approximation of exp(x)=1+x doesn't workanymore.
This may not be a problem when fitting your data.It may only occurwhen the
prediction is extremely low, let say 10^-4. In opinion it's safe touse this
formula in most cases. But if you are seeking a perfect answer,Jacob's
suggestion may be the one.
2. Are the twoformulas below equally valid?
As far asI'm concerned, these two are equally valid. I question the result
that there'sa difference in OFV and estimates between the two.
3. Is there analternative formula that I can use which does not have
this numerical problem?
Maybe youcan try Stu's "double exponential error model": Y = LOG(F+M)
+(F/(F+M))*ERR(1) + (M/(F+M))*ERR(2).
Best regards,
Rong Chen
School ofPharmaceutical Science
Peking University
Beijing, China
Quoted reply history
From: "Abu Helwa, Ahmad Yousef Mohammad - abuay010"
<[email protected]>
To: "[email protected]" <[email protected]>
Sent: Thursday, 2 June 2016, 10:27
Subject: [NMusers] Additive plus proportional error model for log-transform
data
#yiv5739009609 #yiv5739009609 -- filtered {panose-1:2 4 5 3 5 4 6 3 2
4;}#yiv5739009609 filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2
4;}#yiv5739009609 p.yiv5739009609MsoNormal, #yiv5739009609
li.yiv5739009609MsoNormal, #yiv5739009609 div.yiv5739009609MsoNormal
{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;}#yiv5739009609 a:link,
#yiv5739009609 span.yiv5739009609MsoHyperlink
{color:#0563C1;text-decoration:underline;}#yiv5739009609 a:visited,
#yiv5739009609 span.yiv5739009609MsoHyperlinkFollowed
{color:#954F72;text-decoration:underline;}#yiv5739009609
p.yiv5739009609MsoListParagraph, #yiv5739009609
li.yiv5739009609MsoListParagraph, #yiv5739009609
div.yiv5739009609MsoListParagraph
{margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;font-size:11.0pt;}#yiv5739009609
span.yiv5739009609EmailStyle17 {color:windowtext;}#yiv5739009609
.yiv5739009609MsoChpDefault {font-size:10.0pt;}#yiv5739009609 filtered
{margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv5739009609
div.yiv5739009609WordSection1 {}#yiv5739009609 filtered {}#yiv5739009609
filtered {}#yiv5739009609 filtered {}#yiv5739009609 filtered {}#yiv5739009609
filtered {}#yiv5739009609 filtered {}#yiv5739009609 filtered {}#yiv5739009609
filtered {}#yiv5739009609 filtered {}#yiv5739009609 filtered {}#yiv5739009609
filtered {}#yiv5739009609 filtered {}#yiv5739009609 filtered {}#yiv5739009609
filtered {}#yiv5739009609 filtered {}#yiv5739009609 filtered {}#yiv5739009609
filtered {}#yiv5739009609 filtered {}#yiv5739009609 filtered {}#yiv5739009609
filtered {}#yiv5739009609 ol {margin-bottom:0cm;}#yiv5739009609 ul
{margin-bottom:0cm;}#yiv5739009609 Dear NMusers, I am developing a PK model
using log-transformed single-dose oral data. My question relates to using
combined error model for log-transform data. I have read few previous
discussions on NMusers regarding this, which were really helpful, and I came
across two suggested formulas (below) that I tested in my PK models. Both
formulas had similar model fits in terms of OFV (OFV using Formula 2 was one
unit less than OFV using Formula1) with slightly changed PK parameter
estimates. My issue with these formulas is that the model simulates very
extreme concentrations (e.g. upon generating VPCs) at the early time points
(when drug concentrations are low) and at later time points when the
concentrations are troughs. These simulated extreme concentrations are not
representative of the model but a result of the residual error model structure.
My questions: 1. Is there a way to solve this problem for the indicated
formulas? 2. Are the two formulas below equally valid? 3. Is there an
alternative formula that I can use which does not have this numerical problem?
4. Any reference paper that discusses this subject? Here are the two
formulas: 1. Formula 1: suggested by Mats Karlsson with fixing SIGMA to 1:
W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2) 2. Formula 2: suggested
by Leonid Gibiansky with fixing SIGMA to 1: W = SQRT(THETA(16)+
(THETA(17)/EXP(IPRE))**2 ) The way I apply it in my model is this:
FLAG=0 ;TO AVOID ANY CALCULATIONS OF LOG (0) IF
(F.EQ.0) FLAG=1 IPRE=LOG(F+FLAG)
W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2) ;FORMULA 1 IRES=DV-IPRE
IWRES=IRES/W Y=(1-FLAG)*IPRE + W*EPS(1) $SIGMA 1. FIX Best regards,
Ahmad Abuhelwa School of Pharmacy and Medical Sciences University of South
Australia- City East Campus Adelaide, South Australia Australia
I also like this version:
W = SDL-(SDL-SDH)*TY/(SD50+TY)
Y=LTY+W*EPS(1)
Here SDL is the standard deviation (in logs) at low concentrations, SDH is
the standard deviation at high concentrations, TY is the individual
prediction, LTY is LOG(TY). SIGMA should be fixed at 1
Leonid
Quoted reply history
On Wed, Jun 1, 2016 at 10:27 PM, Abu Helwa, Ahmad Yousef Mohammad -
abuay010 <[email protected]> wrote:
> Dear NMusers,
>
>
>
> I am developing a PK model using log-transformed single-dose oral data. My
> question relates to using combined error model for log-transform data.
>
>
>
> I have read few previous discussions on NMusers regarding this, which were
> really helpful, and I came across two suggested formulas (below) that I
> tested in my PK models. Both formulas had similar model fits in terms of
> OFV (OFV using Formula 2 was one unit less than OFV using Formula1) with
> slightly changed PK parameter estimates. My issue with these formulas is
> that the model simulates very extreme concentrations (e.g. upon generating
> VPCs) at the early time points (when drug concentrations are low) and at
> later time points when the concentrations are troughs. These simulated
> extreme concentrations are not representative of the model but a result of
> the residual error model structure.
>
>
>
> My questions:
>
> 1. Is there a way to solve this problem for the indicated formulas?
>
> 2. Are the two formulas below equally valid?
>
> 3. Is there an alternative formula that I can use which does not
> have this numerical problem?
>
> 4. Any reference paper that discusses this subject?
>
>
>
> Here are the two formulas:
>
> 1. Formula 1: suggested by Mats Karlsson with fixing SIGMA to 1:
>
> W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2)
>
>
>
> 2. Formula 2: suggested by Leonid Gibiansky with fixing SIGMA to 1:
>
> W = SQRT(THETA(16)+ (THETA(17)/EXP(IPRE))**2 )
>
>
>
> The way I apply it in my model is this:
>
>
>
> FLAG=0 ;TO AVOID ANY CALCULATIONS OF LOG (0)
>
> IF (F.EQ.0) FLAG=1
>
> IPRE=LOG(F+FLAG)
>
>
>
> W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2) ;FORMULA 1
>
>
>
> IRES=DV-IPRE
>
> IWRES=IRES/W
>
> Y=(1-FLAG)*IPRE + W*EPS(1)
>
>
>
> $SIGMA
>
> 1. FIX
>
>
>
> Best regards,
>
>
>
> Ahmad Abuhelwa
>
> School of Pharmacy and Medical Sciences
>
> University of South Australia- City East Campus
>
> Adelaide, South Australia
>
> Australia
>
>
>
--
--------------------------------------
Leonid Gibiansky, Ph.D.
President, QuantPharm LLC
web: www.quantpharm.com
e-mail: LGibiansky at quantpharm.com
tel: (301) 767 5566
Dear Ahmad,
You don't havet o choose between normal or transformed concentrations in your
error model, you can let NONMEM estimate the most appropriate transformation
for you. Combining this with a power transform error model I think is likely to
solve your problem. See
A strategy for residual error modeling incorporating scedasticity of variance
and distribution shape.
Dosne AG, Bergstrand M, Karlsson MO.
J Pharmacokinet Pharmacodyn. 2016 Apr;43(2):137-51. doi:
10.1007/s10928-015-9460-y. Epub 2015 Dec 17.
It is automated in PsN as "execute -dtbs ..."
Besst regaards,
Mats
Mats Karlsson, PhD
Professor of Pharmacometrics
Dept of Pharmaceutical Biosciences
Faculty of Pharmacy
Uppsala University
Box 591
75124 Uppsala
Phone: +46 18 4714105
Fax + 46 18 4714003
http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of Jakob Ribbing
Sent: Thursday, June 02, 2016 6:32 AM
To: Abu Helwa, Ahmad Yousef Mohammad - abuay010
Cc: [email protected]
Subject: Re: [NMusers] Additive plus proportional error model for log-transform
data
Hi Ahmad,
The two error models are equivalent (only that with Leonids suggested code, the
additive-on-log-transformed error term (TH16) is estimated on variance scale,
instead of standard deviation scale (approximate CV).
This inflated error rates for very low concentrations is what you get for
additive+proportional on the log transformed scale, and I believe that has been
discussed on nmusers previously as well, many years ago.
You could possibly use a cut-off for when lower IPRE should not lead to higher
residual errors, but why not move to additive + proportional for the original
concentration scale?
Also, this implementation may be unfortunate:
Y=(1-FLAG)*IPRE + W*EPS(1)
Effectively, when concentration predictions are zero (FLAG=1), e.g. for
pre-dose samples or before commence of absorption, then you set the
concentration prediction to EXP(1)=3.14 concentration units.
Depending on what concentration scale you work on (i.e. if BLQ is much higher
than this) it may be OK, but otherwise not.
Instead of applying a flag, just set IPRE to a negative value (low in relation
to LOG(BLQ)), if you want to stay on the log-transformed scale.
I hope this helps to solve your problem.
Best regards
Jakob
Jakob Ribbing, Ph.D.
Senior Consultant, Pharmetheus AB
Cell/Mobile: +46 (0)70 514 33 77
[email protected]<mailto:[email protected]>
http://www.pharmetheus.com/
Phone, Office: +46 (0)18 513 328
Uppsala Science Park, Dag Hammarskjölds väg 52B
SE-752 37 Uppsala, Sweden
This communication is confidential and is only intended for the use of the
individual or entity to which it is directed. It may contain information that
is privileged and exempt from disclosure under applicable law. If you are not
the intended recipient please notify us immediately. Please do not copy it or
disclose its contents to any other person.
On 02 Jun 2016, at 04:27, Abu Helwa, Ahmad Yousef Mohammad - abuay010
<[email protected]<mailto:[email protected]>>
wrote:
Dear NMusers,
I am developing a PK model using log-transformed single-dose oral data. My
question relates to using combined error model for log-transform data.
I have read few previous discussions on NMusers regarding this, which were
really helpful, and I came across two suggested formulas (below) that I tested
in my PK models. Both formulas had similar model fits in terms of OFV (OFV
using Formula 2 was one unit less than OFV using Formula1) with slightly
changed PK parameter estimates. My issue with these formulas is that the model
simulates very extreme concentrations (e.g. upon generating VPCs) at the early
time points (when drug concentrations are low) and at later time points when
the concentrations are troughs. These simulated extreme concentrations are not
representative of the model but a result of the residual error model structure.
My questions:
1. Is there a way to solve this problem for the indicated formulas?
2. Are the two formulas below equally valid?
3. Is there an alternative formula that I can use which does not have
this numerical problem?
4. Any reference paper that discusses this subject?
Here are the two formulas:
1. Formula 1: suggested by Mats Karlsson with fixing SIGMA to 1:
W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2)
2. Formula 2: suggested by Leonid Gibiansky with fixing SIGMA to 1:
W = SQRT(THETA(16)+ (THETA(17)/EXP(IPRE))**2 )
The way I apply it in my model is this:
FLAG=0 ;TO AVOID ANY CALCULATIONS OF LOG (0)
IF (F.EQ.0) FLAG=1
IPRE=LOG(F+FLAG)
W=SQRT(THETA(16)**2+THETA(17)**2/EXP(IPRE)**2) ;FORMULA 1
IRES=DV-IPRE
IWRES=IRES/W
Y=(1-FLAG)*IPRE + W*EPS(1)
$SIGMA
1. FIX
Best regards,
Ahmad Abuhelwa
School of Pharmacy and Medical Sciences
University of South Australia- City East Campus
Adelaide, South Australia
Australia