test(){
## PK Model ##
deriv(A1 = - Cl * C - Cl2 * (C - C2)) # Amount in central compartment
deriv(A2 = Cl2 * (C - C2)) # Amount in peripheral compartment
deriv(Ce = Ke0*(C - Ce)) # Concentration in effect compartment
dosepoint(A1) # dosepoint specifies drug amount for IV input
C = A1 / V # conversion of amounts into concentrations
C2 = A2 / V2
## PD Model ##
E = Emax * Ce^Gam / (EC50^Gam + Ce^Gam) # Hill equation with slope factor gamma
error(EEps = 1) # residual error for effect set to 1
observe(EObs = E + EEps) # additiive residual error model on effect
error(CEps = 0.1) # residual error set to 10%CV
observe(CObs = C * (1 + CEps)) # multiplicative residual error model for concentration
## Fixed Effects ##
fixef(V = c(, 0.422776, ))
fixef(V2 = c(, 1.8252, ))
fixef(Cl = c(, 0.0166514, ))
fixef(Cl2 = c(, 0.035661, ))
fixef(Ke0 = c(, 0.072, ))
fixef(EC50 = c(, 1000, ))
fixef(Gam = c(, 1.6, ))
fixef(Emax = c(, 100, ))
}