NaN error when modeling complex absorption using Inverse Gaussian func

Hi everyone,

Could you please assist me? When trying to model complex absorption with inverse Gaussian functions, I keep getting this error message “Model execution failed. Initial parameter values result in -LL = NaN” I have tried different initial estimates for MAT and CV without success.

See below the model code:

test(){

input = t ==0 ? 0 : ((MAT/(6.283CV^2t^3))^0.5) exp(-((MAT-t)^2)/(2CV^2MATt))

P1 = (MAT/(23.14CVCV(t+0.000001)3))
P2 = P1
0.5
P3 = (MAT-(t+0.000001))(MAT-(t+0.000001))/(2CVCVMAT*(t+0.000001))
IG = 1P2exp(-P3)
deriv(Aa = -input * Aa)
deriv(A1 = input * Aa - Cl * C- Cl2 * (C - C2))
deriv(cumabs = IG )
#deriv(Aa = - Ka * Aa)
#deriv(A1 = Ka * Aa - Cl * C - Cl2 * (C - C2))
deriv(A2 = Cl2 * (C - C2))
dosepoint(Aa)
C = A1 / V
cumabsout = cumabs
C2 = A2 / V2
error(CEps = 0.171872765515157)
observe(CObs = C * (1 + CEps))
#stparm(Ka = tvKa * exp(nKa))
stparm(MAT = tvMAT * exp(nMAT))
stparm(CV = tvCV * exp(nCV))
stparm(V = tvV * exp(nV))
stparm(V2 = tvV2)
stparm(Cl = tvCl * exp(nCl))
stparm(Cl2 = tvCl2 * exp(nCl2))
fixef(tvMAT = c(,5,))
fixef(tvCV = c(,0.6,))
#fixef(tvKa = c(, 12.5738819057084, ))
fixef(tvV = c(, 43.2890620436938, ))
fixef(tvV2 = c(, 45.1186153287527, ))
fixef(tvCl = c(, 7.49094934958544, ))
fixef(tvCl2 = c(, 154.794695950696, ))
ranef(diag(nV, nCl, nMAT, nCV, nCl2) = c(0.49173913, 0.71344537, 0.001, 0.001, 0.38537209))
}

Many thanks and kind regards,
Ahmed

Hi Ahmed,

As a quick comment have you considered using the built in delay model for InverseGaussian? E.g.:

In the meantime I will see if I can find any errors in your code.

test(){
C2 = A2/V2
dosepoint(A1)
C = A1 / V
delayInfCpt(A1, MeanDelayTime, ShapeParam, out = - Cl * C - Cl2 * (C - C2), dist = InverseGaussian)
deriv(A2 = Cl2 * (C - C2))
error(CEps=0.1)
observe(CObs=C * ( 1 + CEps))
stparm(MeanDelayTime = tvMeanDelayTime * exp(nMeanDelayTime))
stparm(ShapeParam = tvShapeParam * exp(nShapeParam))
stparm(V = tvV * exp(nV))
stparm(Cl = tvCl * exp(nCl))
stparm(V2 = tvV2 * exp(nV2))
stparm(Cl2 = tvCl2 * exp(nCl2))
fixef( tvMeanDelayTime = c(,1,))
fixef( tvShapeParam = c(,1,))
fixef( tvV = c(,1,))
fixef( tvCl = c(,1,))
fixef( tvV2 = c(,1,))
fixef( tvCl2 = c(,1,))
ranef(diag(nMeanDelayTime,nShapeParam,nV,nCl,nV2,nCl2) = c(1,1,1,1,1,1))
}

Hu, Dunlavey, Guzy, and Teuscher (2018)

A distributed delay approach for modeling delayed outcomes in pharmacokinetics and pharmaco ­dynamics studies. J Pharmacokinet Pharmacodyn. https://doi.org/10.1007/s10928-018-9570-4.

https://onlinehelp.certara.com/phoenix/8.3/index.html#t=topics%2FDiscrete_and_distributed_delays.htm&rhsearch=logistic%20growth%20model&rhsyns=%20

Thanks a million! Kniefort,

I tried the built-in option you provided and it works!

With kind regards,

Ahmed

indeed always better to use built-in distribution in modern software versus coding everything if you need anything the above error is probably because a division by zero for yet to get initial non zero value parameter.

An inverse Gaussian can have multiple way to get parametrized and the verotta paper has how to go form one to to the other.

Best wishes