NONMEM Users Network Archive

Hosted by Cognigen

Re: Question about handling BLOQ data with mixture model

From: LGibiansky
Date: Fri, 25 May 2012 15:04:24 -0400

Andy,
It was just "comment to the comment" where there was a discrepancy.
Original
values do sum to one, so this could not be the reason for the model
problem.
Leonid


Original Message:
-----------------
From: Andy Stein andy.stein
Date: Fri, 25 May 2012 14:45:07 -0400
To: LGibiansky
il.com
Subject: Re: [NMusers] Question about handling BLOQ data with mixture mode=
l


I wanted to follow up on the comments to Yaping's email. First, the
three probabilities below from the original code do in fact sum to 1.

   P(1)=THETA(8)/100

   P(2)=(1-THETA(8)/100)*THETA(9)/1000

   P(3)=(1-THETA(8)/100)*(1-THETA(9)/1000)


Note that: P(2) + P(3) = 1-THETA(8)/100


And thus P(1) + P(2) + P(3) = 1


Also, the model worked completely fine when the BLOQ part of the code was
left out and only the mixture was modeled. That is what led us to think=

that the combination of BLOQ with a Mixture was causing the problem.


Andy

On Fri, May 25, 2012 at 1:07 PM, LGibiansky
LGibiansky

> Sum of probabilities should sum to 1. More standard way would be to us=
e
>
> P(1) = 1/(1+THETA(8)+THETA(9))
>
> P(2) = THETA(8)/(1+THETA(8)+THETA(9))
>
> P(3) = THETA(9)/(1+THETA(8)+THETA(9))
>
> where THETA(8) and THETA(9) are any positive numbers
> Regards
> Leonid
>
> Original Message:
> -----------------
> From: Martin Bergstrand martin.bergstrand
> Date: Fri, 25 May 2012 22:59:45 +0700
> To: yapingz2011
> Subject: RE: [NMusers] Question about handling BLOQ data with mixture
model
>
>
> Dear Yaping,
>
>
>
> I can see that you need to make any particular consideration because yo=
u
> are applying a mixture model. CUMD is dependent on IPRED that in its t=
urn
> is
> dependent on the assigned mixture. That should be enough.
>
>
>
> However, I spot what must be an error in your way of defining your mixtu=
re
> probabilities. As it is now you total probability does not sum up to 1=
.
Why
> don't you parameterize it his way:
>
>
>
> $MIX
>
> NSPOP=3
>
> P(1) = THETA(8)/100
>
> P(2) = (1-THETA(8)/100)*THETA(9)/100
>
> P(3) = 1-THETA(8)/100 -THETA(9)/100
>
>
>
> $THETA (0, 3.78, 100) ; PMIX1
>
> $THETA (80, 91, 100) ; PMIX2/(1-PMIX1)
>
>
>
> I have kept the division of THETAs by 100 since I assume that you want
> estimates in %. However the division with 1000 did not make any sense =
to
me
> despite the correctly assigned THETA boundaries?
>
>
>
> Finally a word of caution, be careful with the use of NONMEM reserved
> variables such as T (integrated time in $DES) and F (default model
> prediction with some ADVANS). In my experience things can go wrong whe=
n
you
> use them outside the way it was intended, conflicts can occur.
>
>
>
> Kind regards,
>
>
>
> Martin Bergstrand, PhD
>
> Pharmacometrics Research Group
>
> Dept of Pharmaceutical Biosciences
>
> Uppsala University
>
> Sweden
>
> martin.bergstrand
>
>
>
> Visiting scientist:
>
> Mahidol-Oxford Tropical Medicine Research Unit,
>
> Bangkok, Thailand
>
>
>
>
>
> From: owner-nmusers
com]
> On
> Behalf Of Yaping Zhang
> Sent: den 25 maj 2012 02:04
> To: nmusers
> Subject: [NMusers] Question about handling BLOQ data with mixture model
>
>
>
> Hello NMUsers,
>
>
>
> I am trying to analyze BLOQ data using the M3 method (Stuart Beal, Ways =
to
> Fit a PK Model with Some Data Below the Quantification Limit, 2001). T=
he
> model I have is a mixture model to describe PD response of three
> subpopulations. The complete control stream is pasted below.
>
>
>
> I have implemented just the mixture model (no BLOQ) and just the BLOQ
error
> model (no mixture) and it works fine with nonmem 6. But the run crash=
ed
> immediately using nonmem 6 if including both BLOQ and the mixture model.=

>
>
>
> I am wondering if I need to account for the mixture in the section of th=
e
> code below when putting a mixture model together with the BLOQ error mod=
el
>
> IF (BLOQ.EQ.1) THEN
>
> F_FLAG=1
>
> Y =CUMD + something based on MIXNUM?
>
> ENDIF
>
>
>
> Any ideas are gratefully received!
>
>
>
> Many thanks,
>
> Yaping
>
>
>
>
>
> $PROB AMN107A2303
>
>
>
> $INPUT NUM=DROP STUD=DROP SUBJ=DROP ID AGE0=DROP SEX=DROP RACE=
=DROP
>
> DART=DROP ARM ACTT=DROP POP PPK=DROP COUN=DROP
>
> SOK OTIM=DROP TIME TVIS=DROP
>
> AMT=DROP DOSE=DROP SCHD=DROP AUC=DROP CMIN=DROP
>
> ODV=DROP MDV DV BLOQ STY=DROP EVDT=DROP
>
>
>
> $DATA ../data/AMN2303_ENEST.csv ; currently modified with matlab=
 and saved
> with oocalc
>
>
>
> IGNORE=
>
> IGNORE=(MDV.EQ.1)
>
> IGNORE=(ID.EQ.66, ID.EQ.92, ID.EQ.335, ID.EQ.346, ID.=
EQ.348, ID.EQ.416,
> ID.EQ.496, ID.EQ.527, ID.EQ.762, ID.EQ.790)
>
>
>
> $PRED
>
> mu =THETA(1)*EXP(ETA(1))
>
> AA =THETA(2)*EXP(ETA(2))
>
> alpha =THETA(3)*EXP(ETA(3))
>
> BB =THETA(4)*EXP(ETA(4))
>
> beta =THETA(5)*EXP(ETA(5))
>
> InCC =THETA(6)+ETA(6)
>
> gamma =THETA(7)*EXP(ETA(7))
>
>
>
> T = TIME
>
> IF (TIME.LE.0) T = 0
>
>
>
> EST=MIXEST
>
> IF (MIXNUM.EQ.1) F =AA*EXP(mu*T/8766)
>
> IF (MIXNUM.EQ.2) F =AA*EXP(alpha*T/8766)+BB*EXP(beta*T/8766)
>
> IF (MIXNUM.EQ.3) F
> =AA*EXP(alpha*T/8766)+BB*EXP(beta*T/8766)+EXP(InCC)*EXP(gamma*T/8766)
>
>
>
> PROP=THETA(10)
>
> W=SQRT(PROP*PROP)
>
>
>
> IPRED=-2.8
>
> IF(F.GT.0)IPRED =LOG10(F)
>
> LLOQ=-2.5
>
> DUM=(LLOQ-IPRED)/W
>
> CUMD=PHI(DUM)
>
>
>
> IF (BLOQ.EQ.0) THEN
>
> F_FLAG=0
>
> Y =IPRED+W*ERR(1)
>
> ENDIF
>
>
>
> IF (BLOQ.EQ.1) THEN
>
> F_FLAG=1
>
> Y =CUMD
>
> ENDIF
>
>
>
> $MIX
>
> NSPOP=3
>
> P(1)=THETA(8)/100
>
> P(2)=(1-THETA(8)/100)*THETA(9)/1000
>
> P(3)=(1-THETA(8)/100)*(1-THETA(9)/1000)
>
>
>
> $THETA (-10,-0.57,0) ; mu THETA(1)
>
> $THETA (0.0001,50.7,100) ; AA THETA(2)
>
> $THETA (-100,-14.2,0) ; alpha THETA(3)
>
> $THETA (0.0001,0.196,10) ; BB THETA(4)
>
> $THETA (-10,-0.678,0) ; beta THETA(5)
>
> $THETA (-100,-6.92,0) ; InCC THETA(6)
>
> $THETA (0, 2.15) ; gamma THETA(7)
>
> $THETA (0, 3.78, 100) ; THETA(8)
>
> $THETA (800, 910, 1000) ; THETA(9)
>
> $THETA (0.001,0.104, 5) ; ERR THETA(10)
>
>
>
> $OMEGA 0.001 FIX ; mu
>
> $OMEGA 0.767 ; AA
>
> $OMEGA 0.236 ; alpha
>
> $OMEGA 3.58 ; BB
>
> $OMEGA 0.148 ; beta
>
> $OMEGA 5 ; CC
>
> $OMEGA 0.858 ; gamma
>
>
>
> $SIGMA 1 FIX
>
>
>
> $EST METHOD=1 LAPLACIAN NOABORT MAXEVAL=9990 PRINT=1 MSFO=run012=
.nmmsf
> SIG=2
>
>
>
> $COV
>
>
>
> $TABLE ID TIME DV MDV IPRED EST
>
> FILE=run012.nmfit NOPRINT ONEHEADER
>
>
>
> $TABLE ID ETA1 ETA2 ETA3 ETA4 ETA5 ETA6 ETA7 mu AA alpha BB beta InCC
gamma
>
> NOAPPEND FIRSTONLY FILE=run012.nmpar NOPRINT ONEHEADER
>
>
>
>
> --------------------------------------------------------------------
> mail2web LIVE – Free email based on Microsoft® Exchange technology -=

> http://link.mail2web.com/LIVE
>
>
>


--------------------------------------------------------------------
mail2web LIVE – Free email based on Microsoft® Exchange technology -
http://link.mail2web.com/LIVE

Received on Fri May 25 2012 - 15:04:24 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.