Hello,
For a specific model, I was able to estimate parameters and run the code
inspect(fitted_Pumas_model)
. But when I am trying to convert it to a data frame using |> DataFrame
,
I am getting the following error
[ Info: Calculating predictions.
[ Info: Calculating weighted residuals.
[ Info: Calculating empirical bayes.
[ Info: Done.
ERROR: LoadError: MethodError: no method matching isless(::Int64, ::String)
Closest candidates are:
isless(::Union{Number, Dates.AbstractTime}, ::IntervalSets.ClosedInterval{T} where T) at /builds/PumasAI/PumasSystemImages-jl/.julia/packages/AxisArrays/FWWEV/src/intervals.jl:53
isless(::Union{AbstractChar, AbstractString, Number}, ::CategoricalArrays.CategoricalValue) at /builds/PumasAI/PumasSystemImages-jl/.julia/packages/CategoricalArrays/rDwMt/src/value.jl:160
isless(::Integer, ::ForwardDiff.Dual{Ty, V, N} where {V, N}) where Ty at /builds/PumasAI/PumasSystemImages-jl/.julia/packages/ForwardDiff/QOqCN/src/dual.jl:140
...
Stacktrace:
[1] lt(o::Base.Order.ForwardOrdering, a::Int64, b::String)
@ Base.Order ./ordering.jl:109
[2] lt(o::DataFrames.DFPerm{Base.Order.ForwardOrdering, Tuple{Vector{Any}, Vector{Float64}}}, a::Int64, b::Int64)
@ DataFrames /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/nxjiD/src/abstractdataframe/sort.jl:128
[3] sort!(v::Vector{Int64}, lo::Int64, hi::Int64, a::Base.Sort.MergeSortAlg, o::DataFrames.DFPerm{Base.Order.ForwardOrdering, Tuple{Vector{Any}, Vector{Float64}}}, t::Vector{Int64})
@ Base.Sort ./sort.jl:604
[4] sort!
@ ./sort.jl:586 [inlined]
[5] sort!
@ ./sort.jl:657 [inlined]
[6] _sortperm
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/nxjiD/src/abstractdataframe/sort.jl:490 [inlined]
[7] sort!(df::DataFrame, a::Base.Sort.MergeSortAlg, o::DataFrames.DFPerm{Base.Order.ForwardOrdering, Tuple{Vector{Any}, Vector{Float64}}})
@ DataFrames /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/nxjiD/src/dataframe/sort.jl:89
[8] sort!(df::DataFrame, cols::Vector{Symbol}; alg::Nothing, lt::Function, by::Function, rev::Bool, order::Base.Order.ForwardOrdering)
@ DataFrames /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/nxjiD/src/dataframe/sort.jl:85
[9] sort!
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/DataFrames/nxjiD/src/dataframe/sort.jl:74 [inlined]
[10] _add_covariates(df::DataFrame, subject::Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}})
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/XHa5R/src/data_parsing/io.jl:919
[11] DataFrame(subject::Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}; include_covariates::Bool, include_observations::Bool, include_events::Bool)
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/XHa5R/src/data_parsing/io.jl:879
[12] DataFrame(pred::Pumas.SubjectPrediction{NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, Nothing, Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}; include_covariates::Bool, include_observations::Bool, include_events::Bool)
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/XHa5R/src/estimation/diagnostics.jl:189
[13] (::Base.Broadcast.var"#31#32"{Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:include_covariates, :include_observations, :include_events), Tuple{Bool, Bool, Bool}}}, DataType})(args::Pumas.SubjectPrediction{NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, Nothing, Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}})
@ Base.Broadcast ./broadcast.jl:1297
[14] _broadcast_getindex_evalf
@ ./broadcast.jl:648 [inlined]
[15] _broadcast_getindex
@ ./broadcast.jl:621 [inlined]
[16] getindex
@ ./broadcast.jl:575 [inlined]
[17] copy
@ ./broadcast.jl:922 [inlined]
[18] materialize
@ ./broadcast.jl:883 [inlined]
[19] DataFrame(vpred::Vector{Pumas.SubjectPrediction{NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, Nothing, Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}; include_covariates::Bool, include_observations::Bool, include_events::Bool)
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/XHa5R/src/estimation/diagnostics.jl:227
[20] DataFrame(fpmi::Pumas.FittedPumasModelInspection{Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:A1, :A2, :B1, :B2, :B3, :F_CR1, :F_CR2, :F_CR3, :Ω²_kel, :Ω²_vc, :σ²_add), Tuple{RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}}}}, var"#5#61", var"#6#62", var"#8#64", var"#10#66", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{var"#11#67", var"#12#68"}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, var"#13#69", var"#37#93", ModelingToolkit.ODESystem}, Vector{Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}, Float64, Vector{Float64}, Float64, Float64, Vector{Optim.OptimizationState{Float64, Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}}}, Bool, NamedTuple{(:f_limit_reached, :g_limit_reached, :h_limit_reached, :time_limit, :callback, :f_increased), NTuple{6, Bool}}}, Pumas.FOCE, Vector{Vector{Float64}}, NamedTuple{(:optimize_fn, :constantcoef, :omegas, :ensemblealg, :diffeq_options), Tuple{Pumas.DefaultOptimizeFN{Nothing, NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_increases), Tuple{Bool, Bool, Bool, Float64, Bool}}}, NamedTuple{(:Ω²_kel, :Ω²_vc, :σ²_prop, :A1, :A2, :F_CR1), Tuple{Float64, Float64, Float64, Int64, Int64, Int64}}, Tuple{}, EnsembleThreads, NamedTuple{(:reltol,), Tuple{Float64}}}}, ParamSet{NamedTuple{(:A1, :A2, :B1, :B2, :B3, :F_CR1, :F_CR2, :F_CR3, :Ω²_kel, :Ω²_vc, :σ²_add), Tuple{Pumas.ConstDomain{Int64}, Pumas.ConstDomain{Int64}, RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, Pumas.ConstDomain{Int64}, RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, Pumas.ConstDomain{Float64}, Pumas.ConstDomain{Float64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}}}}}, Vector{Pumas.SubjectPrediction{NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, Nothing, Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}, Vector{Pumas.SubjectResidual{NamedTuple{(:cp,), Tuple{Vector{Float64}}}, NamedTuple{(:cp,), Tuple{Vector{Float64}}}, Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}, Pumas.FOCE}}, NamedTuple{(:ebes,), Tuple{Vector{NamedTuple{(:η_kel, :η_vc), Tuple{Float64, Float64}}}}}, Nothing}; include_covariates::Bool, include_observations::Bool, include_events::Bool)
@ Pumas /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/XHa5R/src/estimation/diagnostics.jl:1128
[21] DataFrame
@ /builds/PumasAI/PumasSystemImages-jl/.julia/packages/Pumas/XHa5R/src/estimation/diagnostics.jl:1128 [inlined]
[22] |>(x::Pumas.FittedPumasModelInspection{Pumas.FittedPumasModel{PumasModel{ParamSet{NamedTuple{(:A1, :A2, :B1, :B2, :B3, :F_CR1, :F_CR2, :F_CR3, :Ω²_kel, :Ω²_vc, :σ²_add), Tuple{RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}}}}, var"#5#61", var"#6#62", var"#8#64", var"#10#66", ODEProblem{Nothing, Tuple{Nothing, Nothing}, false, Nothing, ODEFunction{false, ModelingToolkit.ODEFunctionClosure{var"#11#67", var"#12#68"}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Vector{Symbol}, Symbol, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, var"#13#69", var"#37#93", ModelingToolkit.ODESystem}, Vector{Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}, Optim.MultivariateOptimizationResults{Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}, Float64, Vector{Float64}, Float64, Float64, Vector{Optim.OptimizationState{Float64, Optim.BFGS{LineSearches.InitialStatic{Float64}, LineSearches.BackTracking{Float64, Int64}, Nothing, Float64, Optim.Flat}}}, Bool, NamedTuple{(:f_limit_reached, :g_limit_reached, :h_limit_reached, :time_limit, :callback, :f_increased), NTuple{6, Bool}}}, Pumas.FOCE, Vector{Vector{Float64}}, NamedTuple{(:optimize_fn, :constantcoef, :omegas, :ensemblealg, :diffeq_options), Tuple{Pumas.DefaultOptimizeFN{Nothing, NamedTuple{(:show_trace, :store_trace, :extended_trace, :g_tol, :allow_f_increases), Tuple{Bool, Bool, Bool, Float64, Bool}}}, NamedTuple{(:Ω²_kel, :Ω²_vc, :σ²_prop, :A1, :A2, :F_CR1), Tuple{Float64, Float64, Float64, Int64, Int64, Int64}}, Tuple{}, EnsembleThreads, NamedTuple{(:reltol,), Tuple{Float64}}}}, ParamSet{NamedTuple{(:A1, :A2, :B1, :B2, :B3, :F_CR1, :F_CR2, :F_CR3, :Ω²_kel, :Ω²_vc, :σ²_add), Tuple{Pumas.ConstDomain{Int64}, Pumas.ConstDomain{Int64}, RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, RealDomain{Int64, Int64, Float64}, Pumas.ConstDomain{Int64}, RealDomain{Int64, Int64, Float64}, RealDomain{Float64, Int64, Float64}, Pumas.ConstDomain{Float64}, Pumas.ConstDomain{Float64}, RealDomain{Int64, TransformVariables.Infinity{true}, Int64}}}}}, Vector{Pumas.SubjectPrediction{NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, NamedTuple{(:conc, :cp), Tuple{Vector{Float64}, Vector{Float64}}}, Nothing, Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}}}, Vector{Pumas.SubjectResidual{NamedTuple{(:cp,), Tuple{Vector{Float64}}}, NamedTuple{(:cp,), Tuple{Vector{Float64}}}, Subject{NamedTuple{(:cp,), Tuple{Vector{Union{Missing, Float64}}}}, Pumas.ConstantCovar{NamedTuple{(:id, :dose), Tuple{Int64, Int64}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Vector{Float64}}, Pumas.FOCE}}, NamedTuple{(:ebes,), Tuple{Vector{NamedTuple{(:η_kel, :η_vc), Tuple{Float64, Float64}}}}}, Nothing}, f::Type{DataFrame})
@ Base ./operators.jl:858
[23] top-level scope
Any idea, what this error means?