test(){ # fractional dosing inputs dosepoint(Buccal, bioavail = (Frapid), idosevar = BuccalDose) dosepoint(GI_tract, tlag = (Tlag), bioavail = (1-Frapid), idosevar = GI_tractDose) # differential equations to describe PK deriv(A1 = - (A1 * Ke) + (Buccal * Ka1) + (GI_tract * Ka2)) deriv(Buccal = - (Buccal * Ka1)) deriv(GI_tract = - (GI_tract * Ka2)) urinecpt(A0 = (A1 * Ke)) # concentration in the central compartment C = A1 / V # observed concentrations and error model # initial estimate for standard deviation for the observational error (CEps) error(CEps = 1) # observed quantity (CObs) is predicted response C plus the error (EEps) for an additive residual error model observe(CObs = C + CEps) # structural parameters and their associated fixed effects stparm(V = tvV) stparm(Ke = tvKe) stparm(Ka1 = tvKa1) stparm(Ka2 = tvKa2) stparm(Tlag = tvTlag) stparm(Frapid = tvFrapid) # fixed effect parameters and assignment of lower bound, an initial value, and an upper bound # lower and upper bound are not specified, values separated by commas fixef(tvV = c(, 20, )) fixef(tvKe = c(, 0.09, )) fixef(tvKa1 = c(, 7, )) fixef(tvKa2 = c(, 0.8, )) fixef(tvTlag = c(, 2, )) fixef(tvFrapid = c(, 0.5, )) }