Fixed Baseline for PK/PD Model

Hello,

Can somebody help me edit the code below to fix baseline to 100.

Thanks Greatly!

test(){
deriv(A1 = (Aa * Ka)- (Q1 * (C - C4))- (Q2 * C)- (Q3 * C))
deriv(Aa = - (Aa * Ka))
deriv(A4 = (Q1 * (C - C4)))
deriv(A3 = (Q3 * C)- (CL3 * C3))
deriv(A2 = (Q2 * C)- (CL2 * C2))
urinecpt(A0 = (CL3 * C3))
urinecpt(A0 = (CL2 * C2))
C = A1 / V
dosepoint(Aa, idosevar = AaDose, infdosevar = AaInfDose, infratevar = AaInfRate)
C4 = A4 / V4
error(CEps = 0.568143)
observe(CPlasma = C * (1 + CEps))
C3 = A3 / V3
C2 = A2 / V2
error(CEps = 1)
observe(CKidney = C3 * (1 + CEps))
error(CEps = 1)
observe(CLiver = C2 * (1 + CEps))
E = E0 * (1 - C2^Gam / (EC50^Gam + C2^Gam))
error(CEps = 1)
observe(EObs = E + CEps)
stparm(V = tvV * exp(nV))
stparm(Ka = tvKa * exp(nKa))
stparm(V4 = tvV4 * exp(nV4))
stparm(Q1 = tvQ1 * exp(nQ1))
stparm(V3 = tvV3 * exp(nV3))
stparm(V2 = tvV2 * exp(nV2))
stparm(Q2 = tvQ2 * exp(nQ2))
stparm(Q3 = tvQ3 * exp(nQ3))
stparm(CL3 = tvCL3 * exp(nCL3))
stparm(CL2 = tvCL2 * exp(nCL2))
stparm(EC50 = tvEC50 * exp(nEC50))
stparm(E0 = tvE0 * exp(nE0))
stparm(Gam = tvGam * exp(nGam))
fcovariate(Grp)
fixef(tvV = c(, 574.645, ))
fixef(tvKa = c(, 4.06913, ))
fixef(tvV4 = c(, 4912.16, ))
fixef(tvQ1 = c(, 34.632, ))
fixef(tvV3 = c(, 87.0643, ))
fixef(tvV2 = c(, 5.25679, ))
fixef(tvQ2 = c(, 28.6318, ))
fixef(tvQ3 = c(, 251.738, ))
fixef(tvCL3 = c(, 0.119304, ))
fixef(tvCL2 = c(, 0.0125202, ))
fixef(tvEC50 = c(, 5.88945, ))
fixef(tvE0 = c(, 100, ))
fixef(tvGam = c(, 0.981281, ))
ranef(diag(nV2, nV3, nV, nKa, nV4, nQ1, nQ2, nQ3, nCL3, nCL2, nEC50, nE0, nGam) = c(0.097440168, 0.44811222, 0.12461778, 0.44013485, 2.7900362E-05, 0.10684659, 0.0017777742, 0.096972774, 0.10017247, 0.021310942, 1, 1, 1))
}

Sorry I figured this out myself , just frooze it in the model

fixef(tvE0(freeze) = c(, 100, ))

I’m glad you figured it out. One of the best ways to learn PML code is to create a new model (any one will do) and then change settings in the GUI and see how the text PML code changes. Then apply those same changes to your original model.

Hi,
you code fixes the population level value. On the other hand the individual values E0 will deviate from 100 with the specified distribution

stparm(E0 = tvE0 * exp(nE0))
fixef(tvE0(freeze) = c(, 100, ))
ranef(diag(nV2, nV3, nV, nKa, nV4, nQ1, nQ2, nQ3, nCL3, nCL2, nEC50, nE0, nGam) = c(0.097440168, 0.44811222, 0.12461778, 0.44013485, 2.7900362E-05, 0.10684659, 0.0017777742, 0.096972774, 0.10017247, 0.021310942, 1, 1, 1)

so here the initial estimate of nE0 is 1 and depending on how it will be estimated individual values will be

100 * exp ( random variable with mean zero and variance nE0 here the initial is 1)

if you issue this command in R

100*exp(rnorm(5,0,1)) # 5 random samples from a normal distribution with mean 0 and sd of 1))
[1] 79.97296 114.06433 70.29925 28.08607 41.22702

so on average and with enough sample size you will get a typical value of 100 but individual values might deviate substantially from 100

if you want all subjects to start at a fixed value of 100 also remove nE0.

Samer