[NMusers] Rounding errors with TRANSIT model

2010-08-11 Thread Ann Rigby-Jones
Dear All

I'm trying to evaluate a transit model approach in an attempt to better 
describe early drug concentrations following intravenous injection (1 minute 
and 10 minute infusions) of a sedative-hypnotic drug.  However, every 
minimisation attempt is terminated due to rounding errors (E=134).  I've tried 
the usual strategies to overcome this e.g using final estimates of a terminated 
run as initial estimates for the next, changing number of sig dig requested, 
changing from a diagonal omega to a block omega,  but nothing has been 
successful.

I'd be very grateful for any suggestions of what I might try next :)  Standard 
3-comp and 4-comp mamillary models minise successful with these data, but so 
far no luck with any of the transit models, I have tried model with 1 to 6 
transit compartments.  An example control stream is shown below.  I'm using 
NONMEM 7 with Intel Fortran.

With thanks and all best wishes

Ann




$PROBLEM 3comp 2 transit
$INPUT ID DOSE AMT RATE DUR TIME ORI DV EVID ART AGE WGT
$DATA PKcen12LN.csv IGNORE=#
$SUBROUTINES ADVAN9 TOL=3
$MODEL
;NCOMPS=9
COMP(CENTRAL, DEFOBS)  ;1
COMP(PERIPH1)  ;2
COMP(PERIPH2)  ;3
COMP(TRANS1, DEFDOSE)  ;4
COMP(TRANS2)   ;5
;COMP(TRANS3)  ;6
;COMP(TRANS4)  ;7
;COMP(TRANS5)  ;8
;COMP(TRANS6)  ;9

$PK

CL=THETA(1)*EXP(ETA(1))
Q2=THETA(2)*EXP(ETA(2))
Q3=THETA(3)*EXP(ETA(3))
V1=THETA(4)*EXP(ETA(4))
V2=THETA(5)*EXP(ETA(5))
V3=THETA(6)*EXP(ETA(6))

K10=CL/V1
K12=Q2/V1
K13=Q3/V1
K21=Q2/V2
K31=Q3/V3



S1=V1

IF (DUR.EQ.10) THEN
ALAG4=THETA(7)*EXP(ETA(7))
ELSE
ALAG4=THETA(8)*EXP(ETA(8))
ENDIF

KTR=THETA(9)*EXP(ETA(9))

$DES
;DADT(1)=A(2)*K21 + A(3)*K31 - A(1)*(K10+K12+K13)
;DADT(2)=A(1)*K12 - A(2)*K21
;DADT(3)=A(1)*K13 - A(3)*K31

DADT(1)=A(5)*KTR + A(2)*K21 + A(3)*K31 - A(1)*(K10+K12+K13)
DADT(2)=A(1)*K12 - A(2)*K21
DADT(3)=A(1)*K13 - A(3)*K31

DADT(4)=-A(4)*KTR
DADT(5)=A(4)*KTR - A(5)*KTR
;DADT(6)=A(5)*KTR - A(6)*KTR
;DADT(7)=A(6)*KTR - A(7)*KTR
;DADT(8)=A(7)*KTR - A(8)*KTR
;DADT(9)=A(8)*KTR - A(9)*KTR

$ERROR
W=1
IPRED= -2
IF (F.GT.0) IPRED=LOG(F)

Y=IPRED + ERR(1)

IRES=DV-IPRED
IWRES=IRES/W

$THETA (0, 725);CL
$THETA (0, 238);Q2
$THETA (0, 2920)   ;Q3
$THETA (0, 311);V1
$THETA (0, 38700)  ;V2
$THETA (0, 39500)  ;V3
$THETA (0.2167, 0.522,1)   ;ALAG 10MIN
$THETA (0.00833, 0.122, 1) ;ALAG 1MIN
$THETA (0, 0.720)  ;KTR


$OMEGA BLOCK(6)
0.0959 ; ETA CL
0.00804 0.0211 ; ETA Q2
0.00631 0.00143 0.166  ; ETA Q3
-0.00506 0.00121 -0.0635 0.0491; ETA V1
0.00293 -0.00746 0.00708 -0.00315  0.0328  ; ETA V2
0.00836 0.00688 0.00144 -0.00497 0.00741 0.153 ; ETA V3
$OMEGA 0.217; ETA ALAG 10
$OMEGA 0.4 ; ETA ALAG 1
$OMEGA 0.0171   ; ETA KTR


;$OMEGA (0.0686) ; ETA CL
;$OMEGA (0.01)   ; ETA Q2
;$OMEGA (0.0251) ; ETA Q3
;$OMEGA (0 FIX)  ; ETA V1
;$OMEGA (0.0328) ; ETA V2
;$OMEGA (0 FIX)  ; ETA V3
;$OMEGA (0.170)  ; ETA ALAG10
;$OMEGA (1.37)   ; ETA ALAG1
;$OMEGA (0.00409); ETA KTR

$SIGMA (0.0944)


$ESTIMATION METHOD=1 PRINT=1 MAX= NOABORT SIG=3 ;POSTHOC INTER
MSFO=msfo.outputfile
;$COVA
$TABLE ID   EVID AMT TIME IPRED IRES
   NOPRINT FILE=AllRecords.txt
$TABLE ID
   CL Q2 Q3 V1 V2 V3
   ETA1 ETA2 ETA3 ETA4 ETA5 ETA6 ETA7 ;ETA8
   FIRSTONLY  NOPRINT  NOAPPEND FILE=FirstRecords.txt



Ann
___
Ann Rigby-Jones PhD MRSC
Research Fellow in Pharmacokinetics & Pharmacodynamics
Peninsula College of Medicine & Dentistry

N31, ITTC Phase 1
Tamar Science Park
1 Davy Road
Derriford
Plymouth
PL6 8BX

Tel:  +44 (0) 1752 432014
___




Re: [NMusers] Rounding errors with TRANSIT model

2010-08-11 Thread Leonid Gibiansky

Ann
Try ADVAN6 or ADVAN8 or ADVAN13 .

Also, TOL=3 is too small. Increase it to 6-7 or even 9, and also change 
to NSIG=3 SIGL=9 ($EST step, as recommended in the guide).
Also, at least initially, I would remove ETAs from the third compartment 
and from one of the parameters (Q2 or V2) of the second compartment. Do 
you really need both ALAG and transit compartment? They serve the same 
goal, to delay the input, so could be strongly correlated; you may see 
it on the POSTHOC plot of ETA7-ETA8 versus ETA9. I would try to remove 
ETAs from ALAG or KTR to check whether they are needed.
If nothing helps, use UNCONDITIONAL on the $COV to get standard errors, 
and if they are reasonable, ignore the error, it may disappear on the 
next steps of the modeling process

Leonid

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



On 8/11/2010 5:57 AM, Ann Rigby-Jones wrote:

Dear All

I’m trying to evaluate a transit model approach in an attempt to better
describe early drug concentrations following intravenous injection (1
minute and 10 minute infusions) of a sedative-hypnotic drug. However,
every minimisation attempt is terminated due to rounding errors (E=134).
I’ve tried the usual strategies to overcome this e.g using final
estimates of a terminated run as initial estimates for the next,
changing number of sig dig requested, changing from a diagonal omega to
a block omega, but nothing has been successful.

I’d be very grateful for any suggestions of what I might try next J
Standard 3-comp and 4-comp mamillary models minise successful with these
data, but so far no luck with any of the transit models, I have tried
model with 1 to 6 transit compartments. An example control stream is
shown below. I’m using NONMEM 7 with Intel Fortran.

With thanks and all best wishes

Ann

$PROBLEM 3comp 2 transit

$INPUT ID DOSE AMT RATE DUR TIME ORI DV EVID ART AGE WGT

$DATA PKcen12LN.csv IGNORE=#

$SUBROUTINES ADVAN9 TOL=3

$MODEL

;NCOMPS=9

COMP(CENTRAL, DEFOBS) ;1

COMP(PERIPH1) ;2

COMP(PERIPH2) ;3

COMP(TRANS1, DEFDOSE) ;4

COMP(TRANS2) ;5

;COMP(TRANS3) ;6

;COMP(TRANS4) ;7

;COMP(TRANS5) ;8

;COMP(TRANS6) ;9

$PK

CL=THETA(1)*EXP(ETA(1))

Q2=THETA(2)*EXP(ETA(2))

Q3=THETA(3)*EXP(ETA(3))

V1=THETA(4)*EXP(ETA(4))

V2=THETA(5)*EXP(ETA(5))

V3=THETA(6)*EXP(ETA(6))

K10=CL/V1

K12=Q2/V1

K13=Q3/V1

K21=Q2/V2

K31=Q3/V3

S1=V1

IF (DUR.EQ.10) THEN

ALAG4=THETA(7)*EXP(ETA(7))

ELSE

ALAG4=THETA(8)*EXP(ETA(8))

ENDIF

KTR=THETA(9)*EXP(ETA(9))

$DES

;DADT(1)=A(2)*K21 + A(3)*K31 - A(1)*(K10+K12+K13)

;DADT(2)=A(1)*K12 - A(2)*K21

;DADT(3)=A(1)*K13 - A(3)*K31

DADT(1)=A(5)*KTR + A(2)*K21 + A(3)*K31 - A(1)*(K10+K12+K13)

DADT(2)=A(1)*K12 - A(2)*K21

DADT(3)=A(1)*K13 - A(3)*K31

DADT(4)=-A(4)*KTR

DADT(5)=A(4)*KTR - A(5)*KTR

;DADT(6)=A(5)*KTR - A(6)*KTR

;DADT(7)=A(6)*KTR - A(7)*KTR

;DADT(8)=A(7)*KTR - A(8)*KTR

;DADT(9)=A(8)*KTR - A(9)*KTR

$ERROR

W=1

IPRED= -2

IF (F.GT.0) IPRED=LOG(F)

Y=IPRED + ERR(1)

IRES=DV-IPRED

IWRES=IRES/W

$THETA (0, 725) ;CL

$THETA (0, 238) ;Q2

$THETA (0, 2920) ;Q3

$THETA (0, 311) ;V1

$THETA (0, 38700) ;V2

$THETA (0, 39500) ;V3

$THETA (0.2167, 0.522,1) ;ALAG 10MIN

$THETA (0.00833, 0.122, 1) ;ALAG 1MIN

$THETA (0, 0.720) ;KTR

$OMEGA BLOCK(6)

0.0959 ; ETA CL

0.00804 0.0211 ; ETA Q2

0.00631 0.00143 0.166 ; ETA Q3

-0.00506 0.00121 -0.0635 0.0491 ; ETA V1

0.00293 -0.00746 0.00708 -0.00315 0.0328 ; ETA V2

0.00836 0.00688 0.00144 -0.00497 0.00741 0.153 ; ETA V3

$OMEGA 0.217 ; ETA ALAG 10

$OMEGA 0.4 ; ETA ALAG 1

$OMEGA 0.0171 ; ETA KTR

;$OMEGA (0.0686) ; ETA CL

;$OMEGA (0.01) ; ETA Q2

;$OMEGA (0.0251) ; ETA Q3

;$OMEGA (0 FIX) ; ETA V1

;$OMEGA (0.0328) ; ETA V2

;$OMEGA (0 FIX) ; ETA V3

;$OMEGA (0.170) ; ETA ALAG10

;$OMEGA (1.37) ; ETA ALAG1

;$OMEGA (0.00409) ; ETA KTR

$SIGMA (0.0944)

$ESTIMATION METHOD=1 PRINT=1 MAX= NOABORT SIG=3 ;POSTHOC INTER

MSFO=msfo.outputfile

;$COVA

$TABLE ID EVID AMT TIME IPRED IRES

NOPRINT FILE=AllRecords.txt

$TABLE ID

CL Q2 Q3 V1 V2 V3

ETA1 ETA2 ETA3 ETA4 ETA5 ETA6 ETA7 ;ETA8

FIRSTONLY NOPRINT NOAPPEND FILE=FirstRecords.txt

Ann

___

*Ann Rigby-Jones PhD MRSC*
Research Fellow in Pharmacokinetics & Pharmacodynamics

Peninsula College of Medicine & Dentistry

N31, ITTC Phase 1
Tamar Science Park
1 Davy Road
Derriford
Plymouth
PL6 8BX

Tel: +44 (0) 1752 432014
___



[NMusers] RE: Rounding errors with TRANSIT model

2010-08-11 Thread Standing Joseph (Great Ormond Street Hospital For Children NHS Trust)
Ann
I think your model is starting to be over-parameterised: 4 compartments plus 
lag plus transit (have you plotted the individual alag estimates as they have 
fairly big omegas?)  I think if you cannot describe the data well with a 4 comp 
linear model, and are seeing differences in PK with different infusion lengths 
(is this why different ALAGs are being estimated?), it can mean nonlinearities: 
 is there a reason to suspect nonlinear CL, or nonlinear distribution (perhaps 
worth looking at target mediated uptake models - see papers from Jusko group)?
BW,
Joe



From: owner-nmus...@globomaxnm.com [owner-nmus...@globomaxnm.com] On Behalf Of 
Ann Rigby-Jones [ann.rigby-jo...@pms.ac.uk]
Sent: 11 August 2010 10:57
To: 'nmusers@globomaxnm.com'
Subject: [NMusers] Rounding errors with TRANSIT model

Dear All

I’m trying to evaluate a transit model approach in an attempt to better 
describe early drug concentrations following intravenous injection (1 minute 
and 10 minute infusions) of a sedative-hypnotic drug.  However, every 
minimisation attempt is terminated due to rounding errors (E=134).  I’ve tried 
the usual strategies to overcome this e.g using final estimates of a terminated 
run as initial estimates for the next, changing number of sig dig requested, 
changing from a diagonal omega to a block omega,  but nothing has been 
successful.

I’d be very grateful for any suggestions of what I might try next :)  Standard 
3-comp and 4-comp mamillary models minise successful with these data, but so 
far no luck with any of the transit models, I have tried model with 1 to 6 
transit compartments.  An example control stream is shown below.  I’m using 
NONMEM 7 with Intel Fortran.

With thanks and all best wishes

Ann




$PROBLEM 3comp 2 transit
$INPUT ID DOSE AMT RATE DUR TIME ORI DV EVID ART AGE WGT
$DATA PKcen12LN.csv IGNORE=#
$SUBROUTINES ADVAN9 TOL=3
$MODEL
;NCOMPS=9
COMP(CENTRAL, DEFOBS)  ;1
COMP(PERIPH1)  ;2
COMP(PERIPH2)  ;3
COMP(TRANS1, DEFDOSE)  ;4
COMP(TRANS2)   ;5
;COMP(TRANS3)  ;6
;COMP(TRANS4)  ;7
;COMP(TRANS5)  ;8
;COMP(TRANS6)  ;9

$PK

CL=THETA(1)*EXP(ETA(1))
Q2=THETA(2)*EXP(ETA(2))
Q3=THETA(3)*EXP(ETA(3))
V1=THETA(4)*EXP(ETA(4))
V2=THETA(5)*EXP(ETA(5))
V3=THETA(6)*EXP(ETA(6))

K10=CL/V1
K12=Q2/V1
K13=Q3/V1
K21=Q2/V2
K31=Q3/V3



S1=V1

IF (DUR.EQ.10) THEN
ALAG4=THETA(7)*EXP(ETA(7))
ELSE
ALAG4=THETA(8)*EXP(ETA(8))
ENDIF

KTR=THETA(9)*EXP(ETA(9))

$DES
;DADT(1)=A(2)*K21 + A(3)*K31 - A(1)*(K10+K12+K13)
;DADT(2)=A(1)*K12 - A(2)*K21
;DADT(3)=A(1)*K13 - A(3)*K31

DADT(1)=A(5)*KTR + A(2)*K21 + A(3)*K31 - A(1)*(K10+K12+K13)
DADT(2)=A(1)*K12 - A(2)*K21
DADT(3)=A(1)*K13 - A(3)*K31

DADT(4)=-A(4)*KTR
DADT(5)=A(4)*KTR - A(5)*KTR
;DADT(6)=A(5)*KTR - A(6)*KTR
;DADT(7)=A(6)*KTR - A(7)*KTR
;DADT(8)=A(7)*KTR - A(8)*KTR
;DADT(9)=A(8)*KTR - A(9)*KTR

$ERROR
W=1
IPRED= -2
IF (F.GT.0) IPRED=LOG(F)

Y=IPRED + ERR(1)

IRES=DV-IPRED
IWRES=IRES/W

$THETA (0, 725);CL
$THETA (0, 238);Q2
$THETA (0, 2920)   ;Q3
$THETA (0, 311);V1
$THETA (0, 38700)  ;V2
$THETA (0, 39500)  ;V3
$THETA (0.2167, 0.522,1)   ;ALAG 10MIN
$THETA (0.00833, 0.122, 1) ;ALAG 1MIN
$THETA (0, 0.720)  ;KTR


$OMEGA BLOCK(6)
0.0959 ; ETA CL
0.00804 0.0211 ; ETA Q2
0.00631 0.00143 0.166  ; ETA Q3
-0.00506 0.00121 -0.0635 0.0491; ETA V1
0.00293 -0.00746 0.00708 -0.00315  0.0328  ; ETA V2
0.00836 0.00688 0.00144 -0.00497 0.00741 0.153 ; ETA V3
$OMEGA 0.217; ETA ALAG 10
$OMEGA 0.4 ; ETA ALAG 1
$OMEGA 0.0171   ; ETA KTR


;$OMEGA (0.0686) ; ETA CL
;$OMEGA (0.01)   ; ETA Q2
;$OMEGA (0.0251) ; ETA Q3
;$OMEGA (0 FIX)  ; ETA V1
;$OMEGA (0.0328) ; ETA V2
;$OMEGA (0 FIX)  ; ETA V3
;$OMEGA (0.170)  ; ETA ALAG10
;$OMEGA (1.37)   ; ETA ALAG1
;$OMEGA (0.00409); ETA KTR

$SIGMA (0.0944)


$ESTIMATION METHOD=1 PRINT=1 MAX= NOABORT SIG=3 ;POSTHOC INTER
MSFO=msfo.outputfile
;$COVA
$TABLE ID   EVID AMT TIME IPRED IRES
   NOPRINT FILE=AllRecords.txt
$TABLE ID
   CL Q2 Q3 V1 V2 V3
   ETA1 ETA2 ETA3 ETA4 ETA5 ETA6 ETA7 ;ETA8
   FIRSTONLY  NOPRINT  NOAPPEND FILE=FirstRecords.txt



Ann
___
Ann Rigby-Jones PhD MRSC
Research Fellow in Pharmacokinetics & Pharmacodynamics
Peninsula College of Medicine & Dentistry

N31, ITTC Phase 1
Tamar Science Park
1 Davy Road
Derriford
Plymouth
PL6 8BX

Tel:  +44 (0) 1752 432014
___





This message may contain confidential information. If you

[NMusers] Expert Modeler position available at Novartis (Basel, Switzerland)

2010-08-11 Thread bengt . hamren
Expert Modeler position at Novartis Pharmaceuticals (Basel, Switzerland)


The company: a global healthcare leader, Novartis has one of the most 
exciting product pipelines in the industry today. A pipeline of innovative 

products brought to life by diverse, talented, performance-driven people. 
All of which makes us one of the most rewarding employers in our field.

Modeling and Simulation at Novartis: supports the optimal development of 
therapeutic drugs. Modeling & Simulation (M&S) integrates the principles 
of biology, pharmacology, and statistics to explain and predict the 
quantitative consequences of decisions, through the application of 
mathematical models. A dedicated programming group facilitates our 
activities by providing data extraction and integration. M&S is a Global 
Line Function which reports directly to the Global Head of Development. 
M&S is committed to provide excellence in quantitative support for 
informed decision-making throughout the organization, from Research 
through to Development, regulatory approval and the market place.

The task:
We are looking for an innovative and motivated quantitative scientist with 

a genuine interest in the utilization of integrated model based approaches 

to support projects throughout Research and Development. 


Ideal candidate:
PhD with a minimum of 4 years relevant experience of applying M&S 
in the pharmaceutical industry.
 
Knowledge and experience in modeling of both pharmacokinetic (PK) 
and efficacy/safety data. Understanding of model building and validation, 
including non linear mixed effect modeling.


To apply, go to www.novartis.com (Careers) and the position has the 
following Job ID: 71063BR 

For more information please contact Bengt Hamrén (contact info below) or 
Colin Pillai (goonaseelan.pil...@novartis.com, +41 61 324 6025) 


Bengt Hamrén, PhD
Novartis Pharma AG
M&S Pharmacology
CHBS, CHBS, WSJ-027.6.005
Novartis Pharma AG
Forum 1
Novartis Campus
CH-4056 Basel
Switzerland
Phone: +41 61 3245923
Fax: +41 61 3241246
Email : bengt.ham...@novartis.com


<>

[NMusers] Baseline as a covariate

2010-08-11 Thread Peter Bonate
I'd like to get the group's opinion on something.  I have a pharmacodynamic 
model and the baseline was shown to be a covariate on one of the model 
parameters.  I was hoping to get general thoughts on the use of the baseline as 
a covariate.  Is there a preference for using the observed baseline vs. NONMEM 
predicted baseline?  And does your opinion change if you have a large residual 
error?

Thanks

Pete bonate


Peter L. Bonate, PhD, FCP, FAAPS
GlaxoSmithKline
Clinical Pharmacology, Modeling, and Simulation
5 Moore Drive, 17.2259
Research Triangle Park, NC  27709
phone: 919-483-7534
fax: 919-483-8948
email: peter.l.bon...@gsk.com

This is a long one but worth it...

Scientists will never make as much money as business executives.  There is now 
mathematical proof for this statement.

Postulate 1: Knowledge is power
postulate 2: Time is money

According to the laws of physics,

   Work
   =   Power(Eq. 1)
   Time

Since, from the 2 postulates above, 
   Knowledge = Power and 
   Time = Money, 
we can substitute into the equation 1 and come up with

   Work 
  = Knowledge
   Money

Solving for money,

   Work 
 = Money
  Knowledge

Hence, there are 2 ways to make money.  If we slug our guts out working, we can 
improve our money situation.  This is the normal scientific approach.  However 
the suits usually opt for the easier solution, i.e., the less you know, the 
more you'll make, regardless of the amount of work done.


-Original Message-
From: owner-nmus...@globomaxnm.com [mailto:owner-nmus...@globomaxnm.com] On 
Behalf Of Leonid Gibiansky
Sent: Wednesday, August 11, 2010 9:01 AM
To: Ann Rigby-Jones
Cc: 'nmusers@globomaxnm.com'
Subject: Re: [NMusers] Rounding errors with TRANSIT model

Ann
Try ADVAN6 or ADVAN8 or ADVAN13 .

Also, TOL=3 is too small. Increase it to 6-7 or even 9, and also change 
to NSIG=3 SIGL=9 ($EST step, as recommended in the guide).
Also, at least initially, I would remove ETAs from the third compartment 
and from one of the parameters (Q2 or V2) of the second compartment. Do 
you really need both ALAG and transit compartment? They serve the same 
goal, to delay the input, so could be strongly correlated; you may see 
it on the POSTHOC plot of ETA7-ETA8 versus ETA9. I would try to remove 
ETAs from ALAG or KTR to check whether they are needed.
If nothing helps, use UNCONDITIONAL on the $COV to get standard errors, 
and if they are reasonable, ignore the error, it may disappear on the 
next steps of the modeling process
Leonid

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



On 8/11/2010 5:57 AM, Ann Rigby-Jones wrote:
> Dear All
>
> I'm trying to evaluate a transit model approach in an attempt to better
> describe early drug concentrations following intravenous injection (1
> minute and 10 minute infusions) of a sedative-hypnotic drug. However,
> every minimisation attempt is terminated due to rounding errors (E=134).
> I've tried the usual strategies to overcome this e.g using final
> estimates of a terminated run as initial estimates for the next,
> changing number of sig dig requested, changing from a diagonal omega to
> a block omega, but nothing has been successful.
>
> I'd be very grateful for any suggestions of what I might try next J
> Standard 3-comp and 4-comp mamillary models minise successful with these
> data, but so far no luck with any of the transit models, I have tried
> model with 1 to 6 transit compartments. An example control stream is
> shown below. I'm using NONMEM 7 with Intel Fortran.
>
> With thanks and all best wishes
>
> Ann
>
> $PROBLEM 3comp 2 transit
>
> $INPUT ID DOSE AMT RATE DUR TIME ORI DV EVID ART AGE WGT
>
> $DATA PKcen12LN.csv IGNORE=#
>
> $SUBROUTINES ADVAN9 TOL=3
>
> $MODEL
>
> ;NCOMPS=9
>
> COMP(CENTRAL, DEFOBS) ;1
>
> COMP(PERIPH1) ;2
>
> COMP(PERIPH2) ;3
>
> COMP(TRANS1, DEFDOSE) ;4
>
> COMP(TRANS2) ;5
>
> ;COMP(TRANS3) ;6
>
> ;COMP(TRANS4) ;7
>
> ;COMP(TRANS5) ;8
>
> ;COMP(TRANS6) ;9
>
> $PK
>
> CL=THETA(1)*EXP(ETA(1))
>
> Q2=THETA(2)*EXP(ETA(2))
>
> Q3=THETA(3)*EXP(ETA(3))
>
> V1=THETA(4)*EXP(ETA(4))
>
> V2=THETA(5)*EXP(ETA(5))
>
> V3=THETA(6)*EXP(ETA(6))
>
> K10=CL/V1
>
> K12=Q2/V1
>
> K13=Q3/V1
>
> K21=Q2/V2
>
> K31=Q3/V3
>
> S1=V1
>
> IF (DUR.EQ.10) THEN
>
> ALAG4=THETA(7)*EXP(ETA(7))
>
> ELSE
>
> ALAG4=THETA(8)*EXP(ETA(8))
>
> ENDIF
>
> KTR=THETA(9)*EXP(ETA(9))
>
> $DES
>
> ;DADT(1)=A(2)*K21 + A(3)*K31 - A(1)*(K10+K12+K13)
>
> ;DADT(2)=A(1)*K12 - A(2)*K21
>
> ;DADT(3)=A(1)*K13 - A(3)*K31
>
> DADT(1)=A(5)*KTR + A(2)*K21 + A(3)*K31 - A(1)*(K10+K12+K13)
>
> DADT(2)=A(1)*K12 - A(2)*K21
>
> DADT(3)=A(1)*K13 - A(3)*K31
>
> DADT(4)=-A(4)*KTR
>
> DADT(5)=A(4)*KTR - A(5)*KTR
>
> ;DADT(6)=A(5)*KTR - A(6)*KTR
>
> ;DADT(7)=A(6)*KTR - A(7)*KTR
>
> ;DADT(8)=A(7)*KTR - A(8)*KTR
>
> ;DADT(9)=A(8)*KTR - A(9)*KTR
>
> $ERROR
>
> W=1
>
> IPRED= -2
>

RE: [NMusers] Baseline as a covariate

2010-08-11 Thread Ken Kowalski
Hi Pete,

In this setting I generally try to first model the baseline response and
perhaps pursue alternative structural model forms.  For example, I may
consider a multiplicative relationship rather than an additive relationship
between baseline and placebo/drug effects.  However, if the distribution of
the baseline response is quite complex and not easy to model with a normal
eta on baseline, and I'm concerned that I might be getting a biased estimate
of the baseline response then I may consider treating the observed baseline
as a covariate as a fall-back position.  

This question is similar to whether one uses observed or predicted
concentrations when developing a PK/PD model.  We generally prefer using
predicted concentrations rather than observed concentrations to smooth out
the measurement error (among other reasons as well).  However, if we have a
lot of lack-of-fit in developing a PK model then it may be preferable to use
the observed concentrations.  There is a tradeoff as to whether more bias is
introduced due to lack-of-fit (e.g., poor estimation of the baseline
response) or due to measurement error in using the observed baseline
measurements as a covariate.  If the residual variability due to lack-of-fit
is considerably larger than measurement error, and you can't resolve the
lack-of-fit, then you might consider using the observed baseline response as
a covariate.

Kind regards,

Ken

Kenneth G. Kowalski
President & CEO
A2PG - Ann Arbor Pharmacometrics Group, Inc.
110 E. Miller Ave., Garden Suite
Ann Arbor, MI 48104
Work:  734-274-8255
Cell:  248-207-5082
Fax: 734-913-0230
ken.kowal...@a2pg.com



-Original Message-
From: owner-nmus...@globomaxnm.com [mailto:owner-nmus...@globomaxnm.com] On
Behalf Of Peter Bonate
Sent: Wednesday, August 11, 2010 11:22 AM
To: 'nmusers@globomaxnm.com'
Subject: [NMusers] Baseline as a covariate

I'd like to get the group's opinion on something.  I have a pharmacodynamic
model and the baseline was shown to be a covariate on one of the model
parameters.  I was hoping to get general thoughts on the use of the baseline
as a covariate.  Is there a preference for using the observed baseline vs.
NONMEM predicted baseline?  And does your opinion change if you have a large
residual error?

Thanks

Pete bonate


Peter L. Bonate, PhD, FCP, FAAPS
GlaxoSmithKline
Clinical Pharmacology, Modeling, and Simulation
5 Moore Drive, 17.2259
Research Triangle Park, NC  27709
phone: 919-483-7534
fax: 919-483-8948
email: peter.l.bon...@gsk.com

This is a long one but worth it...

Scientists will never make as much money as business executives.  There is
now mathematical proof for this statement.

Postulate 1: Knowledge is power
postulate 2: Time is money

According to the laws of physics,

   Work
   =   Power(Eq. 1)
   Time

Since, from the 2 postulates above, 
   Knowledge = Power and 
   Time = Money, 
we can substitute into the equation 1 and come up with

   Work 
  = Knowledge
   Money

Solving for money,

   Work 
 = Money
  Knowledge

Hence, there are 2 ways to make money.  If we slug our guts out working, we
can improve our money situation.  This is the normal scientific approach.
However the suits usually opt for the easier solution, i.e., the less you
know, the more you'll make, regardless of the amount of work done.


-Original Message-
From: owner-nmus...@globomaxnm.com [mailto:owner-nmus...@globomaxnm.com] On
Behalf Of Leonid Gibiansky
Sent: Wednesday, August 11, 2010 9:01 AM
To: Ann Rigby-Jones
Cc: 'nmusers@globomaxnm.com'
Subject: Re: [NMusers] Rounding errors with TRANSIT model

Ann
Try ADVAN6 or ADVAN8 or ADVAN13 .

Also, TOL=3 is too small. Increase it to 6-7 or even 9, and also change 
to NSIG=3 SIGL=9 ($EST step, as recommended in the guide).
Also, at least initially, I would remove ETAs from the third compartment 
and from one of the parameters (Q2 or V2) of the second compartment. Do 
you really need both ALAG and transit compartment? They serve the same 
goal, to delay the input, so could be strongly correlated; you may see 
it on the POSTHOC plot of ETA7-ETA8 versus ETA9. I would try to remove 
ETAs from ALAG or KTR to check whether they are needed.
If nothing helps, use UNCONDITIONAL on the $COV to get standard errors, 
and if they are reasonable, ignore the error, it may disappear on the 
next steps of the modeling process
Leonid

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



On 8/11/2010 5:57 AM, Ann Rigby-Jones wrote:
> Dear All
>
> I'm trying to evaluate a transit model approach in an attempt to better
> describe early drug concentrations following intravenous injection (1
> minute and 10 minute infusions) of a sedative-hypnotic drug. However,
> every minimisation attempt is terminated due to rounding errors (E=134).
> I've tried the usual stra

Re: [NMusers] Translate ALAG1 and D1 in ADVAN2 to differential equations

2010-08-11 Thread Luann Phillips

Xiao,

Try running a SIMONLY simulation first. If you are using an additive or 
additive + constant CV error model, simulation will sometimes generate 
negative or very tiny DV values. If this is the case, it will cause 
problems with fitting the model to the simulated data.


Luann

Xiao Hu wrote:


Dear Luann, Andreas and others,

Both parts are very clear to me now.  Thank you very much!

My problem was,  when I tried to simulate the differential equation 
model with parameters from ADVAN2, it did not work.  The error message 
is listed below.  This was not an issue during the model switch when D1 
was not included in ADVAN2.  I then tried to derive the parameters from 
the differential equation model directly.  But there were >10 error 
messages like below issued.  Do you have any insight why this happens?
 


0PRED EXIT CODE = 1
0INDIVIDUAL NO.   1   ID= 2.001000E+03   (WITHIN-INDIVIDUAL) 
DATA REC NO.  18

 THETA=
  4.19E+00   1.22E+01   9.10E+00   1.07E+01   1.20E+01   8.89E+00   
0.00E+00   1.50E-03   2.63E-01   2.28E+00

  2.87E+00
 NUMERICAL DIFFICULTIES WITH INTEGRATION ROUTINE.   
 
 MAXIMUM NO. OF EVALUATIONS OF DIFFERENTIAL EQUATIONS,  100, 
EXCEEDED.  


Best regards,
Shelley


Xiao Hu (Shelley), Ph.D.
Scientist,
Development Pharmacokinetics & Disposition
Biogen Idec, Inc.
14 Cambridge Center
Cambridge, MA 02142



*Luann Phillips *

10-Aug-2010 01:29 PM

Message Size: *6.6 KB*


To
Xiao Hu 
cc
nmusers 
Subject
Re: [NMusers] Translate ALAG1 and D1 in ADVAN2 to differential equations








Xiao Hu,

Part 1)
NONMEM handles the input of all doses automatically via the dataset
structure. Therefore, generally there is no need to initialize
compartments or to code infusion rates in the $DES block. An exception
to this rule is when you are dosing or modeling endogenous substances.
Assuming your drug is not an endogenous substance, the differential
equations for ADVAN2 with ALAG1 and D1 are shown below (using ADVAN6).

Part 2)
"I'm not very clear what's the meaning of D1 and KA when both are modeled."

Based upon the ADVAN that you are using, NONMEM is putting the dose into
the depot compartment as a constant rate infusion with a duration of D1
(hours, days, etc.). It starts the infusion into the depot compartment
at time=ALAG1 (hours,days, etc.) after each dose. The dose is then
transferred from the depot compartment to the central compartment using
a first-order process (Ka 1/hr or 1/day, etc.)

I hope this information helps,

Luann Phillips

-

Example Code:

$SUBROUTINES ADVAN6 TOL=5

$MODEL
COMP=(DEPOT,DEFDOSE)
COMP=(CENTRAL,DEFOBS)
COMP=(PD1)
etc.

$PK

KASC=THETA(4)
VSC=THETA(5)
CLSC=THETA(6)
LGSC=THETA(8)

MU_4=KASC
MU_5=VSC
MU_6=CLSC
MU_8=THETA(11)

SD=THETA(9)
SIG=SD

KA=EXP(MU_4+ETA(4))
V=EXP(MU_5+ETA(5))
CL=EXP(MU_6+ETA(6))
K=CL/V
S2=V/1000; DOSE IN 1000 U, CONC in U, VOLUME IN mL
ALAG1=LGSC*EXP(ETA(10))
D1=EXP(MU_8+ETA(8))

$DES

DADT(1) = -KA*A(1)
DADT(2) =  KA*A(1) - K*A(2)
DADT(3) = equations for PD cmt 1

etc.

--



Xiao Hu wrote:
 >
 > Dear NMusers,
 >
 > I'm using ADVAN2 to model the PK of a drug.  To best fit the profile,
 > the model includes ALAG1 and D1. For the next step, the ADVAN2 needs to
 > be translated into differential equation to include a PD compartment.
 >  How should I write the differential equation for ALAG1 and D1?  As you
 > can see, there is Ka in the ADVAN2 model.  I'm not very clear what's the
 > meaning of D1 and KA when both are modeled.  Any hint or previous link
 > would be appreciated. Thanks in advance!
 >
 > $SUBROUTINES ADVAN2
 > $PK  
 >

 >KASC=THETA(4)
 >VSC=THETA(5)
 >CLSC=THETA(6)
 >LGSC=THETA(8)
 >
 >MU_4=KASC
 >MU_5=VSC
 >MU_6=CLSC
 >MU_8=THETA(11)
 >
 >SD=THETA(9)

 >SIG=SD
 >
 >KA=EXP(MU_4+ETA(4))
 >V=EXP(MU_5+ETA(5))
 >CL=EXP(MU_6+ETA(6))
 >K=CL/V
 >S2=V/1000; DOSE IN 1000 U, CONC in U, VOLUME IN mL
 >ALAG1=LGSC*EXP(ETA(10))
 >D1=EXP(MU_8+ETA(8))
 >
 > Final parameter estimates:
 >
 > $THETA
 >12  ;THETA5
 >8.89   ;THETA6
 >0.0015;THETA8
 >0.263 ; THETA9  
 >2.87; THETA11

 >
 > Best regards,
 > Shelley
 >
 > 
 > Xiao Hu (Shelley), Ph.D.
 > Scientist,
 > Development Pharmacokinetics & Disposition
 > Biogen Idec, Inc.
 > 14 Cambridge Center
 > Cambridge, MA 02142



Re: [NMusers] Baseline as a covariate

2010-08-11 Thread Leonid Gibiansky

Hi Peter,
I assume from the question that the baseline is the baseline of your 
modeled PD measure, not of some other value (like the baseline weight), 
and that you model the actual PD measure, not change from the baseline.


Then
- it would be more logical to use the model-predicted baseline;
- for the clinical applications it could be more useful to have observed 
predictor;
- for simulations of future studies it could be more convenient to have 
everything in the model rather than use observed values (especially if 
you apply the model to different population where the baseline value 
could be shifted).


I would try both versions to see the differences, and then use the one 
that is more convenient to use in the particular situation.


Best regards,
Leonid

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



On 8/11/2010 11:21 AM, Peter Bonate wrote:

I'd like to get the group's opinion on something.  I have a pharmacodynamic 
model and the baseline was shown to be a covariate on one of the model 
parameters.  I was hoping to get general thoughts on the use of the baseline as 
a covariate.  Is there a preference for using the observed baseline vs. NONMEM 
predicted baseline?  And does your opinion change if you have a large residual 
error?

Thanks

Pete bonate


Peter L. Bonate, PhD, FCP, FAAPS
GlaxoSmithKline
Clinical Pharmacology, Modeling, and Simulation
5 Moore Drive, 17.2259
Research Triangle Park, NC  27709
phone: 919-483-7534
fax: 919-483-8948
email: peter.l.bon...@gsk.com



RE: [NMusers] Baseline as a covariate

2010-08-11 Thread Samtani, Mahesh [PRDUS]
Dear Dr. Bonate,
Could you kindly elaborate on the structural model that is being used to
characterize your PD system? In my limited experience, I have seen the
behavior that you describe under 2 circumstances:

a) Simple inhibitory Emax PD model with a baseline: Here patients with a
higher baseline (worse disease state) displayed a more pronounced
effect. There is greater margin/room for improvement for a patient
starting out at a higher baseline and hence shows a better response (vs.
another patient that starts out a lower baseline). I was able to model
this behavior by putting an omega block between Emax and the baseline
parameter Eo. It is then very easy to adjudicate the impact of Eo on the
magnitude of effect in simulation mode. 

b) Indirect Response Model: Sun and Jusko [J Pharm Sci 88: 987 (1999)]
have shown that "The baseline value may play an important role in
affecting the extent of the response if its PD relationship can be
described by a turnover Model. When other factors remain constant (e.g.
Smax, SC50, kout), R0 controls the magnitude of the response." Is it
possible that you're getting a spurious baseline covariate effect
because of the choice of your structural model?

I am also quite interested in hearing the general thoughts on the use of
the baseline as a covariate from this forum. In fact I have seen yet
another approach to this problem where the change from baseline was
modeled as the PD endpoint. With this method the baseline is no longer a
parameter in the model and observed baseline can then be used as a
covariate. Does this method offer any benefit or do the statistical
concerns around data transformation negate the benefits of this method.

Thank-you,
Mahesh

-Original Message-
From: owner-nmus...@globomaxnm.com [mailto:owner-nmus...@globomaxnm.com]
On Behalf Of Ken Kowalski
Sent: Wednesday, August 11, 2010 12:12 PM
To: 'Peter Bonate'; nmusers@globomaxnm.com
Subject: RE: [NMusers] Baseline as a covariate

Hi Pete,

In this setting I generally try to first model the baseline response and
perhaps pursue alternative structural model forms.  For example, I may
consider a multiplicative relationship rather than an additive
relationship
between baseline and placebo/drug effects.  However, if the distribution
of
the baseline response is quite complex and not easy to model with a
normal
eta on baseline, and I'm concerned that I might be getting a biased
estimate
of the baseline response then I may consider treating the observed
baseline
as a covariate as a fall-back position.  

This question is similar to whether one uses observed or predicted
concentrations when developing a PK/PD model.  We generally prefer using
predicted concentrations rather than observed concentrations to smooth
out
the measurement error (among other reasons as well).  However, if we
have a
lot of lack-of-fit in developing a PK model then it may be preferable to
use
the observed concentrations.  There is a tradeoff as to whether more
bias is
introduced due to lack-of-fit (e.g., poor estimation of the baseline
response) or due to measurement error in using the observed baseline
measurements as a covariate.  If the residual variability due to
lack-of-fit
is considerably larger than measurement error, and you can't resolve the
lack-of-fit, then you might consider using the observed baseline
response as
a covariate.

Kind regards,

Ken

Kenneth G. Kowalski
President & CEO
A2PG - Ann Arbor Pharmacometrics Group, Inc.
110 E. Miller Ave., Garden Suite
Ann Arbor, MI 48104
Work:  734-274-8255
Cell:  248-207-5082
Fax: 734-913-0230
ken.kowal...@a2pg.com



-Original Message-
From: owner-nmus...@globomaxnm.com [mailto:owner-nmus...@globomaxnm.com]
On
Behalf Of Peter Bonate
Sent: Wednesday, August 11, 2010 11:22 AM
To: 'nmusers@globomaxnm.com'
Subject: [NMusers] Baseline as a covariate

I'd like to get the group's opinion on something.  I have a
pharmacodynamic
model and the baseline was shown to be a covariate on one of the model
parameters.  I was hoping to get general thoughts on the use of the
baseline
as a covariate.  Is there a preference for using the observed baseline
vs.
NONMEM predicted baseline?  And does your opinion change if you have a
large
residual error?

Thanks

Pete bonate


Peter L. Bonate, PhD, FCP, FAAPS
GlaxoSmithKline
Clinical Pharmacology, Modeling, and Simulation
5 Moore Drive, 17.2259
Research Triangle Park, NC  27709
phone: 919-483-7534
fax: 919-483-8948
email: peter.l.bon...@gsk.com

This is a long one but worth it...

Scientists will never make as much money as business executives.  There
is
now mathematical proof for this statement.

Postulate 1: Knowledge is power
postulate 2: Time is money

According to the laws of physics,

   Work
   =   Power(Eq. 1)
   Time

Since, from the 2 postulates above, 
   Knowledge = Power and 
   Time = Money, 
we can substitute into the equation 1 and come up with

   Work 
  = Knowledge
   Money

Solvi

RE: [NMusers] Baseline as a covariate

2010-08-11 Thread mats karlsson
Hi Pete,

I think the standard model most of us would use is baseline as a parameter
in the model, and like other parameters it would have a variability between
subjects. What you describe sounds like a covariance between the baseline
parameter and some other parameter. We are used to include such covariances
and I would suggest that to be the primary way to address it. 
If the distribution of baseline is truncated due to inclusion criteria or
physiological limits, I suggest that you may use a semi-parametric IIV model
(Peterson et al., Pharm Res. 2009 Sep;26(9):2174-85)
If the relation is more complex than easily handled via a covariance, then I
suggest that you use the baseline observation as a covariate with error
(Dansirikul et al Pharmacokinet Pharmacodyn. 2008 Jun;35(3):269-83.)

Best regards,
Mats

Mats Karlsson, PhD
Professor of Pharmacometrics
Dept of Pharmaceutical Biosciences
Uppsala University
Swedent regards,
Mats

Postal address: Box 591, 751 24 Uppsala, Sweden
Phone +46 18 4714105
Fax + 46 18 4714003


-Original Message-
From: owner-nmus...@globomaxnm.com [mailto:owner-nmus...@globomaxnm.com] On
Behalf Of Peter Bonate
Sent: Wednesday, August 11, 2010 5:22 PM
To: 'nmusers@globomaxnm.com'
Subject: [NMusers] Baseline as a covariate

I'd like to get the group's opinion on something.  I have a pharmacodynamic
model and the baseline was shown to be a covariate on one of the model
parameters.  I was hoping to get general thoughts on the use of the baseline
as a covariate.  Is there a preference for using the observed baseline vs.
NONMEM predicted baseline?  And does your opinion change if you have a large
residual error?

Thanks

Pete bonate


Peter L. Bonate, PhD, FCP, FAAPS
GlaxoSmithKline
Clinical Pharmacology, Modeling, and Simulation
5 Moore Drive, 17.2259
Research Triangle Park, NC  27709
phone: 919-483-7534
fax: 919-483-8948
email: peter.l.bon...@gsk.com

This is a long one but worth it...

Scientists will never make as much money as business executives.  There is
now mathematical proof for this statement.

Postulate 1: Knowledge is power
postulate 2: Time is money

According to the laws of physics,

   Work
   =   Power(Eq. 1)
   Time

Since, from the 2 postulates above, 
   Knowledge = Power and 
   Time = Money, 
we can substitute into the equation 1 and come up with

   Work 
  = Knowledge
   Money

Solving for money,

   Work 
 = Money
  Knowledge

Hence, there are 2 ways to make money.  If we slug our guts out working, we
can improve our money situation.  This is the normal scientific approach.
However the suits usually opt for the easier solution, i.e., the less you
know, the more you'll make, regardless of the amount of work done.


-Original Message-
From: owner-nmus...@globomaxnm.com [mailto:owner-nmus...@globomaxnm.com] On
Behalf Of Leonid Gibiansky
Sent: Wednesday, August 11, 2010 9:01 AM
To: Ann Rigby-Jones
Cc: 'nmusers@globomaxnm.com'
Subject: Re: [NMusers] Rounding errors with TRANSIT model

Ann
Try ADVAN6 or ADVAN8 or ADVAN13 .

Also, TOL=3 is too small. Increase it to 6-7 or even 9, and also change 
to NSIG=3 SIGL=9 ($EST step, as recommended in the guide).
Also, at least initially, I would remove ETAs from the third compartment 
and from one of the parameters (Q2 or V2) of the second compartment. Do 
you really need both ALAG and transit compartment? They serve the same 
goal, to delay the input, so could be strongly correlated; you may see 
it on the POSTHOC plot of ETA7-ETA8 versus ETA9. I would try to remove 
ETAs from ALAG or KTR to check whether they are needed.
If nothing helps, use UNCONDITIONAL on the $COV to get standard errors, 
and if they are reasonable, ignore the error, it may disappear on the 
next steps of the modeling process
Leonid

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



On 8/11/2010 5:57 AM, Ann Rigby-Jones wrote:
> Dear All
>
> I'm trying to evaluate a transit model approach in an attempt to better
> describe early drug concentrations following intravenous injection (1
> minute and 10 minute infusions) of a sedative-hypnotic drug. However,
> every minimisation attempt is terminated due to rounding errors (E=134).
> I've tried the usual strategies to overcome this e.g using final
> estimates of a terminated run as initial estimates for the next,
> changing number of sig dig requested, changing from a diagonal omega to
> a block omega, but nothing has been successful.
>
> I'd be very grateful for any suggestions of what I might try next J
> Standard 3-comp and 4-comp mamillary models minise successful with these
> data, but so far no luck with any of the transit models, I have tried
> model with 1 to 6 transit compartments. An example control stream is
> shown below. I'm using NONMEM 7 with Intel Fortran.
>
> With thanks and all best wi