Not sure if this has been touched on the discussion boards but I am curious how time-dependent covariate modeling is implemented in PML? Are there special considerations for the construction of the dataset, such as making a dummy timepoint where the covariate value changes? Or does the covariate, regardless of its value, need to be specified at each observation (DV)?
Dear Lance
In the pml, you have 2 options, either to use covariate statement or the fcovariate statement.
fcovariate means covariate carried forward while the covariate statement is backward.
Suppose you have a covariate like weight at t=0 that is 70.
The trial is long and let say that after 6 months the weight is checked and is let say 75
If you put at t=0 70 for weight and at t=6 months you put 75, then if you are using
fcovariate(weight)
the program will read a weight of 70 kg from t=0 to t=6 months and then at t=6 months it will read 75 kg.
If you are using the covariate statement
covariate(weight)
then at t=0 it will read 70 but then immediately will look at the next defined value for weight which is 75 and will define the weight as 75 until t=6 months.
I made the request to have fcovariate as the default interface option which to me makes more sense.
You do not need to define at each row the covariate value but only when it changes and use the fcovariate statement to make sure it will take the new value at the new time (as I just explained).
I hope it helps.
best Regards
Serge
Thanks Serge,
This is very helpful and I was not aware of the difference between fcovariate and covariate! From this is sounds like there is no special coding that needs to be implemented in PMLor the dataset other than what you had mentioned.
Lance
Few additional notes for NONMEM users:
NONMEM has no such thing called missing every record should have a value otherwise the value is treated as a ZERO.
As Serge mentioned:
ID TIME WT
1 0 70
1 2
1 6 75
fcovariate is the default in NLME 1.4 while in nonmem the default it is the backward behavior ($BIND can control it).
now above data in NONMEM WT will be =0 at time 2 which is not what we want.
Aother options that is unique to NLME is the ability to use the interpolate option where we can linearly interpolate and then at time =2 the value will be the line between 70 and 75.
if you have what I call interval covariate e.g. dialysis start end it is always safer to code your data like the following:
duplicate your time of start and time of end and then make sure to clearly flag it on off as below:
ID TIME Dialysis
1 0 0
1 1 0
1 1 1
1 4 1
1 4 0
1 5 0
(dialysis starts at time =1 and ends at time =4 ( 3 hours duration))
with fcovariate above is equivalent to
ID TIME Dialysis
1 0 0
1 1 1
1 4 0
1 5 0
(from 1 to 4 the value will be equal to 1 )
Hi Samer,
Thanks for the tip.
The way I had always understood coding a time dependent covariate in NONMEM was to include a dummy value for EVID=2 to signify a change in covariate. From your example this is not the case in NLME which is a nice feature. How is the interpolation toggled on and off in NLME/PML? Also, if you don’t toggle the interpolate feature on, then the model behaves in a stepwise manner, correct?
Thanks again!
Lance
Hi Lance in the GUI when you select a covariate you can toggle the following options:
Forward
Backward
Interpolate
In the textual model this would be
fcovariate(cov)
covariate(cov)
interpolate(cov)
if no interpolation required then it is stepwise