Estimate with missing values on dependent variable?

I’ve been working on a fitting where there are some measurements before dosing, but not at the exact dosing time -

time	    tad	     rate	      amt	      Drug
Float64	  Float64	Float64⍰	Float64⍰	Float64⍰
0.0	        0.0	      missing	 missing	   12
0.1	        0.0	      1000	      100.0	    missing
0.5	        0.4	     missing	missing	     1000
1.0	        0.9	     missing	missing	     980

evid is 1 where amt is not missing, 0 otherwise.

I define my julia dataset as:


dfP=read_pumas(df9 ,id=:Subject, evid=:evid, time=:Time, amt=:Dosemg, rate=:rate, dvs=[:Drug])

In the model

@derived begin
        a1               = A1
        Conc_Mean        = C1
        Drug ~ @. Normal(Conc_Mean, sqrt(Conc_Mean^2*σ_prop))

However when I run the estimation my model fails:

param=init_param(Model)
# res3 = fit(Model,dfP,param,Pumas.FOCEI())

res2= fit(Model,dfP,param,Pumas.NaivePooled())

I wonder if this is because of my missing value in :Drug, which is my dependent variable or if something else is going on?
If the former - is there a way for the estimator to inpute the value?

┌ Warning: First function call produced NaNs. Exiting.
└ @ OrdinaryDiffEq C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\OrdinaryDiffEq\UsWa2\src\initdt.jl:135
┌ Warning: Automatic dt set the starting dt as NaN, causing instability.
└ @ OrdinaryDiffEq C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\OrdinaryDiffEq\UsWa2\src\solve.jl:403

┌ Warning: First function call produced NaNs. Exiting.
└ @ OrdinaryDiffEq C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\OrdinaryDiffEq\UsWa2\src\initdt.jl:135

type NamedTuple has no field dv

Stacktrace:
[1] getproperty(::Any, ::Symbol) at .\Base.jl:20
[2] (::getfield(Pumas, Symbol("##462#464")))(::Subject{NamedTuple{(:Drug,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\6uorK\src\estimation\show.jl:15
[3] _mapreduce(::getfield(Pumas, Symbol("##462#464")), ::typeof(Base.add_sum), ::IndexLinear, ::Array{Subject{NamedTuple{(:Drug,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},1}) at .\reduce.jl:317
[4] _mapreduce_dim(::Function, ::Function, ::NamedTuple{,Tuple{}}, ::Array{Subject{NamedTuple{(:Drug,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},1}, ::Colon) at .\reducedim.jl:312
[5] #mapreduce#555 at .\reducedim.jl:307 [inlined]
[6] mapreduce at .\reducedim.jl:307 [inlined]
[7] _sum(::Function, ::Array{Subject{NamedTuple{(:Drug,),Tuple{Array{Union{Missing, Float64},1}}},Nothing,Array{Pumas.Event{Float64,Float64,Float64,Float64,Float64,Float64,Int64},1},Array{Float64,1}},1}, ::Colon) at .\reducedim.jl:657
[8] #sum#559 at .\reducedim.jl:653 [inlined]
[9] sum at .\reducedim.jl:653 [inlined]
[10] _print_fit_header(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1107#1114")),getfield(Main, Symbol("##1108#1115")),getfield(Main, Symbol("##1109#1116")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1110#1117")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1112#1119")),getfield(Main, Symbol("##1113#1120"))},Array{Subject{NamedTuple{(:Drug,),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},getfield(Pumas, Symbol("##200#201")){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},getfield(Pumas, Symbol("##200#201")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\6uorK\src\estimation\show.jl:14
[11] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1107#1114")),getfield(Main, Symbol("##1108#1115")),getfield(Main, Symbol("##1109#1116")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1110#1117")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1112#1119")),getfield(Main, Symbol("##1113#1120"))},Array{Subject{NamedTuple{(:Drug,),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},getfield(Pumas, Symbol("##200#201")){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},getfield(Pumas, Symbol("##200#201")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\6uorK\src\estimation\show.jl:23
[12] limitstringmime(::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1107#1114")),getfield(Main, Symbol("##1108#1115")),getfield(Main, Symbol("##1109#1116")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1110#1117")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1112#1119")),getfield(Main, Symbol("##1113#1120"))},Array{Subject{NamedTuple{(:Drug,),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},getfield(Pumas, Symbol("##200#201")){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},getfield(Pumas, Symbol("##200#201")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\inline.jl:37
[13] display_mimestring(::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1107#1114")),getfield(Main, Symbol("##1108#1115")),getfield(Main, Symbol("##1109#1116")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1110#1117")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1112#1119")),getfield(Main, Symbol("##1113#1120"))},Array{Subject{NamedTuple{(:Drug,),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},getfield(Pumas, Symbol("##200#201")){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},getfield(Pumas, Symbol("##200#201")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\display.jl:67
[14] display_dict(::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1107#1114")),getfield(Main, Symbol("##1108#1115")),getfield(Main, Symbol("##1109#1116")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1110#1117")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1112#1119")),getfield(Main, Symbol("##1113#1120"))},Array{Subject{NamedTuple{(:Drug,),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},getfield(Pumas, Symbol("##200#201")){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},getfield(Pumas, Symbol("##200#201")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\display.jl:96
[15] #invokelatest#1 at .\essentials.jl:790 [inlined]
[16] invokelatest at .\essentials.jl:789 [inlined]
[17] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\execute_request.jl:112
[18] #invokelatest#1 at .\essentials.jl:790 [inlined]
[19] invokelatest at .\essentials.jl:789 [inlined]
[20] eventloop(::ZMQ.Socket) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\eventloop.jl:8
[21] (::getfield(IJulia, Symbol("##15#18")))() at .\task.jl:268

  1. Can you try by renaming Drug to dv in your dataset
  2. What is your measurement before dosing? Is this an endogenous substance? If so, is that value at steady state or did you define an initial condition for that compartment? If your answer to any of these questions is “no”, you likely will not be able to estimate from that data

Hi Vijay,

  1. did the first thing and I got other error.

I’ll check tomorrow at work and forward to you in the morning.

  1. yes, but I didn’t define a steady state value or initial condition.

Should I set steady state as the value pre admin?

Thanks-

A

If the compartment for which you have a differential equation has an amount to begin with (before dosing), then you should either estimate that amount or set it’s initial value (e.g baseline) using the @init block

This error suggests that you are not using the latest version of Pumas. Could you please try ] up Pumas from the command prompt? Once you have upgraded, it should be fine to call the dependent variable Drug.

Regarding the

Warning: First function call produced NaNs. Exiting.

errors there can be various reasons.

I wonder if this is because of my missing value in :Drug, which is my dependent variable

As such, a missing value shouldn’t be a problem. Pumas should just ignore it. One simple thing you could try would be to set alg=Tsit5() in fit. In some rare cases, we have seen issues with the default solver.

So, I updated Pumas and tried Vijay solution (adding an initial condition to A1 from which dv is derived, and naming :Drug :dv in the Dataframe)
I got this error

┌ Warning: dt <= dtmin. Aborting. There is either an error in your model specification or the true solution is unstable.
└ @ DiffEqBase C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\DiffEqBase\IDJcQ\src\integrator_interface.jl:170

BoundsError: attempt to access 9-element Array{String,1} at index [0]

Stacktrace:
[1] getindex at .\array.jl:728 [inlined]
[2] getindex at .\multidimensional.jl:486 [inlined]
[3] (::getfield(Pumas, Symbol("##493#494")))(::Char) at .\none:0
[4] iterate at .\generator.jl:47 [inlined]
[5] collect_to!(::Array{String,1}, ::Base.Generator{String,getfield(Pumas, Symbol("##493#494"))}, ::Int64, ::Int64) at .\array.jl:651
[6] collect_to_with_first! at .\array.jl:630 [inlined]
[7] collect(::Base.Generator{String,getfield(Pumas, Symbol("##493#494"))}) at .\array.jl:611
[8] _to_subscript at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:2 [inlined]
[9] _push_varinfo!(::Array{Any,1}, ::Array{Any,1}, ::Nothing, ::Nothing, ::Symbol, ::Array{Float64,1}, ::Nothing, ::Nothing) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:118
[10] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##113#120")),getfield(Main, Symbol("##114#121")),getfield(Main, Symbol("##115#122")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##116#123")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##118#125")),getfield(Main, Symbol("##119#126"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:28
[11] limitstringmime(::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##113#120")),getfield(Main, Symbol("##114#121")),getfield(Main, Symbol("##115#122")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##116#123")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##118#125")),getfield(Main, Symbol("##119#126"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\inline.jl:37
[12] display_mimestring(::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##113#120")),getfield(Main, Symbol("##114#121")),getfield(Main, Symbol("##115#122")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##116#123")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##118#125")),getfield(Main, Symbol("##119#126"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\display.jl:67
[13] display_dict(::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##113#120")),getfield(Main, Symbol("##114#121")),getfield(Main, Symbol("##115#122")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##116#123")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##118#125")),getfield(Main, Symbol("##119#126"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\display.jl:96
[14] #invokelatest#1 at .\essentials.jl:790 [inlined]
[15] invokelatest at .\essentials.jl:789 [inlined]
[16] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\execute_request.jl:112
[17] #invokelatest#1 at .\essentials.jl:790 [inlined]
[18] invokelatest at .\essentials.jl:789 [inlined]
[19] eventloop(::ZMQ.Socket) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\eventloop.jl:8
[20] (::getfield(IJulia, Symbol("##15#18")))() at .\task.jl:268

Then I tried to use alg =Tsit5()

and got the following error:

Spoilers common elemnt of error is

BoundsError: attempt to access 9-element Array{String,1} at index [0] -> Though I am not sure what string array it is referring to

┌ Warning: Interrupted. Larger maxiters is needed.
└ @ DiffEqBase C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\DiffEqBase\IDJcQ\src\integrator_interface.jl:156

BoundsError: attempt to access 9-element Array{String,1} at index [0]

Stacktrace:
[1] getindex at .\array.jl:728 [inlined]
[2] getindex at .\multidimensional.jl:486 [inlined]
[3] (::getfield(Pumas, Symbol("##493#494")))(::Char) at .\none:0
[4] iterate at .\generator.jl:47 [inlined]
[5] collect_to!(::Array{String,1}, ::Base.Generator{String,getfield(Pumas, Symbol("##493#494"))}, ::Int64, ::Int64) at .\array.jl:651
[6] collect_to_with_first! at .\array.jl:630 [inlined]
[7] collect(::Base.Generator{String,getfield(Pumas, Symbol("##493#494"))}) at .\array.jl:611
[8] _to_subscript at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:2 [inlined]
[9] _push_varinfo!(::Array{Any,1}, ::Array{Any,1}, ::Nothing, ::Nothing, ::Symbol, ::Array{Float64,1}, ::Nothing, ::Nothing) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:118
[10] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##141#148")),getfield(Main, Symbol("##142#149")),getfield(Main, Symbol("##143#150")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##144#151")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##146#153")),getfield(Main, Symbol("##147#154"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Symbol,Tsit5,Tuple{Symbol},NamedTuple{(:alg,),Tuple{Tsit5}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:28
[11] limitstringmime(::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##141#148")),getfield(Main, Symbol("##142#149")),getfield(Main, Symbol("##143#150")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##144#151")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##146#153")),getfield(Main, Symbol("##147#154"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Symbol,Tsit5,Tuple{Symbol},NamedTuple{(:alg,),Tuple{Tsit5}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\inline.jl:37
[12] display_mimestring(::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##141#148")),getfield(Main, Symbol("##142#149")),getfield(Main, Symbol("##143#150")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##144#151")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##146#153")),getfield(Main, Symbol("##147#154"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Symbol,Tsit5,Tuple{Symbol},NamedTuple{(:alg,),Tuple{Tsit5}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\display.jl:67
[13] display_dict(::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##141#148")),getfield(Main, Symbol("##142#149")),getfield(Main, Symbol("##143#150")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##144#151")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##146#153")),getfield(Main, Symbol("##147#154"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Symbol,Tsit5,Tuple{Symbol},NamedTuple{(:alg,),Tuple{Tsit5}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\display.jl:96
[14] #invokelatest#1 at .\essentials.jl:790 [inlined]
[15] invokelatest at .\essentials.jl:789 [inlined]
[16] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\execute_request.jl:112
[17] #invokelatest#1 at .\essentials.jl:790 [inlined]
[18] invokelatest at .\essentials.jl:789 [inlined]
[19] eventloop(::ZMQ.Socket) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\eventloop.jl:8
[20] (::getfield(IJulia, Symbol("##15#18")))() at .\task.jl:268

Can you paste your model here? Did you change to dv in the @derived block?

yes -
I did.

This is a sensitive model. I could get in trouble by pasting it publicly. Can I share it directly with you privately if needed?

I remove the early times (before dosing) and subtracted the values as background, and it seems that solved the issue, Julia is bee running for 30 mins without crashing - so fingers crossed.
I am still confused how this would work if I have not done that.

Take care,

A

Can I share with you directly

I got the same error - even with the corrected database

BoundsError: attempt to access 9-element Array{String,1} at index [0]

Stacktrace:
[1] getindex at .\array.jl:728 [inlined]
[2] getindex at .\multidimensional.jl:486 [inlined]
[3] (::getfield(Pumas, Symbol("##493#494")))(::Char) at .\none:0
[4] iterate at .\generator.jl:47 [inlined]
[5] collect_to!(::Array{String,1}, ::Base.Generator{String,getfield(Pumas, Symbol("##493#494"))}, ::Int64, ::Int64) at .\array.jl:651
[6] collect_to_with_first! at .\array.jl:630 [inlined]
[7] collect(::Base.Generator{String,getfield(Pumas, Symbol("##493#494"))}) at .\array.jl:611
[8] _to_subscript at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:2 [inlined]
[9] _push_varinfo!(::Array{Any,1}, ::Array{Any,1}, ::Nothing, ::Nothing, ::Symbol, ::Array{Float64,1}, ::Nothing, ::Nothing) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:118
[10] show(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1257#1264")),getfield(Main, Symbol("##1258#1265")),getfield(Main, Symbol("##1259#1266")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1260#1267")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1262#1269")),getfield(Main, Symbol("##1263#1270"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Symbol,Tsit5,Tuple{Symbol},NamedTuple{(:alg,),Tuple{Tsit5}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\Pumas\0Bex7\src\estimation\show.jl:28
[11] limitstringmime(::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1257#1264")),getfield(Main, Symbol("##1258#1265")),getfield(Main, Symbol("##1259#1266")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1260#1267")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1262#1269")),getfield(Main, Symbol("##1263#1270"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Symbol,Tsit5,Tuple{Symbol},NamedTuple{(:alg,),Tuple{Tsit5}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\inline.jl:37
[12] display_mimestring(::MIME{Symbol(“text/plain”)}, ::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1257#1264")),getfield(Main, Symbol("##1258#1265")),getfield(Main, Symbol("##1259#1266")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1260#1267")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1262#1269")),getfield(Main, Symbol("##1263#1270"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Symbol,Tsit5,Tuple{Symbol},NamedTuple{(:alg,),Tuple{Tsit5}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\display.jl:67
[13] display_dict(::Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:θ, :σ_prop),Tuple{VectorDomain{Array{Float64,1},Array{TransformVariables.Infinity{true},1},Array{Float64,1}},RealDomain{Float64,Int64,Float64}}}},getfield(Main, Symbol("##1257#1264")),getfield(Main, Symbol("##1258#1265")),getfield(Main, Symbol("##1259#1266")),ODEProblem{Nothing,Tuple{Nothing,Nothing},false,Nothing,ODEFunction{false,getfield(Main, Symbol("##1260#1267")),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{,Tuple{}}},DiffEqBase.StandardODEProblem},getfield(Main, Symbol("##1262#1269")),getfield(Main, Symbol("##1263#1270"))},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},getfield(Pumas, Symbol("##220#221")){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},getfield(Pumas, Symbol("##220#221")){NLSolversBase.OnceDifferentiable{Float64,Array{Float64,1},Array{Float64,1}},Array{Float64,1}},Nothing,Optim.Flat}},1},Bool},Pumas.NaivePooled,Array{Array{Any,1},1},Tuple{},Base.Iterators.Pairs{Symbol,Tsit5,Tuple{Symbol},NamedTuple{(:alg,),Tuple{Tsit5}}},TransformVariables.TransformTuple{NamedTuple{(:θ, :σ_prop),Tuple{Pumas.ElementArrayTransform{TransformVariables.ShiftedExp{true,Float64},1},TransformVariables.ScaledShiftedLogistic{Float64}}}}}) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\display.jl:96
[14] #invokelatest#1 at .\essentials.jl:790 [inlined]
[15] invokelatest at .\essentials.jl:789 [inlined]
[16] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\execute_request.jl:112
[17] #invokelatest#1 at .\essentials.jl:790 [inlined]
[18] invokelatest at .\essentials.jl:789 [inlined]
[19] eventloop(::ZMQ.Socket) at C:\Users\awolf-yadlin.juliapro\JuliaPro_v1.2.0-1\packages\IJulia\fRegO\src\eventloop.jl:8
[20] (::getfield(IJulia, Symbol("##15#18")))() at .\task.jl:268

The error you get is a bug in Pumas when a parameters vector has ten or more elements. However, it only affects the printing of the fitted model. You shouldn’t get the error if you add a semicolon at the end of the line where you fit the model. You should be able to extract the fitted coefficient with coef(res) where res is the fitted model.

1 Like

Issue filed in https://github.com/PumasAI/Pumas.jl/issues/779

@alewolf Thanks for finding and reporting on this issue. It has been fixed on the master branch, but obviously won’t be available before the next version of Pumas. For now, I unfortunately have to ask you to suppress the output or split your variables into vectors of length up to 9. Happy to help if you have some more specific code to share (with details stripped that are not for public consumption).

1 Like