Re: Steady state dose

From: Alison Boeckmann Date: October 26, 2011 technical Source: mail-archive.com
(second attempt)
Quoted reply history
From: "Alison Boeckmann" <[email protected]> To: "Joanna Lewis" <[email protected]> Cc: "Nick Holford" <[email protected]>, [email protected] Date: Mon, 24 Oct 2011 15:38:44 -0700 Subject: Re: [NMusers] Steady state dose My remarks are attached lewis.ss.nmusers2.txt On Friday, October 21, 2011 3:52 PM, "Joanna Lewis" <[email protected]> wrote: > Thank you everyone for your helpful comments. A bit of explanation and a > new question follow, and once again I would be very grateful for your > thoughts. > > To clarify my model a bit: the context is children born with HIV who > have never received any antiretroviral therapy (ART). I am interested in > the mechanisms by which their CD4 T-cell numbers, which are depleted by > HIV, recover when they start ART. I am using a 2-compartment model of > T-cell homeostasis (see, eg Yates, Stark, Klein, Antia and Callard. PLoS > Medicine 4(5) 2007), in which compartment X represents resting cells, > and compartment Y dividing cells. The idea in the model I was trying to > write down is that HIV depletes T-cells by increasing the death rate in > the dividing pool. When ART is started, this effect disappears and the T > cell concentration moves from a "without-treatment" to an > "with-treatment" steady-state. > > Some people have commented that it is strange to write: > > HIV = SS*THETA(9)*EXP(ETA(9)) > > What I was attempting to do was to use SS as a covariate, *as well as* a > note to NONMEM to calculate the steady-state amounts. Thus, at time zero > (where SS=1) the death rate of dividing cells, MU, is higher than at all > subsequent times: > > MU = Q*A(2) + HIV > > This use of SS as a covariate was also my reason for initialising the > compartments near to the steady-state and allowing them to equilibrate > before t=0, which Alison commented on. As I understand it, NONMEM > extrapolates covariates backwards in a stepwise way, so if the first > record has SS=1 then SS=1, and hence the elevated value of MU, will be > assumed for all times before the first record (ie before ART was > started). Because the ODEs do not allow transitions from positive to > negative amounts in compartments, the steady state reached this way is a > positive one - not the negative one which, though mathematically an > equally valid solution to DA/DT == 0, is biologically meaningless. > > So in summary, my new question is: do the internal workings of NONMEM > allow SS to be used as a covariate/flag in this way? Or do I need to > create a separate flag, with a different name? > > Thanks again, > Joanna > > On 18/10/2011 17:39, Alison Boeckmann wrote: > > Attached are a few remarks > > lewis.ss.nmusers.txt > > > > On Tuesday, October 18, 2011 9:42 AM, "Nick Holford" > > <[email protected]> wrote: > >> Joanna, > >> > >> I don't know of any way to request a positive SS solution. However I > >> wonder if the problem is related to the way you use the SS data item in > >> the code. > >> > >> HIV = SS*THETA(9)*EXP(ETA(9)) > >> > >> Usually there is just one record with SS=1 at the start of each > >> subject's records. If this is the case then the value of HIV will be > >> zero at all times after the SS=1 record. Does this make sense for your > >> model? > >> > >> I am not even sure that SS would have the value of 1 during the > >> calculation of the steady state solution -- although that would be a > >> reasonable assumption that could be confirmed by someone such as Alison > >> Boeckmann. > >> > >> Nick > >> > >> PS NONMEM calculates steady state amounts in compartments -- it does not > >> calculate steady state doses. > >> > >> On 15/10/2011 3:07 a.m., Joanna Lewis wrote: > >>> Dear NONMEM users, > >>> > >>> I have a question about NONMEM's calculation of steady-state doses. > >>> > >>> I am trying to model a system with two compartments. I want my t=0 > >>> boundary condition to be that the system is at steady-state, with a > >>> rate of cell death/clearance from one of the compartments which is > >>> higher than for all t>0. Unfortunately, I don't think there is an > >>> analytic solution for this steady state (see code copied below). > >>> > >>> From an old NMusers thread > >>> ( http://www.mail-archive.com/[email protected]/msg00584.html), I > >>> found out that NONMEM will find the steady state if you give it SS=1, > >>> RATE=0, AMT=0 in a t=0 record in the data file. When I tried this > >>> though, NONMEM found the wrong root of the steady-state equation (a > >>> negative one). Do you know if there is a way of making sure the steady > >>> state it finds is the positive one? For the moment, I have been > >>> initialising the compartments near to the steady state and at t=-(a > >>> lot), and letting them equilibrate, but I think this is slowing down > >>> my runs and would prefer to use another method. > >>> > >>> Thank you very much in advance for any advice you can offer. > >>> Joanna Lewis > >>> > >>> PhD student > >>> UCL Institute for Child Health > >>> 30 Guilford Street, London WC1N 1EH > >>> > >>> $PROBLEM hapuarachchi0_15sep_1 > >>> $INPUT ID BAGE AGE WEEK TIME CD DV AMT RATE SS TYPE CMT IG > >>> $DATA data.csv IGNORE=@ > >>> > >>> $SUBROUTINE ADVAN6 TOL=5 > >>> > >>> $MODEL > >>> COMP=(X) > >>> COMP=(Y) > >>> > >>> $PK > >>> ANO = THETA(1)*EXP(ETA(1)) > >>> EP = THETA(2)*EXP(ETA(2)) > >>> DEO = THETA(3)*EXP(ETA(3)) > >>> SIG = THETA(4)*EXP(ETA(4)) > >>> SCA = THETA(5)*EXP(ETA(5)) > >>> Q = THETA(6)*EXP(ETA(6)) > >>> > >>> THE = THETA(7)*EXP(ETA(7)) > >>> RHO = THETA(8)*EXP(ETA(8)) > >>> > >>> HIV = SS*THETA(9)*EXP(ETA(9)) > >>> > >>> $DES > >>> > >>> ALP = ANO*EXP(-EP*SCA*A(1)) > >>> DEL = DEO*EXP(SIG*SCA*A(1)) > >>> MU = Q*A(2) + HIV > >>> > >>> DADT(1) = THE + 2*RHO*A(2) - ALP*A(1) - DEL*A(1) > >>> DADT(2) = ALP*A(1) - RHO*A(2) - MU*A(2) > >>> > >>> $ERROR > >>> IPCD = A(1)+A(2) > >>> > >>> Y = IPCD + IPCD*EPS(1) > >>> > >>> $THETA > >>> > >>> ...etc.. > >>> > >>> $OMEGA > >>> > >>> ...etc... > >>> > >>> $SIGMA > >>> > >>> ...etc... > >>> > >>> $ESTIMATION MAXEVAL=0 METHOD=1 INTER SIGDIG=1 PRINT=1 > >>> > >>> $TABLE > >>> > >>> ...etc... > >> > >> -- > >> Nick Holford, Professor Clinical Pharmacology > >> Dept Pharmacology& Clinical Pharmacology > >> 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 > >> > >> > > > -- Alison Boeckmann [email protected] -- Alison Boeckmann [email protected] Joanna, I think it is ok to use the SS data item as you propose: HIV = SS*THETA(9)*EXP(ETA(9)) You should compare the predictions with both approaches, i.e., with SS dose vs. your original approach in which there is no SS dose: "initialising the compartments near to the steady state and at t=-(a lot), and letting them equilibrate" Run both control streams with no $EST record (or with $EST ... MAXEVAL=0) See if the predictions are the same. If they are not the same, then you should send us both control streams with a fragment of the data (just enough to produce a difference in predictions). Maybe someone can help find out what is wrong. However, this appears to be a model where it is preferable to use the I_SS (Initial Steady state) feature. Here, the Steady state is a property of the model, not of the data. Take a look at "INITIAL STEADY STATE EXAMPLE" Here are suggested changes. I have not tested them. Again, you should see the same predictions with no $EST record. (1) Omit the SS data item: E.g., $INPUT ID BAGE AGE WEEK TIME CD DV AMT RATE SS=DROP TYPE CMT IG (2) Omit the SS dose record at the start of the data set. With endogenous drug, no dose record is needed at the start. (3) Add to $PK: I_SS=3 A_0(1)=the value you used when "initialising the compartments near to the steady state" A_0(2)=ditto The initial values A_0 may help PREDPP locate the Initial Steady state solution more quickly. This should give the same results as $PK I_SS=1 and omit the A_0 records. (4) Changes to $PK: IF (TIME=0) THEN HIV = THETA(9)*EXP(ETA(9)) ELSE HIV =0 ENDIF The idea here is that you are building into the model an explicit statement about the state of the model at time 0.
Oct 14, 2011 Joanna Lewis Steady state dose
Oct 17, 2011 Nick Holford Re: Steady state dose
Oct 18, 2011 Alison Boeckmann Re: Steady state dose
Oct 26, 2011 Alison Boeckmann Re: Steady state dose