Hello, I am very new to Pumas and to PMx world, and I am struggling to run an estimation with a simple model. I am reproducing from NONMEM run
The error message I had:
ERROR: gradient is exactly zero in TVK12. This indicates that TVK12 isn’t identified.
I checked posts regards to gradient is zero error, and it seems like TVK12 couldn’t be estimated since it is not read in the @dynamics, which I have made conversion to Ka at @pre and implemented in @dynamics.
Any hints or pointing directions will be appreciated.
aspirin_model = @model begin
@param begin
# pk parameters
TVK12 ∈ RealDomain(; lower = 0)
TVV ∈ RealDomain(; lower = 0)
TVCL ∈ RealDomain(; lower = 0)
Ω ∈ PDiagDomain(3)
σ_prop ∈ RealDomain(; lower = 0)
σ_add ∈ RealDomain(; lower = 0)
end
@random begin
η ~ MvNormal(Ω)
end
@pre begin
Ka = TVK12 * exp(η[1])
Vc = TVV * exp(η[2])
CL = TVCL * exp(η[3])
end
@dynamics begin
Depot' = - Ka * Depot
Central' = Ka * Depot - CL/Vc * Central
end
@derived begin
μ := @. Central / Vc
DV ~ @. Normal(μ, sqrt((μ * σ_prop^2) + σ_add^2))
end
end
aspirin_model_param = (;
TVK12 = 5,
TVV = 16.5,
TVCL = 5.75,
Ω = Diagonal([0.191, 0.133, 0.123]),
σ_prop = 0.335,
σ_add = 0.00001
);