I have a data set with multiple observable values:
Ctot, Cfree, and Blocker
Leaving Blocker out for the time being. My dose doses Ctot and Cfree is supposed to be a diminishing fraction of Ctot.
I built a simple model -
WhyDrop = @model begin
@param begin
θ ∈ RealDomain(lower=0.0001,init=1, upper=200000)
Ω ∈ RealDomain(init=0.09)
σ_prop ∈ RealDomain(init=0.09, lower=0.01, upper=1)
end
@random begin
η ~ Normal(Ω)
end
@pre begin
k = θ[1]*exp(η[1])
end
@covariates begin
CLS
V1S
end
@init begin
X = 1
end
@dynamics begin
a1' = -CLS*ctot
X' = -k*X
end
@vars begin
ctot := a1/V1S
cfree:= X*ctot
end
@derived begin
A1 = a1
Cfree = cfree
Ctot ~ @.Normal(ctot,sqrt(ctot^2*σ_prop+ eps()))
dv ~ @.Normal(Cfree,sqrt(Cfree^2*σ_prop+ eps()))
end
end
My Pumas_data is generated as:
dfP1=read_pumas(df9 ,id=:Subject, evid=:evid, time=:Time,amt=:Dosenmol, cmt=:cmt, rate=:Ratenmolday, cvs=[:CLS,:V1S], dvs=[:Ctot,:dv])
My question are simple:
-
How do I make sure my dose is applied to Ctot and not Cfree? I tried to define a :cmt in the df9 filling it with a1 instead of numbers but readPumas requires an integer. Is there any way to ensure that the dose goes to a1, other than making a1 the first equation?
-
I assume that fitting will be do by matching column names in the PumasFrame to the name of variable in the model? Is there anything else that I need to do to ensure that the data is matching to the right model variable when I have more than one observable?
Finally, whem I try to fit the model.
Using BayesMCMC() yieds result, but using FOCEI() or LapalceI() results in error:
param5=init_param(SEABCMAWhy5)
res5 = fit(SEABCMAWhy5,dfP1,param5,Pumas.LaplaceI())
PosDefException: matrix is not positive definite; Cholesky factorization failed.
Is this due to multiple observables? The documentations says LaplaceI should work, but it gives the same error as FOCEI.
Thanks,
A