From: BellyGom@aol.com
Subject: [NMusers] lagged concentrations
Date: 10/29/2003 2:36 PM

Dear All,

I have a coding problem and hope that someone can kindly
enlighten me!

I have a PKPD model (a zero-order one compartment model for
PK: fixed), and a part of the model requires concentration
estimates from different time point:

$PK

~ ~ ~

S1   = V
S2   = V
S3   = V

K    = CL/V

ALAG2 = THETA()
ALAG3 = THETA()

$DES
DADT(1) = -K*A(1)
DADT(2) = -K*A(2)
DADT(3) = -K*A(3)

C1=A(1)/S1
C2=A(2)/S2
C3=A(3)/S3

I did not initialise compartment 2 and 3 since the corresponding
amount should be 0 at the beginning anyway. Note that neither
comp. 2 or comp.3 is the output.

Now, the above code does not work and I am not sure why...
Please help!

Sincerely,
In-Sun Nam

_______________________________________________________

From: BellyGom@aol.com
Subject: Re: [NMusers] lagged concentrations
Date: 10/29/2003 4:18 PM

Dear Leonid,

Thank you so much for your interest in the problem; hope that
I will describe it a little better this time.

Actually the entire control stream will be too confusing and
the PD part of the corresponding PKPD model is not at all
related to the problem; so I put only the PK bit (all PK
parameters are fixed to the values obtained from a separate
PK analysis).

Basically I have a perfectly working zero-order one
compartment PK model without an error. But now I need
two more concentration estimates from two different time
points (consequently require two more compartments):

C(t)       : compartment 1/V
C(t-theta(1))  : compartment 2/V
C(t-theta(2))  : compartment 3/V

The following code should ideally had given me lagged dose
amount estimates A(2), A(3); in particular A(2) should had
been basically A(1), time lagged by theta(1). But unfortunately
the value of A(2) stays zero regardless of time. Note that I
did not initialise compartment 2 and 3 since the corresponding amount
should be 0 at the beginning anyway.

$PROBLEM ~~
$INPUT ID TIME DV AMDT MDV CMT ~~
$DATA ~
$SUBROUTINES ADVAN6 TOL=5
$MODEL
COMP=1
COMP=2
COMP=3
$PK
CALLFL=-2
CL = THETA()
V = ()

S1   = V
S2   = V
S3   = V

K    = CL/V

ALAG2 = THETA()
ALAG3 = THETA()

$DES
DADT(1) = -K*A(1)
DADT(2) = -K*A(2)
DADT(3) = -K*A(3)

C1=A(1)/S1
C2=A(2)/S2
C3=A(3)/S3

So help!

Sincerely,
In-Sun Nam
_______________________________________________________

From: Leonid Gibiansky 
Subject: Re: [NMusers] lagged concentrations
Date: 10/29/2003 4:35 PM

My guess is that you did not have a dose records that assign
dose to the compartments 2 and 3 (is this what you mean by "I
did not initialise compartment 2 and 3"). You should put the
same dose to all compartments at the same time. According to
the NONMEM guide:

" Absorption lag applies to the initiating dose and  to all
subsequent additional doses.  If an absorption lag parameter 
is defined by PK for the dose compartment  and  has  a  positive 
value, then the dose ... is actually  introduced  into  the 
system  at  a "lagged  time" equal to the time at which the
dose would ordinarily be introduced plus the value of the
absorption lag parameter. "

This gives you exactly the same profiles in each compartment,
but shifted by ALAG().

Without dose, NONMEM solves equations A'=-K*A with initial
condition A = 0 and gives you the perfectly correct answer A(t) = 0
Good luck
Leonid 
_______________________________________________________

From: BellyGom@aol.com
Subject: Re: [NMusers] lagged concentrations
Date: 10/29/2003 4:49 PM

Dear Leonid,

I was really~ hopping that I can avoid duplicating doing
events for additional compartments in the actual data file;
it is because my full model has 4 additional compartments with
lags, the data involve some 50 patients with many many doses
given forever... Isn't there a more, lets say, elegant way to
do the job, preferably in the control stream?

Well, but then, if that is the only way, so be it!

Many many thanks,
In-Sun Nam

_______________________________________________________

From: Leonid Gibiansky 
Subject: Re: [NMusers] lagged concentrations
Date: 10/30/2003 10:38 AM

Well, this should not be a big deal, just duplicate dosing
records, nothing more. This will not increase computation
time, will just add some extra rows to the data file.

I do not know any more elegant way (this does not mean that
there is no other way, of course)

Leonid 
_______________________________________________________