# NONMEM Users Network Archive

### Hosted by Cognigen

From: Leonid Gibiansky <LGibiansky>
Date: Thu, 05 Nov 2009 06:20:12 -0500

Bob,

You seems to protect only from positive x=infinity overflow
Do we also need to worry about negatives x=-infinity?

If yes, we also need lines:
IF (EXPP<-100.0) EXPP=-100.0 ;protect against floating overflow

If not, then the second part of the code:
> EXPP=MU_1+ETA(1)
> IF (EXPP>100.0) EXPP=100.0 ;protect against floating overflow
> EXPW=EXP(-EXPP)
protects from the wrong overflow, it needs to be replaced by
> IF (EXPP<-100.0) EXPP=-100.0 ;protect against floating overflow

Leonid

--------------------------------------
Leonid Gibiansky, Ph.D.
President, QuantPharm LLC
web: www.quantpharm.com
e-mail: LGibiansky at quantpharm.com
tel: (301) 767 5566

Bauer, Robert wrote:
> Nick:
> Because EXPP could be highly negative, then EXP(-EXPP) has the potential
> to result in floating overflow. So, a filtering line would still be good.
> **
> Using the logit code, the theta(1) would indeed be more easily
> interpretable. However, as you say, your theta would need to be
> constrained between 0 and 1
>
> But, if we wish to retain linear mu modeling, something that is good to
> do for importance sampling, and sometimes essential for SAEM, then
> the parameterization I originally recommended would be most suitable: .
>
> MU_1=THETA(1)
> EXPP=MU_1+ETA(1)
> IE (EXPP>100.0) EXPP=100.0 ;protect against floating overflow
> EXPW=EXP(EXPP)
> BIO=EXPW/(1.0+EXPW)
>
> or
> MU_1=THETA(1)
> EXPP=MU_1+ETA(1)
> IE (EXPP>100.0) EXPP=100.0 ;protect against floating overflow
> EXPW=EXP(-EXPP)
> BIO=1/(1.0+EXPW)
>
> would be best. Furthermore, theta(1) itself may be negative infinity to
> positive infinity, so no boundaries are necessary to theta(1). All of
> these factors make the analysis particularly amenable to Gibbs sampling
> when doing BAYES analysis as well. Otherwise, non-linear mu/theta
> relationships and boundary imposing means Metropolis-Hastings sampling
> must be done, a less efficient process.
>
> When the analysis is done, the final result thetas could be transformed
> to more meaningful values:
>
> Thetap(1)=1/(1+exp(-theta(1)))
>
> and reported in that fashion. The transformation patterns after the
> individual subject parameter BIO and its relationship to theta.
> An appropriate propagation of errors algorithm would be used to
> transform the standard errors as well.
>
>
> *Robert J. Bauer, Ph.D.
> Vice President, Pharmacometrics
> ICON Development Solutions*
>
> *Tel:* (215) 616-6428
> *Mob: *(925) 286-0769
> *Email: Robert.Bauer
> *Web:* www.icondevsolutions.com
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
> *From:* owner-nmusers
> [mailto:owner-nmusers
> *Sent:* Wednesday, November 04, 2009 10:40 PM
> *To:* nmusers
>
> Peiming,
>
> Thank you for pointing out my mistake again!
>
> Perhaps next time you should make the correction and send it to nmusers :-)
>
> MU_1=LOG(THETA(1)/(1-THETA(1)) ; logit of population bioavailability
>
> EXPP=MU_1+ETA(1) ; add random effect
>
> BIO=1/(1+EXP(-EXPP)) ; individual bioavailability
>
>
>
> Nick
>
> Ma, Peiming wrote:
>>
>> Unfortunately, Nick, you have an extra EXP: the denominator of BIO
>> should be just 1 + EXP(-EXPP). J
>>
>> Cheers,
>>
>> ------------------------------------------------------------------------
>>
>> *From:* owner-nmusers
>> [mailto:owner-nmusers
>> *Sent:* Wednesday, November 04, 2009 3:43 PM
>> *To:* nmusers
>>
>> Hi,
>>
>> Thanks to Peiming Ma and Thuy Vu for pointing out an error in my
>> attempt to transform bioavailability into its logit.
>>
>> The logit transformation of a probability is ln(P/(1-P)) i.e. the log
>> of the odds ratio. The reverse transform is correct i.e. exp(logit) is
>> the odds ratio and P is then OR/(1+OR) (or 1/1+exp(-logit)).
>>
>> If THETA(1) is the bioavailability then this is (I hope) the correct
>> transformation of THETA(1) and reverse transform to get the
>> individual bioavailability with a random effect constrained to be
>> within 0 and 1.
>>
>> MU_1=LOG(THETA(1)/(1-THETA(1)) ; logit of population bioavailability
>>
>> EXPP=MU_1+ETA(1) ; add random effect
>>
>> BIO=1/(1+EXP(-EXP(EXPP))) ; individual bioavailability
>>
>>
>> Nick
>>
>> --
>> Nick Holford, Professor Clinical Pharmacology
>> Dept Pharmacology & Clinical Pharmacology
>> 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: n.holford
>> http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford
>
> --
> Nick Holford, Professor Clinical Pharmacology
> Dept Pharmacology & Clinical Pharmacology
> 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: n.holford
> http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford
>
> ICON plc made the following annotations.
> ------------------------------------------------------------------------------
> This e-mail transmission may contain confidential or legally privileged information
> that is intended only for the individual or entity named in the e-mail address. If you
> are not the intended recipient, you are hereby notified that any disclosure, copying,
> distribution, or reliance upon the contents of this e-mail is strictly prohibited. If
> ICON plc can arrange for proper delivery, and then please delete the message.
> Thank You,
> ICON plc