I want to have my effect increase starting at the dose time (t=24) hours (for a drug that exhibits time-dependent as well as concentration-dependent effect). I am having trouble with the sleep and sequence statements in PML. Here is what I have now: model(){ dosepoint(Cmed) sequence { while(1){ sleep(24) Emax = Effect } } deriv(Effect = k0 - keff*Effect) stparm( k0 = tvk0 keff = tvkeff ) fixef( tvk0(freeze) = 0.325 tvkeff(freeze) = 0.338 ) } Please let me know why the program is giving me the error: Variable ‘Emax’ undefined when I have already specified that at t=24, Emax = Effect.
Hi, I believe your error is coming not from the sequence block but rather from the final lines of your code where you initialise the parameters. Adding the statement into this block should remove that message, see bold text below where an initial estimate of 99 is given with ranges of 0 to 999. [size=4] fixef( tvk0(freeze) = 0.325 tvkeff(freeze) = 0.338 Emax = c(0, 99, 999) )[/size] Simon.