On copying the same codes and running the simulation in another window, I tend to get different outputs.
using Pumas
using Plots
myfirstmodelinpumas = @model begin
@param begin
tvka ∈ RealDomain(lower=0)
tvcl ∈ RealDomain(lower=0)
tvvc ∈ RealDomain(lower=0)
tvvp ∈ RealDomain(lower=0)
tvQ ∈ RealDomain(lower=0)
Ω ∈ PDiagDomain(5)
σ_prop ∈ RealDomain(lower=0)
end
@random begin
η ~ MvNormal(Ω)
end
@pre begin
CL = tvcl * exp(η[1])
Vc = tvvc * exp(η[2])
Ka = tvka * exp(η[3])
Q = tvQ * exp(η[4])
Vp = tvvp * exp(η[5])
end
@dynamics begin
depot' = -Ka*depot
central' = Ka*depot - (CL/Vc)*central + (Q/Vp)*peripheral - (Q/Vc)*central
peripheral' = -(Q/Vp)*peripheral + (Q/Vc)*central
end
@derived begin
cp = @. central/Vc
dv ~ @. Normal(cp, sqrt(cp*σ_prop^2))
end
end
para = (tvka = 1,
tvcl = 12.0,
tvvc = 77.1,
tvvp = 52.3,
tvQ = 9.22,
Ω = Diagonal([0.09,0.09,0.09,0.09,0.09]),
σ_prop = 0.04)
evoral = DosageRegimen(120, time=0, cmt=1, ii=12, addl=5)
eviva = DosageRegimen(60, rate=40, time=1, cmt=2)
evcom = DosageRegimen(evoral, eviva)
ssotalol = Subject(id=1, evs=evcom)
obssotalol = simobs(myfirstmodelinpumas, ssotalol, para, obstimes=0:1:120)
plot(obssotalol)
why does that happen?