Hello,
I was wondering if I could get some guidance from this great group. My issue is
primarily with some diagnostic analysis, but this is taking me back to an old
NONMEM problem.
My aim is to run a VPC on a model I implemented, and if possible change the idv
to TAD instead of TIME. The reason for that is the VPC graph based on TIME
looks dreadful as the data is sparse and from different studies of different
lengths.
I'm having issues generating the TAD output column from my NONMEM run. I
naively assumed I could easily do that, but looking at the NONMEM archives it
seems this gets tricky when your dosing events are written using ADDL. Has
anyone ever managed to find a solution for this? And if not, is there an
alternative way to run the VCP on TAD, do we really need to get this column
from NONMEM's output?
Thanks all,
Camila de Almeida, PhD
PKPD Scientist,
Modelling & Simulation, IMED Oncology DMPK
________________________________________________________________________________
AstraZeneca UK Limited
R&D, Innovative Medicines
P Please consider the environment before printing this e-mail
________________________________
AstraZeneca UK Limited is a company incorporated in England and Wales with
registered number:03674842 and its registered office at 1 Francis Crick Avenue,
Cambridge Biomedical Campus, Cambridge, CB2 0AA.
This e-mail and its attachments are intended for the above named recipient only
and may contain confidential and privileged information. If they have come to
you in error, you must not copy or show them to anyone; instead, please reply
to this e-mail, highlighting the error to the sender and then immediately
delete the message. For information about how AstraZeneca UK Limited and its
affiliates may process information, personal data and monitor communications,
please see our privacy notice at
https://www.astrazeneca.com
Generating TAD with ADDL dosing format
7 messages
7 people
Latest: Dec 20, 2016
Hi Camila,
I had this same issue some time ago and, given that in my dataset all
Interdose Intervals (II) were constant for all the patients, I used the
following R function to get a TAD column (IDV in my dataset):
InsertIDV<-function(runn,ii){ # runn is the
run number: for run03 runn="03"; ii is the inter-dose interval
sdtab<-get(paste("sdtab",runn,sep=""))
last<-floor(sdtab$TIME/ii)*ii # defines
time at which last dose was administrated
sdtab$IDV<-sdtab$TIME-last
assign(paste("sdtab",runn,sep=""),sdtab,envir = .GlobalEnv)
}
I hope this script is useful for your problem.
Regards,
Alejandro Pérez Pitarch
Pharmacy Department
University Clinical Hospital of Valencia
Quoted reply history
2016-12-20 12:45 GMT+01:00 de Almeida, Camila <
[email protected]>:
> Hello,
>
>
>
> I was wondering if I could get some guidance from this great group. My
> issue is primarily with some diagnostic analysis, but this is taking me
> back to an old NONMEM problem.
>
>
>
> My aim is to run a VPC on a model I implemented, and if possible change
> the idv to TAD instead of TIME. The reason for that is the VPC graph based
> on TIME looks dreadful as the data is sparse and from different studies of
> different lengths.
>
>
>
> I’m having issues generating the TAD output column from my NONMEM run. I
> naively assumed I could easily do that, but looking at the NONMEM archives
> it seems this gets tricky when your dosing events are written using ADDL.
> Has anyone ever managed to find a solution for this? And if not, is there
> an alternative way to run the VCP on TAD, do we really need to get this
> column from NONMEM’s output?
>
>
>
> Thanks all,
>
>
>
> *Camila de Almeida, PhD*
>
> PKPD Scientist,
>
> *Modelling & Simulation, IMED Oncology DMPK*
>
>
> *________________________________________________________________________________*
>
> *AstraZeneca UK Limited*
>
> *R&D, Innovative Medicines*
>
>
>
> P Please consider the environment before printing this e-mail
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------
>
> AstraZeneca UK Limited is a company incorporated in England and Wales with
> registered number:03674842 and its registered office at 1 Francis Crick
> Avenue, Cambridge Biomedical Campus, Cambridge, CB2 0AA.
>
> This e-mail and its attachments are intended for the above named recipient
> only and may contain confidential and privileged information. If they have
> come to you in error, you must not copy or show them to anyone; instead,
> please reply to this e-mail, highlighting the error to the sender and then
> immediately delete the message. For information about how AstraZeneca UK
> Limited and its affiliates may process information, personal data and
> monitor communications, please see our privacy notice at
> www.astrazeneca.com
>
Hi,
I'm not sure what data you're analysing and what your dosage schedules and
sampling are but if ADDL is the same for each patient you could create a new
variable (TVPC) and simply deduct that additional dosing history from your
cumulative time from when you restarted the system (EVID=3 or 4). You code
it simply as:
TVPC=TIME- sum of all ADDLs
So if you have 3 additional doses, each at a 24h interval it would look
like:
TVPC=TIME-72
Then you can plot your VPC with TVPC as idv.
Regards,
Andrzej
Andrzej Bienczak
MSc, MPharm, DiplPharm
Pharmacometrics Group
Division of Clinical Pharmacology
Department of Medicine
University of Cape Town
K45 Old Main Building
Groote Schuur Hospital
Observatory, Cape Town
7925 South Africa
phone: +27 21 650 4861
mobile: +27 839 842 675
email: [email protected] <mailto:[email protected]>
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of de Almeida, Camila
Sent: 20 December 2016 01:46 PM
To: [email protected]
Subject: [NMusers] Generating TAD with ADDL dosing format
Hello,
I was wondering if I could get some guidance from this great group. My issue
is primarily with some diagnostic analysis, but this is taking me back to an
old NONMEM problem.
My aim is to run a VPC on a model I implemented, and if possible change the
idv to TAD instead of TIME. The reason for that is the VPC graph based on
TIME looks dreadful as the data is sparse and from different studies of
different lengths.
I'm having issues generating the TAD output column from my NONMEM run. I
naively assumed I could easily do that, but looking at the NONMEM archives
it seems this gets tricky when your dosing events are written using ADDL.
Has anyone ever managed to find a solution for this? And if not, is there an
alternative way to run the VCP on TAD, do we really need to get this column
from NONMEM's output?
Thanks all,
Camila de Almeida, PhD
PKPD Scientist,
Modelling & Simulation, IMED Oncology DMPK
____________________________________________________________________________
____
AstraZeneca UK Limited
R&D, Innovative Medicines
P Please consider the environment before printing this e-mail
_____
AstraZeneca UK Limited is a company incorporated in England and Wales with
registered number:03674842 and its registered office at 1 Francis Crick
Avenue, Cambridge Biomedical Campus, Cambridge, CB2 0AA.
This e-mail and its attachments are intended for the above named recipient
only and may contain confidential and privileged information. If they have
come to you in error, you must not copy or show them to anyone; instead,
please reply to this e-mail, highlighting the error to the sender and then
immediately delete the message. For information about how AstraZeneca UK
Limited and its affiliates may process information, personal data and
monitor communications, please see our privacy notice at www.astrazeneca.com
https://www.astrazeneca.com
Hi Camila,
It sounds like you've got two questions here-- one related to NONMEM and one related to the other program you're using to create your VPC. The NONMEM question appears to be "How do I get TAD in my data without changing my dataset?" The second question appears to be "How to I stratify my VPC based on that new TAD variable instead of TIME?"
For the second question, what program are you using for VPC?
For the first question, others may have a more elegant answer, but I think that you're right: ADDL makes many dose-related events difficult. The simplest answer is to revise your dataset adding a TAD column. If you can't do that, then something like this will work assuming that you only have one dosing record per subject. (Note that the code below was typed directly into email, so it may have typos.)
; Set TAD to -1 before any dose record for the subject
IF (NEWIND.EQ.2) THEN
DOSETIME = -1
ADDLREC = 0
IIREC = 0
ENDIF
; Capture the (most recent) dosing information for this subject
IF (EVID.EQ.1 .OR. EVID.EQ.4) THEN
DOSETIME = TIME
ADDLREC = ADDL
IIREC = II
ENDIF
; Calculate TAD from the single dose record for a subject in the data set assuming ; that there is only one dose record per subject or that the dose records occur ; such that the most recent dose record is the only one important for calculating ; TAD for a subject. This assumption would not hold if there is a dose record ; with ADDL that has a dose record for a time in the middle of those ADDL doses.
IF (DOSETIME.LT.0) THEN
; This subject has not received a dose yet, set TAD to -1
TAD = -1
ELSEIF ((TIME-DOSETIME) .LE. ((ADDLREC+1)*IIREC)) THEN
; This subject is in the middle of the ADDL records for this dose,
; calculate time since most recent dose.
TAD = (TIME-DOSETIME) - INT((TIME-DOSETIME)/IIREC)*IIREC
ELSE
; This subject is are after the last ADDL dose, calculate time since the final
; dose (observed so far).
TAD = (TIME-DOSETIME) - ((ADDLREC+1)*IIREC)
ENDIF
Thanks,
Bill
Quoted reply history
On 12/20/2016 6:45 AM, de Almeida, Camila wrote:
> Hello,
>
> I was wondering if I could get some guidance from this great group. My issue is primarily with some diagnostic analysis, but this is taking me back to an old NONMEM problem.
>
> My aim is to run a VPC on a model I implemented, and if possible change the idv to TAD instead of TIME. The reason for that is the VPC graph based on TIME looks dreadful as the data is sparse and from different studies of different lengths.
>
> I’m having issues generating the TAD output column from my NONMEM run. I naively assumed I could easily do that, but looking at the NONMEM archives it seems this gets tricky when your dosing events are written using ADDL. Has anyone ever managed to find a solution for this? And if not, is there an alternative way to run the VCP on TAD, do we really need to get this column from NONMEM’s output?
>
> Thanks all,
>
> *Camila de Almeida, PhD*
>
> PKPD Scientist,
>
> *Modelling & Simulation, IMED Oncology DMPK*
>
> *________________________________________________________________________________*
>
> *AstraZeneca UK Limited*
>
> *R&D, Innovative Medicines*
>
> **
>
> P Please consider the environment before printing this e-mail
>
> ------------------------------------------------------------------------
>
> AstraZeneca UK Limited is a company incorporated in England and Wales with registered number:03674842 and its registered office at 1 Francis Crick Avenue, Cambridge Biomedical Campus, Cambridge, CB2 0AA.
>
> This e-mail and its attachments are intended for the above named recipient only and may contain confidential and privileged information. If they have come to you in error, you must not copy or show them to anyone; instead, please reply to this e-mail, highlighting the error to the sender and then immediately delete the message. For information about how AstraZeneca UK Limited and its affiliates may process information, personal data and monitor communications, please see our privacy notice at www.astrazeneca.com < https://www.astrazeneca.com >
------------------------------------------------------------------------
Human Predictions Logo < http://www.humanpredictions.com >*William S. Denney, PhD*
Chief Scientist, Human Predictions LLC
+1-617-899-8123
[email protected]
Hi Camila
If you don't have a lag time, use the following:
$PK
IF(NEWIND.LT.2) THEN
IFL=0
TAD=0.0
ENDIF
IF(EVID.EQ.1.OR.EVID.EQ.4)DTIME=TIME
IF(DOSTIM.NE.0.)DTIME=DOSTIM ; non-event dose times
TAD=TIME-DTIME
If you have a lag time, use:
IF(NEWIND.LT.2) THEN
TAD=0.0
DTIME=1.0E+06
ENDIF
IF(DOSTIM>0.0) DTIME=DOSTIM -ALAG1 ; dostim is non-zero on
additional doses (ADDL/II), no delay in doses
IF(AMT>0.AND.DOSTIM==0.0) DTIME=TIME ; for all dose events scheduled
explcitly in the data record, no delay
TAD=TIME-DTIME
I hope this helps
Maria
Maria Pitsiu ICON Plc PK M&S 7122 3652 (internal) +44 162 849 3652 (external)
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of de Almeida, Camila
Sent: 20 December 2016 13:46
To: [email protected]
Subject: [NMusers] Generating TAD with ADDL dosing format
Hello,
I was wondering if I could get some guidance from this great group. My issue is
primarily with some diagnostic analysis, but this is taking me back to an old
NONMEM problem.
My aim is to run a VPC on a model I implemented, and if possible change the idv
to TAD instead of TIME. The reason for that is the VPC graph based on TIME
looks dreadful as the data is sparse and from different studies of different
lengths.
I'm having issues generating the TAD output column from my NONMEM run. I
naively assumed I could easily do that, but looking at the NONMEM archives it
seems this gets tricky when your dosing events are written using ADDL. Has
anyone ever managed to find a solution for this? And if not, is there an
alternative way to run the VCP on TAD, do we really need to get this column
from NONMEM's output?
Thanks all,
Camila de Almeida, PhD
PKPD Scientist,
Modelling & Simulation, IMED Oncology DMPK
________________________________________________________________________________
AstraZeneca UK Limited
R&D, Innovative Medicines
P Please consider the environment before printing this e-mail
________________________________
AstraZeneca UK Limited is a company incorporated in England and Wales with
registered number:03674842 and its registered office at 1 Francis Crick Avenue,
Cambridge Biomedical Campus, Cambridge, CB2 0AA.
This e-mail and its attachments are intended for the above named recipient only
and may contain confidential and privileged information. If they have come to
you in error, you must not copy or show them to anyone; instead, please reply
to this e-mail, highlighting the error to the sender and then immediately
delete the message. For information about how AstraZeneca UK Limited and its
affiliates may process information, personal data and monitor communications,
please see our privacy notice at
https://www.astrazeneca.com
Hi Camila.
If you have access to R, consider the github package "tad" identified below.
It supports calculation of TAD as a column in your dataset, explicitly
considering ADDL. Let me know if you have issues installing or operating. The
following worked for me.
Regards,
Tim
install.packages('devtools')
library(devtools)
install_github('bergsmat/tad')
library(tad)
?tad
example(tad)
Tim Bergsma, PhD
Associate Director
Certara Strategic Consulting
[cid:[email protected]]
m. 860.930.9931
[email protected]<mailto:[email protected]>
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of de Almeida, Camila
Sent: Tuesday, December 20, 2016 6:46 AM
To: [email protected]
Subject: [NMusers] Generating TAD with ADDL dosing format
Hello,
I was wondering if I could get some guidance from this great group. My issue is
primarily with some diagnostic analysis, but this is taking me back to an old
NONMEM problem.
My aim is to run a VPC on a model I implemented, and if possible change the idv
to TAD instead of TIME. The reason for that is the VPC graph based on TIME
looks dreadful as the data is sparse and from different studies of different
lengths.
I'm having issues generating the TAD output column from my NONMEM run. I
naively assumed I could easily do that, but looking at the NONMEM archives it
seems this gets tricky when your dosing events are written using ADDL. Has
anyone ever managed to find a solution for this? And if not, is there an
alternative way to run the VCP on TAD, do we really need to get this column
from NONMEM's output?
Thanks all,
Camila de Almeida, PhD
PKPD Scientist,
Modelling & Simulation, IMED Oncology DMPK
________________________________________________________________________________
AstraZeneca UK Limited
R&D, Innovative Medicines
P Please consider the environment before printing this e-mail
________________________________
AstraZeneca UK Limited is a company incorporated in England and Wales with
registered number:03674842 and its registered office at 1 Francis Crick Avenue,
Cambridge Biomedical Campus, Cambridge, CB2 0AA.
This e-mail and its attachments are intended for the above named recipient only
and may contain confidential and privileged information. If they have come to
you in error, you must not copy or show them to anyone; instead, please reply
to this e-mail, highlighting the error to the sender and then immediately
delete the message. For information about how AstraZeneca UK Limited and its
affiliates may process information, personal data and monitor communications,
please see our privacy notice at
https://www.astrazeneca.com
Hi Camila,
Alternative (simpler) coding to get TAD would be as follows:
$PK (NONEVENT)IF(AMT.GT.0) TDOS=TIMETAD=TIME-TDOS
The trick here is to add NONEVENT after $PK which tells NONMEM to make calls to
$PK even for 'hidden' dose times, such as ADDLs, therefore TDOS is updated
appropriately.
Mannie
Quoted reply history
From: Bill Denney <[email protected]>
To: "de Almeida, Camila" <[email protected]>;
"[email protected]" <[email protected]>
Sent: Tuesday, December 20, 2016 7:39 AM
Subject: Re: [NMusers] Generating TAD with ADDL dosing format
Hi Camila, It sounds like you've got two questions here-- one related to
NONMEM and one related to the other program you're using to create your VPC.
The NONMEM question appears to be "How do I get TAD in my data without changing
my dataset?" The second question appears to be "How to I stratify my VPC based
on that new TAD variable instead of TIME?" For the second question, what
program are you using for VPC? For the first question, others may have a more
elegant answer, but I think that you're right: ADDL makes many dose-related
events difficult. The simplest answer is to revise your dataset adding a TAD
column. If you can't do that, then something like this will work assuming that
you only have one dosing record per subject. (Note that the code below was
typed directly into email, so it may have typos.)
; Set TAD to -1 before any dose record for the subject
IF (NEWIND.EQ.2) THEN
DOSETIME = -1
ADDLREC = 0
IIREC = 0
ENDIF
; Capture the (most recent) dosing information for this subject
IF (EVID.EQ.1 .OR. EVID.EQ.4) THEN
DOSETIME = TIME
ADDLREC = ADDL
IIREC = II
ENDIF
; Calculate TAD from the single dose record for a subject in the data set
assuming
; that there is only one dose record per subject or that the dose records occur
; such that the most recent dose record is the only one important for
calculating
; TAD for a subject. This assumption would not hold if there is a dose record
; with ADDL that has a dose record for a time in the middle of those ADDL
doses.
IF (DOSETIME.LT.0) THEN
; This subject has not received a dose yet, set TAD to -1
TAD = -1
ELSEIF ((TIME-DOSETIME) .LE. ((ADDLREC+1)*IIREC)) THEN
; This subject is in the middle of the ADDL records for this dose,
; calculate time since most recent dose.
TAD = (TIME-DOSETIME) - INT((TIME-DOSETIME)/IIREC)*IIREC
ELSE
; This subject is are after the last ADDL dose, calculate time since the
final
; dose (observed so far).
TAD = (TIME-DOSETIME) - ((ADDLREC+1)*IIREC)
ENDIF
Thanks, Bill
On 12/20/2016 6:45 AM, de Almeida, Camila wrote:
#yiv5864368767 #yiv5864368767 -- _filtered #yiv5864368767 {panose-1:2 4 5 3 5 4
6 3 2 4;} _filtered #yiv5864368767 {font-family:Calibri;panose-1:2 15 5 2 2 2 4
3 2 4;} _filtered #yiv5864368767 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4
2 4;} _filtered #yiv5864368767 {font-family:Webdings;panose-1:5 3 1 2 1 5 9 6 7
3;}#yiv5864368767 #yiv5864368767 p.yiv5864368767MsoNormal, #yiv5864368767
li.yiv5864368767MsoNormal, #yiv5864368767 div.yiv5864368767MsoNormal
{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;}#yiv5864368767 a:link,
#yiv5864368767 span.yiv5864368767MsoHyperlink
{color:#0563C1;text-decoration:underline;}#yiv5864368767 a:visited,
#yiv5864368767 span.yiv5864368767MsoHyperlinkFollowed
{color:#954F72;text-decoration:underline;}#yiv5864368767
span.yiv5864368767EmailStyle17 {color:windowtext;}#yiv5864368767
.yiv5864368767MsoChpDefault {} _filtered #yiv5864368767 {margin:72.0pt 72.0pt
72.0pt 72.0pt;}#yiv5864368767 div.yiv5864368767WordSection1 {}#yiv5864368767
Hello, I was wondering if I could get some guidance from this great group.
My issue is primarily with some diagnostic analysis, but this is taking me back
to an old NONMEM problem. My aim is to run a VPC on a model I implemented,
and if possible change the idv to TAD instead of TIME. The reason for that is
the VPC graph based on TIME looks dreadful as the data is sparse and from
different studies of different lengths. I’m having issues generating the TAD
output column from my NONMEM run. I naively assumed I could easily do that, but
looking at the NONMEM archives it seems this gets tricky when your dosing
events are written using ADDL. Has anyone ever managed to find a solution for
this? And if not, is there an alternative way to run the VCP on TAD, do we
really need to get this column from NONMEM’s output? Thanks all, Camila
de Almeida, PhD PKPD Scientist, Modelling & Simulation, IMED Oncology DMPK
________________________________________________________________________________
AstraZeneca UK Limited R&D, Innovative Medicines P Please consider the
environment before printing this e-mail AstraZeneca
UK Limited is a company incorporated in England and Wales with registered
number:03674842 and its registered office at 1 Francis Crick Avenue, Cambridge
Biomedical Campus, Cambridge, CB2 0AA. This e-mail and its attachments are
intended for the above named recipient only and may contain confidential and
privileged information. If they have come to you in error, you must not copy or
show them to anyone; instead, please reply to this e-mail, highlighting the
error to the sender and then immediately delete the message. For information
about how AstraZeneca UK Limited and its affiliates may process information,
personal data and monitor communications, please see our privacy notice at
www.astrazeneca.com
William S. Denney, PhD
Chief Scientist, Human Predictions LLC
+1-617-899-8123
[email protected]