NONMEM Users Network Archive

Hosted by Cognigen

Re: Fwd: T in $DES

From: Jakob Ribbing <jakob.ribbing>
Date: Tue, 6 Jul 2021 16:44:46 +0200

And just to add: if the code you used also crashed, it could be because zer=
o values of T are not allowed in $DES, e.g. division or log of zero.
In that case, you would just avoid it the usual way, by adding a small numb=
As an example integration of non-constant hazard in a time-to even model co=
uld include the log of T and in that case you would use:
DEL = 1E-12

Jakob Ribbing, Ph.D.

Senior Consultant, Pharmetheus AB

Cell/Mobile: +46 (0)70 514 33 77


Phone, Office: +46 (0)18 513 328

Uppsala Science Park, Dag Hammarskjölds väg 36B
SE-752 37 Uppsala, Sweden

> On 6 Jul 2021, at 15:15, Jakob Ribbing <jakob.ribbing
> Dear Matts,
> Did you get funny results in the way that using T_DAY did now work as int=
> If you are unsure you could set up a simple test where you have the analy=
tical solution to the output, as an initial confirmation.
> Otherwise, for models integrating forward in time, a covariate value at t=
ime zero (or subjects first time point) would not have an impact on the mod=
el fit or parameter value, as nonmem would look forward towards the next re=
cord in time.
> $DES isspecial since the solver may move back and forth and time is updat=
ed in-between data records, but what you try to do may still work fine.
> The output in the table at time zero would be the subject’s last =
value because it has not yet entered $DES at time zero, but integrating for=
ward that should not impact the fit (I believe).
> Best regards
> Jakob
>> On 6 Jul 2021, at 14:44, Matts Kågedal <mattskagedal
>> Hi all,
>> I have a question regaring T in $DES.
>> I have a time-varying covariate that is derived based on an explicit equ=
ation and then use in a differential equation.
>> I got some funny results in the output table and investigated a bit furt=
>> I therefore derived T_DAY=T in $DES as below and output it in $TABLE.
>> Why is T_DAY at TIME=0 equal to the time of the last observation for t=
he patient? I was expecting it to be Zero (same as Time). Seems to be the s=
ame for all IDs in the dataset.
>> Below is the output created in $TABLE including the "derived" variable T=
>> Any advice would be appreciated.
>> Matts Kågedal
>> <image.png>
>> <image.png>

*This communication is confidential and is only intended for the use of the=
individual or entity to which it is directed. It may contain information
that is privileged and exempt from disclosure under applicable law. If you=
are not the intended recipient please notify us immediately. Please do not=
copy it or disclose its contents to any other person.*

*Any personal data
will be processed in accordance with Pharmetheus' privacy notice, available=
here <>.**

Received on Tue Jul 06 2021 - 10:44:46 EDT

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to:

Once subscribed, you may contribute to the discussion by emailing: