##Description: RSE_Proportional_BQL
##Author: Certara
##DATA OneCpt_IVBolus_ContCovariatesOnClV_BQL.csv
##MAP    Aa = Dose CObs = DV CObsBQL = DVBQL id = ID time = Time
##MODEL test() {
	cfMicro(A1, Cl / V, first = (Aa = Ka))

	C = A1 / V
	dosepoint(Aa, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)
	error(CEps = 0.1)
	observe(CObs = C * (1 + CEps), bql)

	stparm(Cl = tvCl * exp( nCl ))
	fixef(tvCl= c(, 1, ))
	ranef(diag(nCl) = c(1))
	stparm(V = tvV * exp( nV ))
	fixef(tvV= c(, 1, ))
	ranef(diag(nV) = c(1))
	stparm(Ka = tvKa * exp( nKa ))
	fixef(tvKa= c(, 1, ))
	ranef(diag(nKa) = c(1))
}
##ESTARGS
 sort=FALSE numIterations=50 method=QRPEM
##ESTARGS
 sort=FALSE numIterations=50 method=QRPEM
##SIMARGS
 numReplicates=200 seed=1 sort=FALSE ODE = "DOPRI5"
##SIMARGS
 numReplicates=200 seed=1 sort=FALSE ODE = DOPRI5
##TABLES
simtbl(file="table01.csv", dose(Aa), C, mode = keep)

