test(){ # structural model deriv(A1 = - (Cl * C) + (Aa * Ka)) # this is the DE for the amount in plasma compartment deriv(Aa = - (Aa * Ka)) # this is the DE for the amount in absorption compartment urinecpt(A0 = (Cl * C), fe=Fe) # this is the DE for the amount in elimination compartment C = A1 / V # convert amounts to concentrations dosepoint(A1) # dosepoint specifies drug amount for IV input dosepoint(Aa, tlag = (Tlag), bioavail = (F)) # dosepoint specifies drug amount for oral input error(CEps = 1) # initial estimate of the within error standard deviation error(AeEps = 1) # same for Amount excreted observe(CObs = C + CEps) # use an additive residual error model for plasma conc observe(AeObs = A0 + AeEps) # same for Amount excreted # structural parameters stparm(V = tvV) stparm(Fe = tvFe) stparm(Cl = tvCl) stparm(Tlag = tvTlag) stparm(Ka = tvKa) stparm(F = tvF) # fixed effects – the actual parameters to be # estimated (lower bound, initial estimate, upper bound) fixef(tvV = c(, 300, )) fixef(tvFe = c(, 0.1, )) fixef(tvCl = c(, 5, )) fixef(tvTlag = c(, 0.4, )) fixef(tvKa = c(, 1, )) fixef(tvF = c(, 0.9, )) }