Code: obs1= simobs(Meropenam,pop,params1,obstimes = [0,0.5,2,8])
Error:PosDefException: matrix is not positive definite; Cholesky factorization failed.
Stacktrace:
[1] checkpositivedefinite
@ /opt/julia-1.9.2/share/julia/stdlib/v1.9/LinearAlgebra/src/factorization.jl:18 [inlined]
[2] cholesky!(A::LinearAlgebra.Hermitian{Float64, Matrix{Float64}}, ::LinearAlgebra.NoPivot; check::Bool)
@ LinearAlgebra /opt/julia-1.9.2/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:268
[3] cholesky!
@ /opt/julia-1.9.2/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:266 [inlined]
[4] cholesky!(A::Matrix{Float64}, ::LinearAlgebra.NoPivot; check::Bool)
@ LinearAlgebra /opt/julia-1.9.2/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:300
[5] cholesky! (repeats 2 times)
@ /opt/julia-1.9.2/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:294 [inlined]
[6] #cholesky#162
@ /opt/julia-1.9.2/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:400 [inlined]
[7] cholesky (repeats 2 times)
@ /opt/julia-1.9.2/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:400 [inlined]
[8] PDMats.PDMat(mat::Matrix{Float64})
@ PDMats /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/PDMats/CbBv1/src/pdmat.jl:19
[9] MvNormal
@ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Distributions/uREy8/src/multivariate/mvnormal.jl:201 [inlined]
[10] MvNormal
@ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Distributions/uREy8/src/multivariate/mvnormal.jl:218 [inlined]
[11] #7
@ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/dsl/model_macro.jl:368 [inlined]
[12] sample_randeffs(rng::TaskLocalRNG, model::PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, egfronCL = 1, Ω = 4, σ²_prop = 1), 4, (:Central, :Peripheral), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :egfronCL, :Ω, :σ²_prop), Tuple{RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#7#13", Pumas.TimeDispatcher{var"#8#14", var"#9#15"}, Nothing, var"#10#16", Pumas.LinearODE, var"#11#17", var"#12#18", ModelingToolkit.ODESystem}, param::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvq, :egfronCL, :Ω, :σ²_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Matrix{Float64}, Float64}})
@ Pumas /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/models/model_api.jl:627
[13] simobs(::PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, egfronCL = 1, Ω = 4, σ²_prop = 1), 4, (:Central, :Peripheral), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :egfronCL, :Ω, :σ²_prop), Tuple{RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#7#13", Pumas.TimeDispatcher{var"#8#14", var"#9#15"}, Nothing, var"#10#16", Pumas.LinearODE, var"#11#17", var"#12#18", ModelingToolkit.ODESystem}, ::Subject{NamedTuple{(:DV,), Tuple{Vector{Missing}}}, Pumas.ConstantCovar{NamedTuple{(:EGFR, :group), Tuple{Int64, String}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Nothing}, ::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvq, :egfronCL, :Ω, :σ²_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Diagonal{Float64, Vector{Float64}}, Float64}}, ::Nothing; obstimes::Vector{Float64}, ensemblealg::EnsembleSerial, diffeq_options::NamedTuple{(:alg, :callback), Tuple{OrdinaryDiffEq.CompositeAlgorithm{Tuple{OrdinaryDiffEq.Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, Rosenbrock23{1, true, LinearSolve.LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}}, OrdinaryDiffEq.AutoSwitch{OrdinaryDiffEq.Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, Rosenbrock23{1, true, LinearSolve.LUFactorization{LinearAlgebra.RowMaximum}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Val{:forward}, true, nothing}, Rational{Int64}, Int64}}, Nothing}}, rng::TaskLocalRNG, simulate_error::Val{true}, isfor_derived::Val{false}, return_model::Val{true})
@ Pumas /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/models/model_api.jl:1527
[14] simobs
@ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/models/model_api.jl:1500 [inlined]
[15] #_simobs!#358
@ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/models/model_api.jl:1795 [inlined]
[16] #_simobs#378
@ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/models/model_api.jl:2112 [inlined]
[17] _simobs
@ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/models/model_api.jl:2023 [inlined]
[18] simobs(::PumasModel{(tvcl = 1, tvvc = 1, tvq = 1, tvvp = 1, egfronCL = 1, Ω = 4, σ²_prop = 1), 4, (:Central, :Peripheral), ParamSet{NamedTuple{(:tvcl, :tvvc, :tvq, :tvvp, :egfronCL, :Ω, :σ²_prop), Tuple{RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}, PDiagDomain{PDMats.PDiagMat{Float64, Vector{Float64}}}, RealDomain{Float64, TransformVariables.Infinity{true}, Float64}}}}, var"#7#13", Pumas.TimeDispatcher{var"#8#14", var"#9#15"}, Nothing, var"#10#16", Pumas.LinearODE, var"#11#17", var"#12#18", ModelingToolkit.ODESystem}, ::Vector{Subject{NamedTuple{(:DV,), Tuple{Vector{Missing}}}, Pumas.ConstantCovar{NamedTuple{(:EGFR, :group), Tuple{Int64, String}}}, Vector{Pumas.Event{Float64, Float64, Float64, Float64, Float64, Float64, Int64}}, Nothing}}, ::NamedTuple{(:tvcl, :tvvc, :tvvp, :tvq, :egfronCL, :Ω, :σ²_prop), Tuple{Float64, Float64, Float64, Float64, Float64, Diagonal{Float64, Vector{Float64}}, Float64}}, ::Nothing; rng::TaskLocalRNG, kwargs::Base.Pairs{Symbol, Vector{Float64}, Tuple{Symbol}, NamedTuple{(:obstimes,), Tuple{Vector{Float64}}}})
@ Pumas /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/models/model_api.jl:1991
[19] simobs
@ /build/_work/PumasSystemImages/PumasSystemImages/julia_depot/packages/Pumas/VyE8h/src/models/model_api.jl:1966 [inlined]
[20] top-level scope
@ ~/data/code/Jyothi Meropenam/Merpenam.jl:81
kindly give your inputs in solving this error.
Thanks in advance