Re: M3 method and multiple LOQ values
Hi,
Thanks Mats for pointing out this new feature coming up in NONMEM 7.3.
An alternative less errorprone and computationally more efficient code is shown below.
By defining SD in one expression it avoids errors (such as the one Rebecca made) that are introduced by using different expressions for calculating the two cases of F_FLAG.
The PHI function is computationally quite demanding so there is no need to compute it unless the DV is BLQ. That is why it computed inside the conditional block when F_FLAG is 1.
$ERROR
SD=THETA(1)*F ; Standard deviation using proportional residual error
IF (DV.GE.LLOQ) THEN ; assumes LLOQ is already defined e.g. a data item with each DV that is specific for that DV
F_FLAG=0
Y=F + SD*ERR(1)
ELSE ; must be BLQ
F_FLAG=1
Y=PHI((LLOQ-F)/SD)
ENDIF
$EST METHOD=COND INTER LAPLACIAN
$THETA 0.1 ; THETA(1)
$SIGMA 1 FIX ; ERR(1)
If you want to use a more complex residual error model then you compute SD like this. The rest of the code remains unchanged apart from adding an extra THETA.
PROP=THETA(1)*F ; proportional part
ADD=THETA(2) ; additive part
SD=SQRT(PROP*PROP + ADD*ADD) ; Standard deviation using proportional residual error
$THETA 1 ; THETA(2) ; additive part
You can find more details here http://holford.fmhs.auckland.ac.nz/docs/censored-observations-with-nonmem.pdf
I don't know how to implement a single expression for SD without having a THETA in the SD expression.
Mats, can you suggest how that might be done in NONMEM 7.3 using SIGMA(1,1)?
Best wishes,
Nick
Quoted reply history
On 8/03/2013 9:15 a.m., Mats Karlsson wrote:
> Dear Rebecca,
>
> I think you want to change
>
> DUM=(LOQ-IPRED)
>
> To
>
> DUM=(LOQ-IPRED)/(SIG*IPRED)
>
> BTW, with the new NONMEM version, the need to fix SIGMA to 1 is no longer necessary as you can use SIGMA(1,1) on the right-hand side of expressions in $ERROR
>
> Your expression would then become
>
> $ERROR
> IPRED=F
> LOQ=LLOQ
> DUM=(LOQ-IPRED)/(SQRT(SIGMA(1,1))*IPRED)
> CUMD=PHI(DUM)
>
> IF (BQL.EQ.0) THEN
> F_FLAG=0
> Y=IPRED*(1+ ERR(1))
> ENDIF
>
> IF (BQL.EQ.1) THEN
> F_FLAG=1
> Y=CUMD
> ENDIF
>
> $EST METHOD=COND INTER LAPLACIAN
> $SIGMA .1
>
> 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
>
> Fax + 46 18 4714003
>
> *From:* [email protected] [ mailto: [email protected] ] *On Behalf Of *Rebecca N. Burns
>
> *Sent:* 07 March 2013 17:46
> *To:* [email protected]
> *Subject:* [NMusers] M3 method and multiple LOQ values
>
> All,
>
> I am implementing the M3 method using NONMEM7.2. My error structure is proportional. I have two questions regarding the control stream shown below.
>
> 1.Is the control stream correct for a proportional error model?
>
> 2.Each DV has its own LOQ so I cannot give one LOQ value. I was planning to assign a column in my data frame which defines LOQ for each DV. Is this an appropriate approach?
>
> Any input/advice would be much appreciated!
>
> Thanks,
>
> Rebecca Neal Burns, PharmD, PhD
>
> Post-Doctoral Scholar, Pharmacometrics
>
> Mercer University, Atlanta, GA
>
> $ERROR
>
> SIG=THETA(4)
> IPRED=F
> LOQ=LLOQ
> DUM=(LOQ-IPRED)
> CUMD=PHI(DUM)
>
> IF (BQL.EQ.0) THEN
> F_FLAG=0
> Y=IPRED*(1+SIG*ERR(1))
> ENDIF
>
> IF (BQL.EQ.1) THEN
> F_FLAG=1
> Y=CUMD
> ENDIF
>
> $EST METHOD=COND INTER LAPLACIAN
> $SIGMA 1 FIX
--
Nick Holford, Professor Clinical Pharmacology
Dept Pharmacology & Clinical Pharmacology, Bldg 503 Room 302A
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: [email protected]
http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford