Modelling of recurring event

Hi,

I am trying to model ‘handling effect (HE)’ in dogs to account for hear rate changes due to manual handling of dogs in first 0.5 hour of study in placebo treatment to get baseline response using following expression:

HE1=(t<0.5?0:Pexp(-khd(t-0.5)))

this fits well with observed data for single dosing.

However, if this is to be multiple dosing (tau=24h), and handling effect recur every 24 hour, how show I write PML code to show repetition of ‘handling effect’ every 24 hour?

many thanks

Pradeep

Here is what I do suggest you to do.

Your problem is similar to finding the amount in the central compartment for a 1 compartment with IV Bolus and dose=P with tlag=0.5 and given every 24 hours.

Do the following

Define A1=P

fix the volume to 1 and use microconstant for elimination.

Ke= your khd

tlag=0.5

Use ADDL option with ii=24 and Dosepoint=A1.

In your template data set, use the columns time for the time and A1 for the dose(P).

Now your concentration output will be your He.

LET ME KNOW HOW IT GOES.

Best Regards

Serge

Many thanks Serge.

Actually ‘handling effect’ is nested in bigger placebo baseline model for Heart rate PKPD model as follows.

test(){
covariate(nV,nKm)
deriv(Aa = - Ka * Aa)
deriv(A1 = Ka * Aa - Vmax * C / (Km + C) - Cl2 * (C - C2))
deriv(A2 = Cl2 * (C - C2))
dosepoint(Aa)
C = A1 / V
C2 = A2 / V2
error(CEps = 1)
observe(CObs = C + CEps)
stparm(Ka = tvKa)
stparm(V = tvV * exp(nV))
stparm(V2 = tvV2)
stparm(Km = tvKm * exp(nKm))
stparm(Vmax = tvVmax)
stparm(Cl2 = tvCl2)
fixef(tvKa(freeze) = c(, 1, ))
fixef(tvV = c(, 1, ))
fixef(tvV2(freeze) = c(, 1, ))
fixef(tvKm = c(, 1, ))
fixef(tvVmax(freeze) = c(, 1, ))
fixef(tvCl2(freeze) = c(, 1, ))

###PD part

HE1=(t<0.5?0:Pexp(-khd(t-0.5)))
HE2=(t<2?0:P1exp(-khd1(t-2)))

Rhythm1 = Amp1 * cos (2 * 3.1416 * (t - Phi1)/12)

HR = HR0+HE1+HE2++Rhythm1

error(HREps = 1)
observe(HRObs = HR + HREps)

stparm(HR0 = tvHR0 * exp(nHR0))
stparm(Amp1= tvAmp1 * exp(nAmp1))
stparm(Phi1= tvPhi1 * exp(nPhi1))
stparm(khd= tvkhd * exp(nkhd))
stparm(khd1= tvkhd1 * exp(nkhd1))
stparm(P= tvP * exp(nP))
stparm(P1= tvP1 * exp(nP1))

fixef(tvHR0= c(,90,))
fixef(tvAmp1 = c(,1,))
fixef(tvPhi1 = c(,1,))
fixef(tvP = c(,1,))
fixef(tvkhd = c(,1.,))
fixef(tvkhd1 = c(,1,))
fixef(tvP1 = c(,1,))

ranef(diag(nHR0, nAmp1, nPhi1, nP, nP1, nkhd, nkhd1) = c( 0.010854058, 0.24318122,1,0.18228494,1,0.20272455,1))

}

So I am looking how we can recur HE1 and HE2 in this? Is ‘repeated sequence’ possible for handling effect? Tried it bit somehow could not work out proper code.

real(i)
sequence { i=1
while (i<=24) {

HE1=(t<0.5?0:Pexp(-khd(t-0.5)))
HE2=(t<2?0:P1exp(-khd1(t-2)))

i=1+1}
}