using Pumas, Plots
twocompevsd = @model begin
@param begin
tvKa ∈ RealDomain(lower=0)
tvV1 ∈ RealDomain(lower=0)
tvV2 ∈ RealDomain(lower=0)
tvCL ∈ RealDomain(lower=0)
tvQ ∈ RealDomain(lower=0)
Ω ∈ PDiagDomain(5)
σ ∈ RealDomain(lower=0)
end
@random begin
η ~ MvNormal(Ω)
end
@pre begin
Ka = tvKa*exp(η[1])
V = tvV1*exp(η[2])
V2 = tvV2*exp(η[3])
CL =tvCL*exp(η[4])
Q =tvQ*exp(η[5])
end
@dynamics begin
Depot' = -Ka*Depot
Central' = Ka*Depot - (CL/V)*Central + Q/V2*Peripheral - Q/V*Central
Peripheral' = -Q/V2*Peripheral + Q/V*Central
end
@derived begin
Cp = @. Central/V
dv ~ @. Normal(Cp,sqrt(Cp^2*σ))
end
end
param = (tvKa = 0.9, tvV1 = 50, tvV2 = 20, tvCL = 9, tvQ =12, Ω=Diagonal([0.09,0.09,0.09,0.09,0.09]), σ=0.04)
DR = DosageRegimen(1000,cmt=1,time=0)
population = Population(map(i->Subject(id=i,evs=DR),1:15))
obs = simobs(twocompevsd,population,param,obstimes=0.1:1:24)
plot(obs)
df = DataFrame(obs)
data = read_pumas(df,dvs=[:dv])
res = fit(twocompevsd,data,param,Pumas.FOCEI())
infer(res)
error
infer(res)
Calculating: variance-covariance matrixERROR: DomainError with -4.435231697442742e-6:
sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
Stacktrace:
[1] throw_complex_domainerror(::Symbol, ::Float64) at .\math.jl:32
[2] sqrt at .\math.jl:492 [inlined]
[3] _broadcast_getindex_evalf at .\broadcast.jl:630 [inlined]
[4] _broadcast_getindex at .\broadcast.jl:603 [inlined]
[5] _getindex at .\broadcast.jl:626 [inlined]
[6] _broadcast_getindex at .\broadcast.jl:602 [inlined]
[7] getindex at .\broadcast.jl:563 [inlined]
[8] macro expansion at .\broadcast.jl:909 [inlined]
[9] macro expansion at .\simdloop.jl:77 [inlined]
[10] copyto! at .\broadcast.jl:908 [inlined]
[11] copyto! at .\broadcast.jl:863 [inlined]
[12] copy at .\broadcast.jl:839 [inlined]
[13] materialize at .\broadcast.jl:819 [inlined]
[14] unwhiten(::PDMats.PDiagMat{Float64,Array{Float64,1}}, ::SubArray{ForwardDiff.Dual{ForwardDiff.Tag{Pumas.var"#190#191"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}},Tuple{}},Float64},Float64,5},1,Array{ForwardDiff.Dual{ForwardDiff.Tag{Pumas.var"#190#191"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}},Tuple{}},Float64},Float64,5},1},Tuple{UnitRange{Int64}},true}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:2
[15] transform_with at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\transforms.jl:295 [inlined]
[16] _transform_tuple at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\TransformVariables\a4AMY\src\aggregation.jl:161 [inlined]
[17] transform_tuple at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\TransformVariables\a4AMY\src\aggregation.jl:171 [inlined]
[18] transform_with at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\TransformVariables\a4AMY\src\aggregation.jl:223 [inlined]
[19] transform(::TransformVariables.TransformTuple{NamedTuple{(:η,),Tuple{Pumas.MvNormalTransform{MvNormal{Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},FillArrays.Zeros{Float64,1,Tuple{Base.OneTo{Int64}}}}}}}}, ::Array{ForwardDiff.Dual{ForwardDiff.Tag{Pumas.var"#190#191"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}},Tuple{}},Float64},Float64,5},1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\TransformVariables\a4AMY\src\generic.jl:196
[20] (::Pumas.var"#190#191"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}},Tuple{}})(::Array{ForwardDiff.Dual{ForwardDiff.Tag{Pumas.var"#190#191"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}},Tuple{}},Float64},Float64,5},1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:685
[21] #_derived_vηorth_gradient#189(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}}, ::typeof(Pumas._derived_vηorth_gradient), ::PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"}, ::Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}}, ::NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}}, ::Array{Float64,1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:693
[22] _derived_vηorth_gradient at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:684 [inlined]
[23] #∂²l∂η²#195(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}}, ::typeof(Pumas.∂²l∂η²), ::PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"}, ::Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}}, ::NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}}, ::Array{Float64,1}, ::Pumas.FOCEI) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:728
[24] ∂²l∂η² at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:728 [inlined]
[25] (::Pumas.var"#_fgh!#146"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}},Pumas.FOCEI,Tuple{}})(::Float64, ::Array{Float64,1}, ::Nothing, ::Array{Float64,1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:223
[26] (::NLSolversBase.var"#81#85"{NLSolversBase.InplaceObjective{Nothing,Nothing,Pumas.var"#_fgh!#146"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}},Pumas.FOCEI,Tuple{}},Nothing,Nothing},Float64})(::Array{Float64,1}, ::Array{Float64,1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\NLSolversBase\mGaJg\src\objective_types\incomplete.jl:99
[27] value_gradient!!(::NLSolversBase.TwiceDifferentiable{Float64,Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\NLSolversBase\mGaJg\src\interface.jl:82
[28] initial_state(::Optim.NewtonTrustRegion{Float64}, ::Optim.Options{Float64,Nothing}, ::NLSolversBase.TwiceDifferentiable{Float64,Array{Float64,1},Array{Float64,2},Array{Float64,1}}, ::Array{Float64,1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Optim\SFpsz\src\multivariate\solvers\second_order\newton_trust_region.jl:298
[29] optimize at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Optim\SFpsz\src\multivariate\optimize\optimize.jl:33 [inlined]
[30] #_orth_empirical_bayes!#145(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}}, ::typeof(Pumas._orth_empirical_bayes!), ::Array{Float64,1}, ::PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"}, ::Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}}, ::NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}}, ::Pumas.FOCEI) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:248
[31] _orth_empirical_bayes! at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:221 [inlined]
[32] #_orth_empirical_bayes#143(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}}, ::typeof(Pumas._orth_empirical_bayes), ::PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"}, ::Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}}, ::NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{Float64,Float64,Float64,Float64,Float64,PDMats.PDiagMat{Float64,Array{Float64,1}},Float64}}, ::Pumas.FOCEI) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:197
[33] _orth_empirical_bayes at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:195 [inlined]
[34] (::Pumas.var"#232#233"{Float64,Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Array{Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},1},Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#211#212"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat},Float64,Array{Float64,1},Float64,Float64,Array{Optim.OptimizationState{Float64,Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#211#212"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.FOCEI,Array{Array{Float64,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},Pumas.PDiagTransform,TransformVariables.ShiftedExp{true,Int64}}}}},Tuple{},TransformVariables.TransformTuple{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{TransformVariables.Identity,TransformVariables.Identity,TransformVariables.Identity,TransformVariables.Identity,TransformVariables.Identity,Pumas.DiagonalTransform,TransformVariables.Identity}}},Float64,Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}}})(::Array{Float64,1}, ::Array{Float64,1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:1184
[35] #finite_difference_jacobian!#40(::Float64, ::Float64, ::UnitRange{Int64}, ::Nothing, ::Bool, ::typeof(FiniteDiff.finite_difference_jacobian!), ::Array{Float64,2}, ::Pumas.var"#232#233"{Float64,Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Array{Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},1},Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#211#212"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat},Float64,Array{Float64,1},Float64,Float64,Array{Optim.OptimizationState{Float64,Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#211#212"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.FOCEI,Array{Array{Float64,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},Pumas.PDiagTransform,TransformVariables.ShiftedExp{true,Int64}}}}},Tuple{},TransformVariables.TransformTuple{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{TransformVariables.Identity,TransformVariables.Identity,TransformVariables.Identity,TransformVariables.Identity,TransformVariables.Identity,Pumas.DiagonalTransform,TransformVariables.Identity}}},Float64,Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}}}, ::Array{Float64,1}, ::FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:central},Float64}, ::Array{Float64,1}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\FiniteDiff\EBys0\src\jacobians.jl:372
[36] (::FiniteDiff.var"#kw##finite_difference_jacobian!")(::NamedTuple{(:relstep, :absstep, :colorvec, :sparsity),Tuple{Float64,Float64,UnitRange{Int64},Nothing}}, ::typeof(FiniteDiff.finite_difference_jacobian!),
::Array{Float64,2}, ::Function, ::Array{Float64,1}, ::FiniteDiff.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},UnitRange{Int64},Nothing,Val{:central},Float64}, ::Array{Float64,1}) at .\none:0
[37] (::FiniteDiff.var"#kw##finite_difference_jacobian!")(::NamedTuple{(:relstep, :absstep),Tuple{Float64,Float64}}, ::typeof(FiniteDiff.finite_difference_jacobian!), ::Array{Float64,2}, ::Function, ::Array{Float64,1}, ::Type{Val{:central}}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\FiniteDiff\EBys0\src\jacobians.jl:282
[38] #_observed_information#231(::Float64, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}}, ::typeof(Pumas._observed_information), ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Array{Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},1},Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#211#212"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat},Float64,Array{Float64,1},Float64,Float64,Array{Optim.OptimizationState{Float64,Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#211#212"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.FOCEI,Array{Array{Float64,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},Pumas.PDiagTransform,TransformVariables.ShiftedExp{true,Int64}}}}}, ::Val{true}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:1203
[39] _observed_information at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:1161 [inlined]
[40] #vcov#253(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}}, ::typeof(vcov), ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},RealDomain{Int64,TransformVariables.Infinity{true},Float64},PDiagDomain{PDMats.PDiagMat{Float64,Array{Float64,1}}},RealDomain{Int64,TransformVariables.Infinity{true},Float64}}}},var"#27#34",var"#28#35",var"#29#36",ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,var"#30#37",LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},var"#32#39",var"#33#40"},Array{Subject{NamedTuple{(:dv,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},1},Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#211#212"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat},Float64,Array{Float64,1},Float64,Float64,Array{Optim.OptimizationState{Float64,Optim.BFGS{LineSearches.InitialStatic{Float64},LineSearches.BackTracking{Float64,Int64},Pumas.var"#211#212"{NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.FOCEI,Array{Array{Float64,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:tvKa, :tvV1, :tvV2, :tvCL, :tvQ, :Ω, :σ),Tuple{TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},TransformVariables.ShiftedExp{true,Int64},Pumas.PDiagTransform,TransformVariables.ShiftedExp{true,Int64}}}}}) at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:1361
[41] vcov at C:\Users\Lenovo\.juliapro\JuliaPro_v1.3.1-1\packages\Pumas\Twdge\src\estimation\likelihoods.jl:1361 [inlined]
[42] #infer#272(::Float64,