Hi, Dear NMusers:
I want to add a time-varing covariate in my model. For example, blood
pressure or blood flow as covariates. But I am not sure how to do it. I see
some earlier threads to discuss it but they all use complicated methods.
I am wondering if there are any new way to do it in NM 7.2? I see in the
user guide that EVID=4 can indicate physiological change. Is this what I
should use?
Thank you very much for any suggestions.
Best regards,
Siwei
Time-varing covariate
13 messages
7 people
Latest: Aug 28, 2013
Siwei,
I don't know why you think this complicated. Suppose you have age (AGE) as a covariate. This must of course be a time varying covariate if it is intended to be the current age. And you might have weight (WT) or creatinine clearance (CLCR) as covariates which typically change with time. So just code the $INPUT data items and use them as you wish e.g.
$INPUT ID TIME AGE WT CLCR etc
...
$PK
; CL=(CLnon-renal*f(age) + CLrenal*f(renal_function)) * allometric WT
CL=(THETA(1)*EXP(THETA(2)*(AGE-40)) + THETA(3)*CLCR/100)*(WT/70)**0.75
EVID=4 has nothing to do with using time varying covariates.
Perhaps you could explain more clearly what your problem is and why you think it is complicated to use time varying covariates?
Best wishes,
Nick
Quoted reply history
On 23/08/2013 6:00 p.m., siwei Dai wrote:
> Hi, Dear NMusers:
>
> I want to add a time-varing covariate in my model. For example, blood pressure or blood flow as covariates. But I am not sure how to do it. I see some earlier threads to discuss it but they all use complicated methods. I am wondering if there are any new way to do it in NM 7.2? I see in the user guide that EVID=4 can indicate physiological change. Is this what I should use?
>
> Thank you very much for any suggestions.
> Best regards,
> Siwei
--
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
office:+64(9)923-6730 mobile:NZ +64(21)46 23 53 FR +33(7)85 36 84 99
email: [email protected]
http://holford.fmhs.auckland.ac.nz/
Holford NHG. Disease progression and neuroscience. Journal of Pharmacokinetics
and Pharmacodynamics. 2013;40:369-76
http://link.springer.com/article/10.1007/s10928-013-9316-2
Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for babies and
adults. J Pharm Sci. 2013:
http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
Holford N. A time to event tutorial for pharmacometricians. CPT:PSP. 2013;2:
http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
Holford NHG. Clinical pharmacology = disease progression + drug action. British
Journal of Clinical Pharmacology. 2013:
http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
Hi Siwei,
If you are using an algebraic model (i.e. no differential equations), then you
can simply include it in your equation:
e.g. assuming that SBP is systolic blood pressure in your original data set:
EFF=THETA(1)+SBP*THETA(2)
If you have a differential equation model and you want the time varying
covariate to have an effect that is not a step change, you will need to
interpolate the covariate. Within your data set, you'll need a column for the
next time and the next value of the time varying covariate. Using the same
assumption that you have SBP in your data set as your time varying covariate,
you will want to make two new columns to allow for interpolation:
ID TIME NTIME SBP NSBP DV
1 0 1 110 115 5
1 1 2 115 112 3
1 2 4 112 108 4
Then to use your parameter, you will need code like the following in your $DES
section to linearly interpolate:
$DES
...
;; Current SBP
CSBP = (NSBP - SBP)/(NTIME - TIME) * (T - TIME) + SBP
...
The parameter T is the current time for the differential equation solver which
will be somewhere between TIME and NTIME. TIME is an important column name for
NONMEM.
Thanks,
Bill
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of siwei Dai
Sent: Friday, August 23, 2013 12:01 PM
To: [email protected]
Subject: [NMusers] Time-varing covariate
Hi, Dear NMusers:
I want to add a time-varing covariate in my model. For example, blood pressure
or blood flow as covariates. But I am not sure how to do it. I see some earlier
threads to discuss it but they all use complicated methods.
I am wondering if there are any new way to do it in NM 7.2? I see in the user
guide that EVID=4 can indicate physiological change. Is this what I should use?
Thank you very much for any suggestions.
Best regards,
Siwei
Dear Bill and Siwei,
Although the thought in Bill's reply is right, I think there is an error in
the code. NONMEM by default uses the present values to update from the
previous time.
Further, it is possible to do this interpolation on the fly in the model
file without changes to the data set.
$INPUT ID TIME DV COV ;Cov is time-varying covariate
$PK
IF(NEWIND.NE.2) OTIM=0 ;initialize variable to store old time
IF(NEWIND.NE.2) OCOV=0 ;initialize variable to store old covariate value
$DES
CCOV=OCOV
IF(TIME.GT.OTIM) CCOV=OCOV+(T-TIME)*(COV-OCOV)/(TIME-OTIM) ;CCOV is linear
interpolation between observed covariate values
$ERROR
OCOV =COV ;store previous time
OTIM =TIME ;store previous time
(NB haven't tested the code).
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
http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
www.farmbio.uu.se/research/researchgroups/pharmacometrics/
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of Denney, William S.
Sent: 23 August 2013 20:09
To: siwei Dai; [email protected]
Subject: RE: [NMusers] Time-varing covariate
Hi Siwei,
If you are using an algebraic model (i.e. no differential equations), then
you can simply include it in your equation:
e.g. assuming that SBP is systolic blood pressure in your original data set:
EFF=THETA(1)+SBP*THETA(2)
If you have a differential equation model and you want the time varying
covariate to have an effect that is not a step change, you will need to
interpolate the covariate. Within your data set, you'll need a column for
the next time and the next value of the time varying covariate. Using the
same assumption that you have SBP in your data set as your time varying
covariate, you will want to make two new columns to allow for interpolation:
ID TIME NTIME SBP NSBP DV
1 0 1 110 115 5
1 1 2 115 112 3
1 2 4 112 108 4
Then to use your parameter, you will need code like the following in your
$DES section to linearly interpolate:
$DES
.
;; Current SBP
CSBP = (NSBP - SBP)/(NTIME - TIME) * (T - TIME) + SBP
.
The parameter T is the current time for the differential equation solver
which will be somewhere between TIME and NTIME. TIME is an important column
name for NONMEM.
Thanks,
Bill
From: [email protected] [mailto:[email protected]] On
Behalf Of siwei Dai
Sent: Friday, August 23, 2013 12:01 PM
To: [email protected]
Subject: [NMusers] Time-varing covariate
Hi, Dear NMusers:
I want to add a time-varing covariate in my model. For example, blood
pressure or blood flow as covariates. But I am not sure how to do it. I see
some earlier threads to discuss it but they all use complicated methods.
I am wondering if there are any new way to do it in NM 7.2? I see in the
user guide that EVID=4 can indicate physiological change. Is this what I
should use?
Thank you very much for any suggestions.
Best regards,
Siwei
I think there was a typo, should it be:
IF(TIME.GT.OTIM) CCOV=OCOV+(T-OTIM)*(COV-OCOV)/(TIME-OTIM) ;CCOV is linear
?
Leonid
Original email:
-----------------
Quoted reply history
From: Mats Karlsson [email protected]
Date: Sat, 24 Aug 2013 10:02:00 +0200
To: [email protected], [email protected],
[email protected]
Subject: RE: [NMusers] Time-varing covariate
Dear Bill and Siwei,
Although the thought in Bill's reply is right, I think there is an error in
the code. NONMEM by default uses the present values to update from the
previous time.
Further, it is possible to do this interpolation on the fly in the model
file without changes to the data set.
$INPUT ID TIME DV COV ;Cov is time-varying covariate
$PK
IF(NEWIND.NE.2) OTIM=0 ;initialize variable to store old time
IF(NEWIND.NE.2) OCOV=0 ;initialize variable to store old covariate value
$DES
CCOV=OCOV
IF(TIME.GT.OTIM) CCOV=OCOV+(T-TIME)*(COV-OCOV)/(TIME-OTIM) ;CCOV is linear
interpolation between observed covariate values
$ERROR
OCOV =COV ;store previous time
OTIM =TIME ;store previous time
(NB haven't tested the code).
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
http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
www.farmbio.uu.se/research/researchgroups/pharmacometrics/
From: [email protected] [mailto:[email protected]] On
Behalf Of Denney, William S.
Sent: 23 August 2013 20:09
To: siwei Dai; [email protected]
Subject: RE: [NMusers] Time-varing covariate
Hi Siwei,
If you are using an algebraic model (i.e. no differential equations), then
you can simply include it in your equation:
e.g. assuming that SBP is systolic blood pressure in your original data set:
EFF=THETA(1)+SBP*THETA(2)
If you have a differential equation model and you want the time varying
covariate to have an effect that is not a step change, you will need to
interpolate the covariate. Within your data set, you'll need a column for
the next time and the next value of the time varying covariate. Using the
same assumption that you have SBP in your data set as your time varying
covariate, you will want to make two new columns to allow for interpolation:
ID TIME NTIME SBP NSBP DV
1 0 1 110 115 5
1 1 2 115 112 3
1 2 4 112 108 4
Then to use your parameter, you will need code like the following in your
$DES section to linearly interpolate:
$DES
.
;; Current SBP
CSBP = (NSBP - SBP)/(NTIME - TIME) * (T - TIME) + SBP
.
The parameter T is the current time for the differential equation solver
which will be somewhere between TIME and NTIME. TIME is an important column
name for NONMEM.
Thanks,
Bill
From: [email protected] [mailto:[email protected]] On
Behalf Of siwei Dai
Sent: Friday, August 23, 2013 12:01 PM
To: [email protected]
Subject: [NMusers] Time-varing covariate
Hi, Dear NMusers:
I want to add a time-varing covariate in my model. For example, blood
pressure or blood flow as covariates. But I am not sure how to do it. I see
some earlier threads to discuss it but they all use complicated methods.
I am wondering if there are any new way to do it in NM 7.2? I see in the
user guide that EVID=4 can indicate physiological change. Is this what I
should use?
Thank you very much for any suggestions.
Best regards,
Siwei
--------------------------------------------------------------------
mail2web.com Enhanced email for the mobile individual based on Microsoft®
Exchange - http://link.mail2web.com/Personal/EnhancedEmail
Hi Leonid,
You're right.
Best regards,
Mats
Skickat från min iPhone
25 aug 2013 kl. 02:12 skrev "[email protected]"
<[email protected]>:
> I think there was a typo, should it be:
> IF(TIME.GT.OTIM) CCOV=OCOV+(T-OTIM)*(COV-OCOV)/(TIME-OTIM) ;CCOV is linear
> ?
> Leonid
> Original email:
> -----------------
Quoted reply history
> From: Mats Karlsson [email protected]
> Date: Sat, 24 Aug 2013 10:02:00 +0200
> To: [email protected], [email protected],
> [email protected]
> Subject: RE: [NMusers] Time-varing covariate
>
>
> Dear Bill and Siwei,
>
>
>
> Although the thought in Bill's reply is right, I think there is an error in
> the code. NONMEM by default uses the present values to update from the
> previous time.
>
> Further, it is possible to do this interpolation on the fly in the model
> file without changes to the data set.
>
>
>
> $INPUT ID TIME DV COV ;Cov is time-varying covariate
>
> $PK
>
> IF(NEWIND.NE.2) OTIM=0 ;initialize variable to store old time
>
> IF(NEWIND.NE.2) OCOV=0 ;initialize variable to store old covariate value
>
>
>
> $DES
>
> CCOV=OCOV
>
> IF(TIME.GT.OTIM) CCOV=OCOV+(T-TIME)*(COV-OCOV)/(TIME-OTIM) ;CCOV is linear
> interpolation between observed covariate values
>
>
>
> $ERROR
>
> OCOV =COV ;store previous time
>
> OTIM =TIME ;store previous time
>
>
>
> (NB haven't tested the code).
>
> 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
>
> http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
> www.farmbio.uu.se/research/researchgroups/pharmacometrics/
>
>
>
> From: [email protected] [mailto:[email protected]] On
> Behalf Of Denney, William S.
> Sent: 23 August 2013 20:09
> To: siwei Dai; [email protected]
> Subject: RE: [NMusers] Time-varing covariate
>
>
>
> Hi Siwei,
>
>
>
> If you are using an algebraic model (i.e. no differential equations), then
> you can simply include it in your equation:
>
>
>
> e.g. assuming that SBP is systolic blood pressure in your original data set:
>
>
>
> EFF=THETA(1)+SBP*THETA(2)
>
>
>
> If you have a differential equation model and you want the time varying
> covariate to have an effect that is not a step change, you will need to
> interpolate the covariate. Within your data set, you'll need a column for
> the next time and the next value of the time varying covariate. Using the
> same assumption that you have SBP in your data set as your time varying
> covariate, you will want to make two new columns to allow for interpolation:
>
>
>
> ID TIME NTIME SBP NSBP DV
>
> 1 0 1 110 115 5
>
> 1 1 2 115 112 3
>
> 1 2 4 112 108 4
>
>
>
> Then to use your parameter, you will need code like the following in your
> $DES section to linearly interpolate:
>
>
>
> $DES
>
> .
>
> ;; Current SBP
>
> CSBP = (NSBP - SBP)/(NTIME - TIME) * (T - TIME) + SBP
>
> .
>
>
>
> The parameter T is the current time for the differential equation solver
> which will be somewhere between TIME and NTIME. TIME is an important column
> name for NONMEM.
>
>
>
> Thanks,
>
>
>
> Bill
>
>
>
> From: [email protected] [mailto:[email protected]] On
> Behalf Of siwei Dai
> Sent: Friday, August 23, 2013 12:01 PM
> To: [email protected]
> Subject: [NMusers] Time-varing covariate
>
>
>
> Hi, Dear NMusers:
>
>
>
> I want to add a time-varing covariate in my model. For example, blood
> pressure or blood flow as covariates. But I am not sure how to do it. I see
> some earlier threads to discuss it but they all use complicated methods.
>
>
>
> I am wondering if there are any new way to do it in NM 7.2? I see in the
> user guide that EVID=4 can indicate physiological change. Is this what I
> should use?
>
>
>
> Thank you very much for any suggestions.
>
>
>
> Best regards,
>
>
>
> Siwei
>
>
>
> --------------------------------------------------------------------
> mail2web.com – Enhanced email for the mobile individual based on Microsoft®
> Exchange - http://link.mail2web.com/Personal/EnhancedEmail
>
>
Dear Nick,
In your reply to Siwei, you proposed the following code:
> $PK
> ; CL=(CLnon-renal*f(age) + CLrenal*f(renal_function)) * allometric WT
> CL=(THETA(1)*EXP(THETA(2)*(AGE-40)) + THETA(3)*CLCR/100)*(WT/70)**0.75
I would like to make a comment on the coding of the renal function. If CLCR is expressed in ml/min, the expression THETA(3)*CLCR/100 represents the renal clearance of the individual with renal function CLCR, where THETA(3) is the drug's renal clearance for an individual with creatinine clearance of 100 ml/min (a reasonable value for an average individual but not a standard value). In my opinion, the allometric term should not be applied on this renal part of clearance. Therefore I suggest to use the following code line:
; CL= CLnon-renal*f(age)*allometric WT + CLrenal*f(renal_function)
CL= THETA(1)*EXP(THETA(2)*(AGE-40))*(WT/70)**0.75 + THETA(3)*CLCR/100
If CLCR is expressed in ml/min/1.73m2 (the 'normalized renal function', often used in lab results, e.g. in the MDRD equation; useful for clinical judgement of renal function, but not for modeling or dosing purposes), your code could be used, but in that case I would prefer to first convert CLCR to ml/min (the 'true renal function') and then use the above code line.
Note: Units of THETA(1) and THETA(3) are here in ml/min; for using the more conventional L/h, multiplication by 60/1000 should be added.
best regards,
Hans Proost
Johannes H. Proost
Dept. of Pharmacokinetics, Toxicology and Targeting
University Centre for Pharmacy
Antonius Deusinglaan 1
9713 AV Groningen, The Netherlands
tel. 31-50 363 3292
fax 31-50 363 3247
Email: [email protected]
Hi, Sebastien, Bill, Nick, Leonid, Mats and Hans:
Thank you all very much for the suggestions and nice discussions. I enjoyed
to learn from this thread and I am very clear how this should be handled
now. I believe this thread also provided a nice record for other new folks
like me to learn from.
Thanks a lot.
Best regards,
Siwei
Quoted reply history
On Fri, Aug 23, 2013 at 1:10 PM, Nick Holford <[email protected]>wrote:
> Siwei,
>
> I don't know why you think this complicated. Suppose you have age (AGE) as
> a covariate. This must of course be a time varying covariate if it is
> intended to be the current age. And you might have weight (WT) or
> creatinine clearance (CLCR) as covariates which typically change with time.
> So just code the $INPUT data items and use them as you wish e.g.
>
> $INPUT ID TIME AGE WT CLCR etc
> ...
>
> $PK
> ; CL=(CLnon-renal*f(age) + CLrenal*f(renal_function)) * allometric WT
> CL=(THETA(1)*EXP(THETA(2)*(**AGE-40)) + THETA(3)*CLCR/100)*(WT/70)**0.**75
>
> EVID=4 has nothing to do with using time varying covariates.
>
> Perhaps you could explain more clearly what your problem is and why you
> think it is complicated to use time varying covariates?
>
> Best wishes,
>
> Nick
>
>
> On 23/08/2013 6:00 p.m., siwei Dai wrote:
>
>> Hi, Dear NMusers:
>> I want to add a time-varing covariate in my model. For example, blood
>> pressure or blood flow as covariates. But I am not sure how to do it. I see
>> some earlier threads to discuss it but they all use complicated methods.
>> I am wondering if there are any new way to do it in NM 7.2? I see in the
>> user guide that EVID=4 can indicate physiological change. Is this what I
>> should use?
>> Thank you very much for any suggestions.
>> Best regards,
>> Siwei
>>
>
> --
> 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
> office:+64(9)923-6730 mobile:NZ +64(21)46 23 53 FR +33(7)85 36 84 99
> email: [email protected]
> http://holford.fmhs.auckland.ac.nz/
>
> Holford NHG. Disease progression and neuroscience. Journal of
> Pharmacokinetics and Pharmacodynamics. 2013;40:369-76
> http://link.springer.com/article/10.1007/s10928-013-9316-2
> Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for babies and
> adults. J Pharm Sci. 2013: http://onlinelibrary.wiley.**
> http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
> Holford N. A time to event tutorial for pharmacometricians. CPT:PSP.
> 2013;2:
> http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
> Holford NHG. Clinical pharmacology = disease progression + drug action.
> British Journal of Clinical Pharmacology. 2013:
> http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
>
>
>
Dear Siwei,
If you have a time-varying covariate, you may want to entertain the extended
models possible/necessary for time-varying, as opposed to time-constant,
covariates. See Wählby et al Models for time-varying covariates in
population pharmacokinetic-pharmacodynamic analysis. Br J Clin Pharmacol.
2004 Oct;58(4):367-77.
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
http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
www.farmbio.uu.se/research/researchgroups/pharmacometrics/
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of siwei Dai
Sent: 26 August 2013 18:13
To: [email protected]
Subject: Re: [NMusers] Time-varing covariate
Hi, Sebastien, Bill, Nick, Leonid, Mats and Hans:
Thank you all very much for the suggestions and nice discussions. I enjoyed
to learn from this thread and I am very clear how this should be handled
now. I believe this thread also provided a nice record for other new folks
like me to learn from.
Thanks a lot.
Best regards,
Siwei
On Fri, Aug 23, 2013 at 1:10 PM, Nick Holford <[email protected]>
wrote:
Siwei,
I don't know why you think this complicated. Suppose you have age (AGE) as a
covariate. This must of course be a time varying covariate if it is intended
to be the current age. And you might have weight (WT) or creatinine
clearance (CLCR) as covariates which typically change with time. So just
code the $INPUT data items and use them as you wish e.g.
$INPUT ID TIME AGE WT CLCR etc
...
$PK
; CL=(CLnon-renal*f(age) + CLrenal*f(renal_function)) * allometric WT
CL=(THETA(1)*EXP(THETA(2)*(AGE-40)) + THETA(3)*CLCR/100)*(WT/70)**0.75
EVID=4 has nothing to do with using time varying covariates.
Perhaps you could explain more clearly what your problem is and why you
think it is complicated to use time varying covariates?
Best wishes,
Nick
On 23/08/2013 6:00 p.m., siwei Dai wrote:
Hi, Dear NMusers:
I want to add a time-varing covariate in my model. For example, blood
pressure or blood flow as covariates. But I am not sure how to do it. I see
some earlier threads to discuss it but they all use complicated methods.
I am wondering if there are any new way to do it in NM 7.2? I see in the
user guide that EVID=4 can indicate physiological change. Is this what I
should use?
Thank you very much for any suggestions.
Best regards,
Siwei
--
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
office:+64(9)923-6730 <tel:%2B64%289%29923-6730> mobile:NZ +64(21)46 23 53
<tel:%2B64%2821%2946%2023%2053> FR +33(7)85 36 84 99
<tel:%2B33%287%2985%2036%2084%2099>
email: [email protected]
http://holford.fmhs.auckland.ac.nz/
Holford NHG. Disease progression and neuroscience. Journal of
Pharmacokinetics and Pharmacodynamics. 2013;40:369-76
http://link.springer.com/article/10.1007/s10928-013-9316-2
Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for babies and
adults. J Pharm Sci. 2013:
http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
Holford N. A time to event tutorial for pharmacometricians. CPT:PSP. 2013;2:
http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
Holford NHG. Clinical pharmacology = disease progression + drug action.
British Journal of Clinical Pharmacology. 2013:
http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
There have been a number of interesting comments.
The original issue has to do with the way this is described in on-line
help for EVID.
Would it be more clear if this said:
a physiological variable changes (and this is at a different time
than any observation or dose event).
Or can someone suggest a better wording that would not add to the
confusion?
Quoted reply history
On Fri, Aug 23, 2013, at 10:51 AM, siwei Dai wrote:
Hi, Nick:
Thank you for the response.
I meant to say EVID = 2 but not '4', my mistake. In the user guide, it
says:
2 Other-type event. The DV data item is ignored. Dose-related
data items must be zero. Examples of other-type events are: A
compartment is turned on or off (CMT specifies which compartment
is to be turned on or off); a prediction is obtained at a speci-
fied time so that it may be displayed in a table or scatterplot
(PCMT specifies the compartment from which the prediction is
obtained); a physiological variable changes.
I am asking the question because I thought that usually the covariates
stay the same, but I want to add a covariate that changes during the
day, so every observation line will have a different covariate value.
If I understand your email correctly, I don't need to do anything
special to treat this type covariates then?
Thanks!
Best regards,
Siwei
On Fri, Aug 23, 2013 at 1:10 PM, Nick Holford
<[1][email protected]> wrote:
Siwei,
I don't know why you think this complicated. Suppose you have age
(AGE) as a covariate. This must of course be a time varying
covariate if it is intended to be the current age. And you might
have weight (WT) or creatinine clearance (CLCR) as covariates which
typically change with time. So just code the $INPUT data items and
use them as you wish e.g.
$INPUT ID TIME AGE WT CLCR etc
...
$PK
; CL=(CLnon-renal*f(age) + CLrenal*f(renal_function)) * allometric
WT
CL=(THETA(1)*EXP(THETA(2)*(AGE-40)) +
THETA(3)*CLCR/100)*(WT/70)**0.75
EVID=4 has nothing to do with using time varying covariates.
Perhaps you could explain more clearly what your problem is and why
you think it is complicated to use time varying covariates?
Best wishes,
Nick
On 23/08/2013 6:00 p.m., siwei Dai wrote:
Hi, Dear NMusers:
I want to add a time-varing covariate in my model. For example,
blood pressure or blood flow as covariates. But I am not sure how to
do it. I see some earlier threads to discuss it but they all use
complicated methods.
I am wondering if there are any new way to do it in NM 7.2? I see
in the user guide that EVID=4 can indicate physiological change. Is
this what I should use?
Thank you very much for any suggestions.
Best regards,
Siwei
--
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
office:[2]+64(9)923-6730 mobile:NZ [3]+64(21)46 23 53 FR [4]+33(7)85
36 84 99
email: [5][email protected]
[6] http://holford.fmhs.auckland.ac.nz/
Holford NHG. Disease progression and neuroscience. Journal of
Pharmacokinetics and Pharmacodynamics. 2013;40:369-76
[7] http://link.springer.com/article/10.1007/s10928-013-9316-2
Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for
babies and adults. J Pharm Sci. 2013:
[8] http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
Holford N. A time to event tutorial for pharmacometricians. CPT:PSP.
2013;2:
[9] http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
Holford NHG. Clinical pharmacology = disease progression + drug
action. British Journal of Clinical Pharmacology. 2013:
[10] http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
References
1. mailto:[email protected]
2. tel:%2B64%289%29923-6730
3. tel:%2B64%2821%2946%2023%2053
4. tel:%2B33%287%2985%2036%2084%2099
5. mailto:[email protected]
6. http://holford.fmhs.auckland.ac.nz/
7. http://link.springer.com/article/10.1007/s10928-013-9316-2
8. http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
9. http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
10. http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
--
Alison Boeckmann
[email protected]
Dear Alison,
It may be clearer. It certainly would capture most covariate changes but on
the other hand you may need to used EVID=2 even when the physiological
variable change is at an observation/dose event (if you want to have the
covariate values feed forward rather than backwards). Also, you may not need
to have to use EVID=2 to make the covariate change at other times than event
times (as my example code tried to illustrate).
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
http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
www.farmbio.uu.se/research/researchgroups/pharmacometrics/
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of Alison Boeckmann
Sent: 27 August 2013 22:46
To: siwei Dai; ajbf
Cc: [email protected]
Subject: Re: [NMusers] Time-varing covariate
There have been a number of interesting comments.
The original issue has to do with the way this is described in on-line help
for EVID.
Would it be more clear if this said:
a physiological variable changes (and this is at a different time than any
observation or dose event).
Or can someone suggest a better wording that would not add to the confusion?
On Fri, Aug 23, 2013, at 10:51 AM, siwei Dai wrote:
Hi, Nick:
Thank you for the response.
I meant to say EVID = 2 but not '4', my mistake. In the user guide, it says:
2 Other-type event. The DV data item is ignored. Dose-related
data items must be zero. Examples of other-type events are: A
compartment is turned on or off (CMT specifies which compartment
is to be turned on or off); a prediction is obtained at a speci-
fied time so that it may be displayed in a table or scatterplot
(PCMT specifies the compartment from which the prediction is
obtained); a physiological variable changes.
I am asking the question because I thought that usually the covariates stay
the same, but I want to add a covariate that changes during the day, so
every observation line will have a different covariate value.
If I understand your email correctly, I don't need to do anything special to
treat this type covariates then?
Thanks!
Best regards,
Siwei
On Fri, Aug 23, 2013 at 1:10 PM, Nick Holford <[email protected]>
wrote:
Siwei,
I don't know why you think this complicated. Suppose you have age (AGE) as a
covariate. This must of course be a time varying covariate if it is intended
to be the current age. And you might have weight (WT) or creatinine
clearance (CLCR) as covariates which typically change with time. So just
code the $INPUT data items and use them as you wish e.g.
$INPUT ID TIME AGE WT CLCR etc
...
$PK
; CL=(CLnon-renal*f(age) + CLrenal*f(renal_function)) * allometric WT
CL=(THETA(1)*EXP(THETA(2)*(AGE-40)) + THETA(3)*CLCR/100)*(WT/70)**0.75
EVID=4 has nothing to do with using time varying covariates.
Perhaps you could explain more clearly what your problem is and why you
think it is complicated to use time varying covariates?
Best wishes,
Nick
On 23/08/2013 6:00 p.m., siwei Dai wrote:
Hi, Dear NMusers:
I want to add a time-varing covariate in my model. For example, blood
pressure or blood flow as covariates. But I am not sure how to do it. I see
some earlier threads to discuss it but they all use complicated methods.
I am wondering if there are any new way to do it in NM 7.2? I see in the
user guide that EVID=4 can indicate physiological change. Is this what I
should use?
Thank you very much for any suggestions.
Best regards,
Siwei
--
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
office:+64(9)923-6730 <tel:%2B64%289%29923-6730> mobile:NZ +64(21)46 23 53
<tel:%2B64%2821%2946%2023%2053> FR +33(7)85 36 84 99
<tel:%2B33%287%2985%2036%2084%2099>
email: [email protected]
http://holford.fmhs.auckland.ac.nz/
Holford NHG. Disease progression and neuroscience. Journal of
Pharmacokinetics and Pharmacodynamics. 2013;40:369-76
http://link.springer.com/article/10.1007/s10928-013-9316-2
Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for babies and
adults. J Pharm Sci. 2013:
http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
Holford N. A time to event tutorial for pharmacometricians. CPT:PSP. 2013;2:
http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
Holford NHG. Clinical pharmacology = disease progression + drug action.
British Journal of Clinical Pharmacology. 2013:
http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
--
Alison Boeckmann
[email protected]
Alison,
I think the problem with the on-line help arose because a relatively inexperienced nmuser was searching through the help to find some clues on what to do. The use of the "physiological variable changes" expression to describe an EVID=2 event seems to have been interpreted as something special within NONMEM that knew about physiological changes. Of course, this was a misunderstanding.
To avoid the misunderstanding I suggest you make it clearer that the change in a physiological variable is just an example of a covariate change at a non-dose and non-observation event time e.g.
"Examples of other-type events are: A compartment is turned on or off (CMT specifies which compartment is to be turned on or off); a prediction is obtained at a specified time so that it may be displayed in a table or scatterplot ; some event occurs at a different time than any observation or dose event e.g. a covariate such as weight changes, an intervention such as hemodialysis is started or stopped."
Adding more specific examples of the use of EVID=2 would perhaps be useful. Does anyone have any other examples?
I also suggest removing reference to PCMT "(PCMT specifies the compartment from which the prediction is obtained)" because it is not directly relevant to EVID=2. An inexperienced user might interpret the remark about PCMT to imply that PCMT is required for use with EVID=2. In my own experience I have never found the need to use PCMT. I usually do not rely on the default compartment with complex models but use the compartment explicitly in $ERROR to define the prediction I want to output.
Best wishes,
Nick
Quoted reply history
On 27/08/2013 10:45 p.m., Alison Boeckmann wrote:
> There have been a number of interesting comments.
>
> The original issue has to do with the way this is described in on-line help for EVID.
>
> Would it be more clear if this said:
>
> > a physiological variable changes (and this is at a different time than any observation or dose event).
>
> Or can someone suggest a better wording that would not add to the confusion?
>
> On Fri, Aug 23, 2013, at 10:51 AM, siwei Dai wrote:
>
> > Hi, Nick:
> > Thank you for the response.
> >
> > I meant to say EVID = 2 but not '4', my mistake. In the user guide, it says:
> >
> > 2 Other-type event. The DV data item is ignored. Dose-related
> > data items must be zero. Examples of other-type events are: A
> > compartment is turned on or off (CMT specifies which compartment
> > is to be turned on or off); a prediction is obtained at a speci-
> > fied time so that it may be displayed in a table or scatterplot
> > (PCMT specifies the compartment from which the prediction is
> > obtained); a physiological variable changes.
> >
> > I am asking the question because I thought that usually the covariates stay the same, but I want to add a covariate that changes during the day, so every observation line will have a different covariate value. If I understand your email correctly, I don't need to do anything special to treat this type covariates then?
> >
> > Thanks!
> > Best regards,
> > Siwei
> >
> > On Fri, Aug 23, 2013 at 1:10 PM, Nick Holford < [email protected] < mailto: [email protected] >> wrote:
> >
> > Siwei,
> >
> > I don't know why you think this complicated. Suppose you have age
> > (AGE) as a covariate. This must of course be a time varying
> > covariate if it is intended to be the current age. And you might
> > have weight (WT) or creatinine clearance (CLCR) as covariates
> > which typically change with time. So just code the $INPUT data
> > items and use them as you wish e.g.
> >
> > $INPUT ID TIME AGE WT CLCR etc
> > ...
> >
> > $PK
> > ; CL=(CLnon-renal*f(age) + CLrenal*f(renal_function)) * allometric WT
> > CL=(THETA(1)*EXP(THETA(2)*(AGE-40)) +
> > THETA(3)*CLCR/100)*(WT/70)**0.75
> >
> > EVID=4 has nothing to do with using time varying covariates.
> >
> > Perhaps you could explain more clearly what your problem is and
> > why you think it is complicated to use time varying covariates?
> >
> > Best wishes,
> >
> > Nick
> >
> > On 23/08/2013 6:00 p.m., siwei Dai wrote:
> >
> > Hi, Dear NMusers:
> > I want to add a time-varing covariate in my model. For
> > example, blood pressure or blood flow as covariates. But I am
> > not sure how to do it. I see some earlier threads to discuss
> > it but they all use complicated methods.
> > I am wondering if there are any new way to do it in NM 7.2?
> > I see in the user guide that EVID=4 can indicate
> > physiological change. Is this what I should use?
> > Thank you very much for any suggestions.
> > Best regards,
> > Siwei
> >
> > --
> > 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
> > office:+64(9)923-6730 <tel:%2B64%289%29923-6730> mobile:NZ
> > +64(21)46 23 53 <tel:%2B64%2821%2946%2023%2053> FR +33(7)85 36 84
> > 99 <tel:%2B33%287%2985%2036%2084%2099>
> > email: [email protected] <mailto:[email protected]>
> > http://holford.fmhs.auckland.ac.nz/
> >
> > Holford NHG. Disease progression and neuroscience. Journal of
> > Pharmacokinetics and Pharmacodynamics. 2013;40:369-76
> > http://link.springer.com/article/10.1007/s10928-013-9316-2
> > Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for
> > babies and adults. J Pharm Sci. 2013:
> > http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
> > Holford N. A time to event tutorial for pharmacometricians.
> > CPT:PSP. 2013;2:
> > http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
> > Holford NHG. Clinical pharmacology = disease progression + drug
> > action. British Journal of Clinical Pharmacology. 2013:
> > http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
>
> --
> Alison Boeckmann
> [email protected] <mailto:[email protected]>
--
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
office:+64(9)923-6730 mobile:NZ +64(21)46 23 53 FR +33(7)85 36 84 99
email: [email protected]
http://holford.fmhs.auckland.ac.nz/
Holford NHG. Disease progression and neuroscience. Journal of Pharmacokinetics
and Pharmacodynamics. 2013;40:369-76
http://link.springer.com/article/10.1007/s10928-013-9316-2
Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for babies and
adults. J Pharm Sci. 2013:
http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
Holford N. A time to event tutorial for pharmacometricians. CPT:PSP. 2013;2:
http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
Holford NHG. Clinical pharmacology = disease progression + drug action. British
Journal of Clinical Pharmacology. 2013:
http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
Nick,
Thanks for the suggestions.
Stuart supplied another example in NONMEM Uses Guide VI (PREDPP) p. 57:
A value of 2 indicates that the event is neither an observation nor
dose event. The corresponding event is referred to as an other-type
event. Examples of other-type events are: the time a urine
collection begins, the time a urine collection ends, and the time a
change in a covariable (such as glomelular filtration rate) is noted.
The user may create an other-type event for whatever reasons he wishes;
he need only mark an occurence of this type of event with an event
record containing an EVID data item equal to 2.
Quoted reply history
On Wed, Aug 28, 2013, at 12:53 AM, Nick Holford wrote:
Alison,
I think the problem with the on-line help arose because a relatively
inexperienced nmuser was searching through the help to find some clues
on what to do. The use of the "physiological variable changes"
expression to describe an EVID=2 event seems to have been interpreted
as something special within NONMEM that knew about physiological
changes. Of course, this was a misunderstanding.
To avoid the misunderstanding I suggest you make it clearer that the
change in a physiological variable is just an example of a covariate
change at a non-dose and non-observation event time e.g.
"Examples of other-type events are: A compartment is turned on or off
(CMT specifies which compartment is to be turned on or off); a
prediction is obtained at a specified time so that it may be displayed
in a table or scatterplot ; some event occurs at a different time
than any observation or dose event e.g. a covariate such as weight
changes, an intervention such as hemodialysis is started or stopped."
Adding more specific examples of the use of EVID=2 would perhaps be
useful. Does anyone have any other examples?
I also suggest removing reference to PCMT "(PCMT specifies the
compartment from which the prediction is obtained)" because it is not
directly relevant to EVID=2. An inexperienced user might interpret the
remark about PCMT to imply that PCMT is required for use with EVID=2.
In my own experience I have never found the need to use PCMT. I usually
do not rely on the default compartment with complex models but use the
compartment explicitly in $ERROR to define the prediction I want to
output.
Best wishes,
Nick
On 27/08/2013 10:45 p.m., Alison Boeckmann wrote:
There have been a number of interesting comments.
The original issue has to do with the way this is described in on-line
help for EVID.
Would it be more clear if this said:
a physiological variable changes (and this is at a different time
than any observation or dose event).
Or can someone suggest a better wording that would not add to the
confusion?
On Fri, Aug 23, 2013, at 10:51 AM, siwei Dai wrote:
Hi, Nick:
Thank you for the response.
I meant to say EVID = 2 but not '4', my mistake. In the user guide, it
says:
2 Other-type event. The DV data item is ignored. Dose-related
data items must be zero. Examples of other-type events are: A
compartment is turned on or off (CMT specifies which compartment
is to be turned on or off); a prediction is obtained at a speci-
fied time so that it may be displayed in a table or scatterplot
(PCMT specifies the compartment from which the prediction is
obtained); a physiological variable changes.
I am asking the question because I thought that usually the covariates
stay the same, but I want to add a covariate that changes during the
day, so every observation line will have a different covariate value.
If I understand your email correctly, I don't need to do anything
special to treat this type covariates then?
Thanks!
Best regards,
Siwei
On Fri, Aug 23, 2013 at 1:10 PM, Nick Holford
<[1][email protected]> wrote:
Siwei,
I don't know why you think this complicated. Suppose you have age
(AGE) as a covariate. This must of course be a time varying
covariate if it is intended to be the current age. And you might
have weight (WT) or creatinine clearance (CLCR) as covariates which
typically change with time. So just code the $INPUT data items and
use them as you wish e.g.
$INPUT ID TIME AGE WT CLCR etc
...
$PK
; CL=(CLnon-renal*f(age) + CLrenal*f(renal_function)) * allometric
WT
CL=(THETA(1)*EXP(THETA(2)*(AGE-40)) +
THETA(3)*CLCR/100)*(WT/70)**0.75
EVID=4 has nothing to do with using time varying covariates.
Perhaps you could explain more clearly what your problem is and why
you think it is complicated to use time varying covariates?
Best wishes,
Nick
On 23/08/2013 6:00 p.m., siwei Dai wrote:
Hi, Dear NMusers:
I want to add a time-varing covariate in my model. For example,
blood pressure or blood flow as covariates. But I am not sure how to
do it. I see some earlier threads to discuss it but they all use
complicated methods.
I am wondering if there are any new way to do it in NM 7.2? I see
in the user guide that EVID=4 can indicate physiological change. Is
this what I should use?
Thank you very much for any suggestions.
Best regards,
Siwei
--
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
office:[2]+64(9)923-6730 mobile:NZ [3]+64(21)46 23 53 FR [4]+33(7)85
36 84 99
email: [5][email protected]
[6] http://holford.fmhs.auckland.ac.nz/
Holford NHG. Disease progression and neuroscience. Journal of
Pharmacokinetics and Pharmacodynamics. 2013;40:369-76
[7] http://link.springer.com/article/10.1007/s10928-013-9316-2
Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for
babies and adults. J Pharm Sci. 2013:
[8] http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
Holford N. A time to event tutorial for pharmacometricians. CPT:PSP.
2013;2:
[9] http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
Holford NHG. Clinical pharmacology = disease progression + drug
action. British Journal of Clinical Pharmacology. 2013:
[10] http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
--
Alison Boeckmann
[11][email protected]
--
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
office:+64(9)923-6730 mobile:NZ +64(21)46 23 53 FR +33(7)85 36 84 99
email: [12][email protected]
[13] http://holford.fmhs.auckland.ac.nz/
Holford NHG. Disease progression and neuroscience. Journal of Pharmacokinetics a
nd Pharmacodynamics. 2013;40:369-76 [14] http://link.springer.com/article/10.1007
/s10928-013-9316-2
Holford N, Heo Y-A, Anderson B. A pharmacokinetic standard for babies and adults
. J Pharm Sci. 2013: [15] http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/ab
stract
Holford N. A time to event tutorial for pharmacometricians. CPT:PSP. 2013;2: [16
] http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
Holford NHG. Clinical pharmacology = disease progression + drug action. British
Journal of Clinical Pharmacology. 2013: [17] http://onlinelibrary.wiley.com/doi/1
0.1111/bcp.12170/abstract
References
1. mailto:[email protected]
2. tel:%2B64%289%29923-6730
3. tel:%2B64%2821%2946%2023%2053
4. tel:%2B33%287%2985%2036%2084%2099
5. mailto:[email protected]
6. http://holford.fmhs.auckland.ac.nz/
7. http://link.springer.com/article/10.1007/s10928-013-9316-2
8. http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
9. http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
10. http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
11. mailto:[email protected]
12. mailto:[email protected]
13. http://holford.fmhs.auckland.ac.nz/
14. http://link.springer.com/article/10.1007/s10928-013-9316-2
15. http://onlinelibrary.wiley.com/doi/10.1002/jps.23574/abstract
16. http://www.nature.com/psp/journal/v2/n5/full/psp201318a.html
17. http://onlinelibrary.wiley.com/doi/10.1111/bcp.12170/abstract
--
Alison Boeckmann
[email protected]