Reset is like starting a whole new subject, but with the prior subject’s etas. If you only want to clear the compartments before each dose, you can do in a text model dosepoint(A1 , dobefore = {A1 = 0;} )
Thanks, Ana! I take this as similar to EVID in NONMEM. In NONMEM you can reset “Time” with a EVID=2 and all integrator variables including “compartments” with a EVID=4. Based on your explanation and the manual, in NLME, Reset can only do EVID=4 and cannot just reset time?
Hi Vivaturi, Phoenix modeling language PML which is the backbone of Phoenix NLME supports reset. First I would like to correct the NONMEM EVID codes. In NONMEM EVID = 3 or 4 means a reset the difference between the two is that EVID = 4 means a reset + dose event on that data row. EVID= 1 is the dose EVID = 0 is the observation EVID = 2 = other event see nonmem help: 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. 3 Reset event. The kinetic system is re-initialized. Time is reset to the time of the event record, the amounts in each com- partment are reset to zero, the on/off status of each compartment is reset to its initial status. The DV data item is ignored. Dose-related data items must be zero. 4 Reset-and-dose event. The system is first reset, and then a dose is given. The DV data item is ignored. In PML you can set which column is the reset column and what code means a reset: e.g. In PML we do not need the data hoops and tricks needed in nonmem i.e. turn compartment on and off because you do that in the observe statement and not in adding extra rows in your data with CMT =-2 for example.` When you map Reset you column definition text file should look like the following # here you tell phoenix that the column name is EVID it can be any name and that codes #between 3 and 4 are meant to be reset #PML will allow time to start again at zero after a reset event This is commonly used in cross #over trials with washout. id(“ID”) time(“TIME”) dose(A1<-“DOSE”) reset(“EVID”, c(3, 4)) obs(CObs<-“PKx”) Bests, Samer Thanks, Ana! I take this as similar to EVID in NONMEM. In NONMEM you can reset “Time” with a EVID=2 and all integrator variables including “compartments” with a EVID=4. Based on your explanation and the manual, in NLME, Reset can only do EVID=4 and cannot just reset time?
Dear Samer, Apologies for being lazy in my question earlier! When I took the example of EVID=4, I had assumed a cross-over kind of design where system is reset and new dose is being given. Thank for the clarification and detailed explanation. As a follow up on this - I would like to understand the implication of a system reset (time, compartments and dosing event) on covariate propagation. By default, using covr(), covariates propagate backwards in time. What happens when you reset the system? If I have a change in occasion at the reset time, will PML start at the new time or try to use the information from the previous record. In NONMEM, one get over this by introducing a EVID=2 column between the reset and the previous record where the covariates for the new occasion are given as an input on that “dummy record” Please correct me if my understanding on the propagation rules are incorrect. Best Regards, Vijay
Hi Vijay, Phoenix NLME will fill the covariates backwards by default or forward if you tell it to do so. This is the same regardless of reset or an occasion time varying covariate, but give it a try. You may want o change the behavior to forward especially for OCC ID TIME WT 1 1 70 1 2 empty 1 5 72 1 8 empty 1 10 75 above weight will be 72 from time 1 to time 5 and 75 from time 5 to time 10 note that in Phoenix you can have empty cells ( unlike nonmem where empty means zero) Now if you want to avoid all this you can add dummy records but you don’t have to e.g. here I am telling it dialysis started at time = 2 up to time = 4 where it stopped. The difference with nonmem is that you can add rows as you like there is no need to identify these extra rows with EVID =2 ID TIME Dialysis DV 1 1 0 0.5 1 2 0 1 1 2 1 1 4 1 1 4 0 0.25 # post dialysis sample it is the same as below where 1 is applied between time 4 to time 2 but it is less obvious and harder to depict on a graph: ID TIME Dialysis 1 1 0 1 2 0 1 4 1 let me know if this answers your questions.
Hi Samer, Your explanation helps. However, from your 2nd dialysis representations, if you now consider the next time point of 6 hours to be “no-dialysis”, then there is no other option but to add a dummy row in between 4 and 6 with a “no-dialysis” although, explicitly we do not need to state an equivalent of EVID=2 That brings me to the inference that if we have time varying covariates, and in this special case, occasion, it is best to hard code in a dummy row with the same characteristics of the subsequent row, as below. Is that correct? Or is there a smarter way to use fcovr() for occasions by using dobefore or doafter? ID TIME DV AMT OCC 1 0 0 100 1 1 1 10 1 1 2 6 1 1 8 2 1 1 0 0 2 # dummy record (to allow change) 1 0 0 100 2 1 1 10 2 1 2 6 2 1 8 2 2 1 0 0 2 Thanks, Vijay
Hi Vijay, Your interpretation below is correct. sometimes especially when we have multiple interval time varying covaraites we need to add records to set it up right. ID TIME Dialysis DV 1 1 0 0.5 1 2 0 1 1 2 1 # here dialysis started 1 4 1 # here dialysis ended 1 4 0 0.25 # post dialysis sample 1 6 0 # here period without dialysis ends 1 6 1 # here period with dialysis starts etc now back to OCC covariate if you are using forward covariate you don’t need to add the dummy line below Hard coding or adding rows for time swithches gives you more control you decide when to start or end an event or covariate or etc… dobefore and do after are related to observation and or dosing they are designed to handle swithcing a compartment off or on emptying a compartment, resetting a cumulative hazard etc.