Hi!
Would anyone help me translate the individual model equation obtained in Monolix into Pumas language? FC is my categorical covariable and the dose was given by iv.
I tried to do this using the IF/ELSE command, based on pumas documentation, but some Gofs didn’t look good. In this case dFC2dcl sounds like beta values in monolix, right?
[Pumas model, 2 cmt model]
mdl_2cmp_prop = @ model begin
@ param begin
# model parameters
tvcl ∈ RealDomain(lower = 0.001)
tvv ∈ RealDomain(lower = 0.001)
tvvp ∈ RealDomain(lower = 0.001)
tvq ∈ RealDomain(lower = 0.001)
Ω ∈ PDiagDomain(3)
σ ∈ RealDomain(lower = 0.001)
dFC1dcl ∈ RealDomain(lower = 0.001) # FC effect on parameter
dFC2dcl ∈ RealDomain(lower = 0.001)
dFC1dv ∈ RealDomain(lower = 0.001)
dFC2dv ∈ RealDomain(lower = 0.001)
dFC1dq ∈ RealDomain(lower = 0.001)
dFC2dq ∈ RealDomain(lower = 0.001)
end
@ pre begin
#https://tutorials.pumas.ai/html/introduction/covariate.html#categorical-covariates
CL = if FC == 1
tvcl * exp(η[1]) * dFC1dcl
elseif FC == 2
tvcl * exp(η[1]) * dFC2dcl
end
Vc = if FC == 1
tvv * exp(η[2]) * dFC1dv
elseif FC == 2
tvv * exp(η[2]) * dFC2dv
end
Q = if FC == 1
tvq * exp(η[3]) * dFC1dq
elseif FC == 2
tvq * exp(η[3]) * dFC2dq
end
Vp = tvvp
end
Dear @anafunguetto - welcome to the Pumas community. Glad to help you.
While your approach should work, you could start with a one to one translation of your monolix code and use something like this below.
@param begin
....
beta_Cl_FC_2 in RealDomain()
beta_V1_FC_2 in RealDomain()
beta_Q_FC_2 in RealDomain()
....
end
@pre begin
Cl = Cl_pop * beta_Cl_FC_2*(FC == 2) * exp(eta_Cl)
V1 = V1_pop * beta_V1_FC_2*(FC == 2) * exp(eta_V1)
Q = Q_pop * beta_Q_FC_2*(FC == 2) * exp(eta_Q)
V2 = V2_pop
end
This means that Cl_pop is the population value of clearance for FC==1, V1_pop is the population value of volume for FC==1 etc. Correspondingly beta_Cl_FC_2 is the multiplicative difference in population clearance between FC==1 and FC==2
Thank you for your time! I did it, but now I have this error message in maximum LL estimation:
"ERROR: DomainError with Inf:
The initial parameter values cause a negative log likelihood of Inf. This can be due to model mis-specification or bad initial parameter values.