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
M3 method and multiple LOQ values
5 messages
4 people
Latest: Mar 08, 2013
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
Quoted reply history
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
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
Actually, the ability to use SIGMA(1,1) on the right side has been around since
NONMEM VI release 2.
In the case of:
PROP=THETA(1)*F ; proportional part
ADD=THETA(2) ; additive part
SD=SQRT(PROP*PROP + ADD*ADD) ; Standard deviation using proportional
This could be transposed to:
PROP=SQRT(SIGMA(1,1))*F ; proportional part
ADD=SQRT(SIGMA(2,2)) ; additive part
SD=SQRT(PROP*PROP + ADD*ADD) ; Standard deviation using proportional
But would be used as:
Y=F + F*EPS(1)+EPS(2)
with SIGMA(1,1) and SIGMA(2,2) allowed to be estimated.
However, the use of SIGMA(x,x) in this manner should only be used for F_FLAG=0
conditions (explicit or implied), because SIGMA is considered strictly a normal
density component by NONMEM, strictly associated with EPS(x), and should not
be used as a general parameter to alternative distributions (such as an
integrated or cumulative normal density).
So, for this example, in which F_FLAG=1 for some data, the only choice is to
theta-ize the SD, and fix the SIGMA to 1.
Robert J. Bauer, Ph.D.
Vice President, Pharmacometrics, R&D
ICON Development Solutions
7740 Milestone Parkway
Suite 150
Hanover, MD 21076
Tel: (215) 616-6428
Mob: (925) 286-0769
Email: [email protected]
Web: www.iconplc.com
Quoted reply history
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Nick Holford
Sent: Thursday, March 07, 2013 5:59 PM
To: nmusers
Subject: Re: [NMusers] 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
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
All,
Thank you for the prompt and thorough responses. They have been most helpful!
I really appreciate the assistance.
Rebecca
Quoted reply history
________________________________________
From: [email protected] [[email protected]] On Behalf Of
Bauer, Robert [[email protected]]
Sent: Thursday, March 07, 2013 7:43 PM
To: Nick Holford; nmusers
Subject: RE: [NMusers] M3 method and multiple LOQ values
Actually, the ability to use SIGMA(1,1) on the right side has been around since
NONMEM VI release 2.
In the case of:
PROP=THETA(1)*F ; proportional part
ADD=THETA(2) ; additive part
SD=SQRT(PROP*PROP + ADD*ADD) ; Standard deviation using proportional
This could be transposed to:
PROP=SQRT(SIGMA(1,1))*F ; proportional part
ADD=SQRT(SIGMA(2,2)) ; additive part
SD=SQRT(PROP*PROP + ADD*ADD) ; Standard deviation using proportional
But would be used as:
Y=F + F*EPS(1)+EPS(2)
with SIGMA(1,1) and SIGMA(2,2) allowed to be estimated.
However, the use of SIGMA(x,x) in this manner should only be used for F_FLAG=0
conditions (explicit or implied), because SIGMA is considered strictly a normal
density component by NONMEM, strictly associated with EPS(x), and should not
be used as a general parameter to alternative distributions (such as an
integrated or cumulative normal density).
So, for this example, in which F_FLAG=1 for some data, the only choice is to
theta-ize the SD, and fix the SIGMA to 1.
Robert J. Bauer, Ph.D.
Vice President, Pharmacometrics, R&D
ICON Development Solutions
7740 Milestone Parkway
Suite 150
Hanover, MD 21076
Tel: (215) 616-6428
Mob: (925) 286-0769
Email: [email protected]
Web: www.iconplc.com
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Nick Holford
Sent: Thursday, March 07, 2013 5:59 PM
To: nmusers
Subject: Re: [NMusers] 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
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